Skip to content

Commit

Permalink
drm/v3d: Introduce a new DRM driver for Broadcom V3D V3.x+
Browse files Browse the repository at this point in the history
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 <eric@anholt.net>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> (v4)
Acked-by: Dave Airlie <airlied@linux.ie> (v3, requested submit_cl change)
Link: https://patchwork.freedesktop.org/patch/msgid/20180430181058.30181-3-eric@anholt.net
  • Loading branch information
anholt committed May 3, 2018
1 parent 4000626 commit 57692c9
Show file tree
Hide file tree
Showing 19 changed files with 3,146 additions and 0 deletions.
1 change: 1 addition & 0 deletions Documentation/gpu/drivers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ GPU Driver Documentation
tegra
tinydrm
tve200
v3d
vc4
bridge/dw-hdmi
xen-front
Expand Down
8 changes: 8 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -4795,6 +4795,14 @@ S: Maintained
F: drivers/gpu/drm/omapdrm/
F: Documentation/devicetree/bindings/display/ti/

DRM DRIVERS FOR V3D
M: Eric Anholt <eric@anholt.net>
S: Supported
F: drivers/gpu/drm/v3d/
F: include/uapi/drm/v3d_drm.h
F: Documentation/devicetree/bindings/display/brcm,bcm-v3d.txt
T: git git://anongit.freedesktop.org/drm/drm-misc

DRM DRIVERS FOR VC4
M: Eric Anholt <eric@anholt.net>
T: git git://github.com/anholt/linux
Expand Down
2 changes: 2 additions & 0 deletions drivers/gpu/drm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@ source "drivers/gpu/drm/amd/amdkfd/Kconfig"

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

source "drivers/gpu/drm/v3d/Kconfig"

source "drivers/gpu/drm/vc4/Kconfig"

source "drivers/gpu/drm/etnaviv/Kconfig"
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ obj-$(CONFIG_DRM_MGA) += mga/
obj-$(CONFIG_DRM_I810) += i810/
obj-$(CONFIG_DRM_I915) += i915/
obj-$(CONFIG_DRM_MGAG200) += mgag200/
obj-$(CONFIG_DRM_V3D) += v3d/
obj-$(CONFIG_DRM_VC4) += vc4/
obj-$(CONFIG_DRM_CIRRUS_QEMU) += cirrus/
obj-$(CONFIG_DRM_SIS) += sis/
Expand Down
9 changes: 9 additions & 0 deletions drivers/gpu/drm/v3d/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
config DRM_V3D
tristate "Broadcom V3D 3.x and newer"
depends on ARCH_BCM || ARCH_BCMSTB || COMPILE_TEST
depends on DRM
depends on COMMON_CLK
select DRM_SCHED
help
Choose this option if you have a system that has a Broadcom
V3D 3.x or newer GPU, such as BCM7268.
18 changes: 18 additions & 0 deletions drivers/gpu/drm/v3d/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Please keep these build lists sorted!

# core driver code
v3d-y := \
v3d_bo.o \
v3d_drv.o \
v3d_fence.o \
v3d_gem.o \
v3d_irq.o \
v3d_mmu.o \
v3d_trace_points.o \
v3d_sched.o

v3d-$(CONFIG_DEBUG_FS) += v3d_debugfs.o

obj-$(CONFIG_DRM_V3D) += v3d.o

CFLAGS_v3d_trace_points.o := -I$(src)
Loading

0 comments on commit 57692c9

Please sign in to comment.