drm/vgem: implement virtual GEM
Subsystems (2)
PATCH v4 1/1 drm/vgem: implement virtual GEM
This patch implements the virtual GEM driver with PRIME sharing which allows vgem to import a gem object from other drivers for the purpose of mmap-ing them to userspace. The mmap is done using the mmap operation exported by other drivers.
v2: remove platform_device and do not attach to dma bufs
v3: use drm helpers for get/put pages
v4: correct dumb create pitch
Reviewed-by Rob Clark <[email protected]> (v3)
Reviewed-by Stéphane Marchesin <[email protected]> (v3)
Signed-off-by Adam Jackson <[email protected]>
Signed-off-by Ben Widawsky <[email protected]>
Signed-off-by Zach Reizner <[email protected]>
--- drivers/gpu/drm/Kconfig | 9 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/vgem/Makefile | 4 + drivers/gpu/drm/vgem/vgem_dma_buf.c | 94 ++++++++++ drivers/gpu/drm/vgem/vgem_drv.c | 364 ++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/vgem/vgem_drv.h | 57 ++++++ 6 files changed, 529 insertions(+) create mode 100644 drivers/gpu/drm/vgem/Makefile create mode 100644 drivers/gpu/drm/vgem/vgem_dma_buf.c create mode 100644 drivers/gpu/drm/vgem/vgem_drv.c create mode 100644 drivers/gpu/drm/vgem/vgem_drv.h
drivers/gpu/drm/Kconfig +9 -0
@@ -165,6 +165,15 @@ config DRM_SAVAGE Choose this option if you have a Savage3D/4/SuperSavage/Pro/Twister chipset. If M is selected the module will be called savage. +config DRM_VGEM + tristate "Virtual GEM provider" + depends on DRM + help + Choose this option to get a virtual graphics memory manager, + as used by Mesa's software renderer for enhanced performance. + If M is selected the module will be called vgem. + + source "drivers/gpu/drm/exynos/Kconfig" source "drivers/gpu/drm/rockchip/Kconfig"
drivers/gpu/drm/Makefile +1 -0
@@ -48,6 +48,7 @@ obj-$(CONFIG_DRM_SIS) += sis/ obj-$(CONFIG_DRM_SAVAGE)+= savage/ obj-$(CONFIG_DRM_VMWGFX)+= vmwgfx/ obj-$(CONFIG_DRM_VIA) +=via/ +obj-$(CONFIG_DRM_VGEM) += vgem/ obj-$(CONFIG_DRM_NOUVEAU) +=nouveau/ obj-$(CONFIG_DRM_EXYNOS) +=exynos/ obj-$(CONFIG_DRM_ROCKCHIP) +=rockchip/
drivers/gpu/drm/vgem/Makefile new file +4 -0
@@ -0,0 +1,4 @@ +ccflags-y := -Iinclude/drm +vgem-y := vgem_drv.o vgem_dma_buf.o + +obj-$(CONFIG_DRM_VGEM) += vgem.o
drivers/gpu/drm/vgem/vgem_dma_buf.c new file +94 -0
94 lines not on this page · raw message
drivers/gpu/drm/vgem/vgem_drv.c new file +364 -0
364 lines not on this page · raw message
drivers/gpu/drm/vgem/vgem_drv.h new file +57 -0
57 lines not on this page · raw message
Signature · 6 lines
2.2.0.rc0.207.ga3a616c _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel