Skip to content

Commit 57692c9

Browse files
committed
drm/v3d: Introduce a new DRM driver for Broadcom V3D V3.x+
This driver will be used to support Mesa on the Broadcom 7268 and 7278 platforms. V3D 3.3 introduces an MMU, which means we no longer need CMA or vc4's complicated CL/shader validation scheme. This massively changes the GEM behavior, so I've forked off to a new driver. v2: Mark SUBMIT_CL as needing DRM_AUTH. coccinelle fixes from kbuild test robot. Drop personal git link from MAINTAINERS. Don't double-map dma-buf imported BOs. Add kerneldoc about needing MMU eviction. Drop prime vmap/unmap stubs. Delay mmap offset setup to mmap time. Use drm_dev_init instead of _alloc. Use ktime_get() for wait_bo timeouts. Drop drm_can_sleep() usage, since we don't modeset. Switch page tables back to WC (debug change to coherent had slipped in). Switch drm_gem_object_unreference_unlocked() to drm_gem_object_put_unlocked(). Simplify overflow mem handling by not sharing overflow mem between jobs. v3: no changes v4: align submit_cl to 64 bits (review by airlied), check zero flags in other ioctls. Signed-off-by: Eric Anholt <[email protected]> Acked-by: Daniel Vetter <[email protected]> (v4) Acked-by: Dave Airlie <[email protected]> (v3, requested submit_cl change) Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 4000626 commit 57692c9

19 files changed

+3146
-0
lines changed

Documentation/gpu/drivers.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ GPU Driver Documentation
1010
tegra
1111
tinydrm
1212
tve200
13+
v3d
1314
vc4
1415
bridge/dw-hdmi
1516
xen-front

MAINTAINERS

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4795,6 +4795,14 @@ S: Maintained
47954795
F: drivers/gpu/drm/omapdrm/
47964796
F: Documentation/devicetree/bindings/display/ti/
47974797

4798+
DRM DRIVERS FOR V3D
4799+
M: Eric Anholt <[email protected]>
4800+
S: Supported
4801+
F: drivers/gpu/drm/v3d/
4802+
F: include/uapi/drm/v3d_drm.h
4803+
F: Documentation/devicetree/bindings/display/brcm,bcm-v3d.txt
4804+
T: git git://anongit.freedesktop.org/drm/drm-misc
4805+
47984806
DRM DRIVERS FOR VC4
47994807
M: Eric Anholt <[email protected]>
48004808
T: git git://github.com/anholt/linux

drivers/gpu/drm/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,8 @@ source "drivers/gpu/drm/amd/amdkfd/Kconfig"
267267

268268
source "drivers/gpu/drm/imx/Kconfig"
269269

270+
source "drivers/gpu/drm/v3d/Kconfig"
271+
270272
source "drivers/gpu/drm/vc4/Kconfig"
271273

272274
source "drivers/gpu/drm/etnaviv/Kconfig"

drivers/gpu/drm/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ obj-$(CONFIG_DRM_MGA) += mga/
6161
obj-$(CONFIG_DRM_I810) += i810/
6262
obj-$(CONFIG_DRM_I915) += i915/
6363
obj-$(CONFIG_DRM_MGAG200) += mgag200/
64+
obj-$(CONFIG_DRM_V3D) += v3d/
6465
obj-$(CONFIG_DRM_VC4) += vc4/
6566
obj-$(CONFIG_DRM_CIRRUS_QEMU) += cirrus/
6667
obj-$(CONFIG_DRM_SIS) += sis/

drivers/gpu/drm/v3d/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
config DRM_V3D
2+
tristate "Broadcom V3D 3.x and newer"
3+
depends on ARCH_BCM || ARCH_BCMSTB || COMPILE_TEST
4+
depends on DRM
5+
depends on COMMON_CLK
6+
select DRM_SCHED
7+
help
8+
Choose this option if you have a system that has a Broadcom
9+
V3D 3.x or newer GPU, such as BCM7268.

drivers/gpu/drm/v3d/Makefile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Please keep these build lists sorted!
2+
3+
# core driver code
4+
v3d-y := \
5+
v3d_bo.o \
6+
v3d_drv.o \
7+
v3d_fence.o \
8+
v3d_gem.o \
9+
v3d_irq.o \
10+
v3d_mmu.o \
11+
v3d_trace_points.o \
12+
v3d_sched.o
13+
14+
v3d-$(CONFIG_DEBUG_FS) += v3d_debugfs.o
15+
16+
obj-$(CONFIG_DRM_V3D) += v3d.o
17+
18+
CFLAGS_v3d_trace_points.o := -I$(src)

0 commit comments

Comments
 (0)