drm: Improve fbdev emulation for DMA-able framebuffers
Subsystems (8)
Thomas Zimmermann
maintainerv3 cover drm: Improve fbdev emulation for DMA-able framebuffers
Add fbdev helpers for framebuffers in DMA-able memory and update fbdev emulation in the respective DRM drivers. DMA memory used to handled as system memory. Improve this and prepare for possible future changes.
Patch 1 adds initializer macros for struct fb_ops and a Kconfig token for framebuffers in DMA memory.
Patches 2 to 5 update fbdev-dma and tegra. No functional changes are expected as both used system memory before.
Patches 6 and 7 update exynos to use DMA helpers. Exynos incorrectly used fbdev's I/O-memory helpers. Fix this.
Patches 8 to 10 update omapdrm to use DMA helpers. Patch 7 first reworks the driver's mmap to current best practices. This also makes it suitable for use with fbdev, which patches 8 and 9 implement.
Patchies 11 removes some fbdev macros for system memory that are now unused; patch 12 fixes some comments.
The patchset would ideally go through drm-misc-next. Future patches can build upon it and update fbdev drivers in similar ways.
v3:
* set screen_buffer in tegra (Thierry)
v2:
* fix omap mmap flags
* drop FBINFO_DEFAULT from patches
* minor cleanups
Thomas Zimmermann (12):
fbdev: Add fb_ops init macros for framebuffers in DMA-able memory drm/fbdev-dma: Use fbdev DMA helpers
drm/tegra: Use fbdev DMA helpers
drm/tegra: Set fbdev FBINFO_VIRTFB flag
drm/tegra: Store pointer to vmap'ed framebuffer in screen_buffer drm/exynos: Use fbdev DMA helpers
drm/exynos: Set fbdev FBINFO_VIRTFB flag
drm/omapdrm: Set VM flags in GEM-object mmap function drm/omapdrm: Use GEM mmap for fbdev emulation drm/omapdrm: Set fbdev FBINFO_VIRTFB flag
fbdev: Remove FB_DEFAULT_SYS_OPS
fbdev: Harmonize some comments in <linux/fb.h>
drivers/gpu/drm/Kconfig | 2 +- drivers/gpu/drm/drm_fbdev_dma.c | 4 ++-- drivers/gpu/drm/exynos/Kconfig | 2 +- drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 5 ++-- drivers/gpu/drm/omapdrm/Kconfig | 2 +- drivers/gpu/drm/omapdrm/omap_drv.c | 12 +--------- drivers/gpu/drm/omapdrm/omap_fbdev.c | 16 +++++++++++-- drivers/gpu/drm/omapdrm/omap_gem.c | 24 +++++-------------- drivers/gpu/drm/omapdrm/omap_gem.h | 3 --- drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c | 7 +----- drivers/gpu/drm/tegra/Kconfig | 2 +- drivers/gpu/drm/tegra/fbdev.c | 7 +++--- drivers/video/fbdev/Kconfig | 8 +++++++ include/linux/fb.h | 29 ++++++++++------------- 14 files changed, 56 insertions(+), 67 deletions(-)
Signature · 1 line
2.41.0
Thomas Zimmermann
maintainerPATCH v3 1/12 fbdev: Add fb_ops init macros for framebuffers in DMA-able memory
Add initializer macros for struct fb_ops for framebuffers in DMA-able memory areas. Also add a corresponding Kconfig token. As of now, this is equivalent to system framebuffers and mostly useful for labeling drivers correctly.
A later patch may add a generic DMA-specific mmap operation. Linux offers a number of dma_mmap_*() helpers for different use cases.
--- drivers/video/fbdev/Kconfig | 8 ++++++++ include/linux/fb.h | 13 +++++++++++++ 2 files changed, 21 insertions(+)
drivers/video/fbdev/Kconfig +8 -0
@@ -168,6 +168,14 @@ config FB_DEFERRED_IO bool depends on FB +config FB_DMA_HELPERS + bool + depends on FB + select FB_SYS_COPYAREA + select FB_SYS_FILLRECT + select FB_SYS_FOPS + select FB_SYS_IMAGEBLIT + config FB_IO_HELPERS bool depends on FB
include/linux/fb.h +13 -0
@@ -594,6 +594,19 @@ extern ssize_t fb_sys_write(struct fb_info *info, const char __user *buf, __FB_DEFAULT_SYS_OPS_DRAW, \ __FB_DEFAULT_SYS_OPS_MMAP +/* +* Helpers for framebuffers in DMA-able memory + */ + +#define __FB_DEFAULT_DMA_OPS_RDWR \ + .fb_read = fb_sys_read, \ + .fb_write = fb_sys_write + +#define __FB_DEFAULT_DMA_OPS_DRAW \ + .fb_fillrect = sys_fillrect, \ + .fb_copyarea = sys_copyarea, \ + .fb_imageblit = sys_imageblit +/* drivers/video/fbmem.c */ extern int register_framebuffer (struct fb_info *fb_info);extern void unregister_framebuffer (struct fb_info *fb_info);
Signature · 1 line
2.41.0
Thomas Zimmermann
maintainerPATCH v3 2/12 drm/fbdev-dma: Use fbdev DMA helpers
In reply to Thomas ZimmermannUse fbdev's DMA helpers for fbdev-dma. They are equivalent to the previously used system-memory helpers, so no functional changes here.
--- drivers/gpu/drm/Kconfig | 2 +- drivers/gpu/drm/drm_fbdev_dma.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/Kconfig +1 -1
@@ -216,7 +216,7 @@ config DRM_TTM_HELPER config DRM_GEM_DMA_HELPER tristate depends on DRM - select FB_SYS_HELPERS if DRM_FBDEV_EMULATION + select FB_DMA_HELPERS if DRM_FBDEV_EMULATION help Choose this if you need the GEM DMA helper functions
drivers/gpu/drm/drm_fbdev_dma.c +2 -2
@@ -62,9 +62,9 @@ static const struct fb_ops drm_fbdev_dma_fb_ops = { .owner = THIS_MODULE, .fb_open = drm_fbdev_dma_fb_open, .fb_release = drm_fbdev_dma_fb_release, - __FB_DEFAULT_SYS_OPS_RDWR, + __FB_DEFAULT_DMA_OPS_RDWR,DRM_FB_HELPER_DEFAULT_OPS , - __FB_DEFAULT_SYS_OPS_DRAW, + __FB_DEFAULT_DMA_OPS_DRAW, .fb_mmap = drm_fbdev_dma_fb_mmap, .fb_destroy = drm_fbdev_dma_fb_destroy, };
Signature · 1 line
2.41.0
Thomas Zimmermann
maintainerPATCH v3 3/12 drm/tegra: Use fbdev DMA helpers
In reply to Thomas ZimmermannUse fbdev's DMA helpers for fbdev emulation. They are equivalent to the previously used system-memory helpers, so no functional changes here.
--- drivers/gpu/drm/tegra/Kconfig | 2 +- drivers/gpu/drm/tegra/fbdev.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/tegra/Kconfig +1 -1
@@ -12,7 +12,7 @@ config DRM_TEGRA select DRM_KMS_HELPER select DRM_MIPI_DSI select DRM_PANEL - select FB_SYS_HELPERS if DRM_FBDEV_EMULATION + select FB_DMA_HELPERS if DRM_FBDEV_EMULATION select TEGRA_HOST1X select INTERCONNECT select IOMMU_IOVA
drivers/gpu/drm/tegra/fbdev.c +2 -2
@@ -59,9 +59,9 @@ static void tegra_fbdev_fb_destroy(struct fb_info *info)static const struct fb_ops tegra_fb_ops = { .owner =THIS_MODULE , - __FB_DEFAULT_SYS_OPS_RDWR, + __FB_DEFAULT_DMA_OPS_RDWR,DRM_FB_HELPER_DEFAULT_OPS , - __FB_DEFAULT_SYS_OPS_DRAW, + __FB_DEFAULT_DMA_OPS_DRAW, .fb_mmap = tegra_fb_mmap, .fb_destroy = tegra_fbdev_fb_destroy, };
Signature · 1 line
2.41.0
Re: [PATCH v3 03/12] drm/tegra: Use fbdev DMA helpers
Quoted 8 lines · Thomas Zimmermann
Use fbdev's DMA helpers for fbdev emulation. They are equivalent to the previously used system-memory helpers, so no functional changes here.
Signed-off-by Thomas Zimmermann <[email protected]>Reviewed-by Javier Martinez Canillas <[email protected]>Acked-by Maxime Ripard <[email protected]>Cc Thierry Reding <[email protected]>Cc Mikko Perttunen <[email protected]>
Quoted 4 lines
--- drivers/gpu/drm/tegra/Kconfig | 2 +- drivers/gpu/drm/tegra/fbdev.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
Thomas Zimmermann
maintainerPATCH v3 4/12 drm/tegra: Set fbdev FBINFO_VIRTFB flag
In reply to Thomas ZimmermannMark the framebuffer with FBINFO_VIRTFB. The framebuffer range is in DMA-able memory and should be accessed with the CPU's regular memory ops.
v2:
* drop FBINFO_DEFAULT
--- drivers/gpu/drm/tegra/fbdev.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/tegra/fbdev.c +1 -0
@@ -132,6 +132,7 @@ static int tegra_fbdev_probe(struct drm_fb_helper *helper, } } + info->flags |=FBINFO_VIRTFB ; info->screen_base = (void __iomem *)bo->vaddr + offset; info->screen_size = size; info->fix.smem_start = (unsigned long )(bo->iova + offset);
Signature · 1 line
2.41.0
Re: [PATCH v3 04/12] drm/tegra: Set fbdev FBINFO_VIRTFB flag
Quoted 7 lines · Thomas Zimmermann
Mark the framebuffer with
FBINFO_VIRTFB. The framebuffer range is in DMA-able memory and should be accessed with the CPU's regular memory ops.v2:
* dropFBINFO_DEFAULT
Quoted 8 lines
Signed-off-by Thomas Zimmermann <[email protected]>Reviewed-by Javier Martinez Canillas <[email protected]>Acked-by Maxime Ripard <[email protected]>Cc Thierry Reding <[email protected]>Cc Mikko Perttunen <[email protected]>--- drivers/gpu/drm/tegra/fbdev.c | 1 + 1 file changed, 1 insertion(+)
Thomas Zimmermann
maintainerPATCH v3 5/12 drm/tegra: Store pointer to vmap'ed framebuffer in screen_buffer
In reply to Thomas ZimmermannTegra uses DMA-able memory, which has to be acessed with CPU ops for system-memory. Store the framebuffer's vmap address in struct fb_info.screen_buffer. The currently used field 'screen_base' is for I/O memory.
--- drivers/gpu/drm/tegra/fbdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/tegra/fbdev.c +1 -1
@@ -133,7 +133,7 @@ static int tegra_fbdev_probe(struct drm_fb_helper *helper, } info->flags |=FBINFO_VIRTFB ; - info->screen_base = (void __iomem *)bo->vaddr + offset; + info->screen_buffer = bo->vaddr + offset; info->screen_size = size; info->fix.smem_start = (unsigned long )(bo->iova + offset); info->fix.smem_len = size;
Signature · 1 line
2.41.0
Re: [PATCH v3 05/12] drm/tegra: Store pointer to vmap'ed framebuffer in screen_buffer
Quoted 10 lines · Thomas Zimmermann
Tegra uses DMA-able memory, which has to be acessed with CPU ops for system-memory. Store the framebuffer's vmap address in struct fb_info.screen_buffer. The currently used field '
screen_base' is for I/O memory.Suggested-by Thierry Reding <[email protected]>Signed-off-by Thomas Zimmermann <[email protected]>Cc Thierry Reding <[email protected]>Cc Mikko Perttunen <[email protected]>---
Signature · 5 lines
Best regards, Javier Martinez Canillas Core Platforms Red Hat
Re: [PATCH v3 05/12] drm/tegra: Store pointer to vmap'ed framebuffer in screen_buffer
In reply to Thomas ZimmermannQuoted 5 lines · Thomas Zimmermann
Tegra uses DMA-able memory, which has to be acessed with CPU ops for system-memory. Store the framebuffer's vmap address in struct fb_info.screen_buffer. The currently used field '
screen_base' is for I/O memory.
Quoted 7 lines
Suggested-by Thierry Reding <[email protected]>Signed-off-by Thomas Zimmermann <[email protected]>Cc Thierry Reding <[email protected]>Cc Mikko Perttunen <[email protected]>--- drivers/gpu/drm/tegra/fbdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Thomas Zimmermann
maintainerPATCH v3 6/12 drm/exynos: Use fbdev DMA helpers
In reply to Thomas ZimmermannUse fbdev's DMA helpers for fbdev emulation. The driver previously used the I/O-memory helpers, while allocating DMA-able system memory. This could (in theory) result in bus errors from accessing the memory range.
This bug has been present since the exynos driver was first added.
v2:
* drop the pointless Fixes tag (Javier)
* fix typo in commit message
--- drivers/gpu/drm/exynos/Kconfig | 2 +- drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/exynos/Kconfig +1 -1
@@ -7,7 +7,7 @@ config DRM_EXYNOS select DRM_DISPLAY_HELPER if DRM_EXYNOS_DP select DRM_KMS_HELPER select VIDEOMODE_HELPERS - select FB_IO_HELPERS if DRM_FBDEV_EMULATION + select FB_DMA_HELPERS if DRM_FBDEV_EMULATION select SND_SOC_HDMI_CODEC if SND_SOC help Choose this option if you have a Samsung SoC Exynos chipset.
drivers/gpu/drm/exynos/exynos_drm_fbdev.c +2 -2
@@ -49,9 +49,9 @@ static void exynos_drm_fb_destroy(struct fb_info *info)static const struct fb_ops exynos_drm_fb_ops = { .owner =THIS_MODULE , - __FB_DEFAULT_IO_OPS_RDWR, + __FB_DEFAULT_DMA_OPS_RDWR,DRM_FB_HELPER_DEFAULT_OPS , - __FB_DEFAULT_IO_OPS_DRAW, + __FB_DEFAULT_DMA_OPS_DRAW, .fb_mmap = exynos_drm_fb_mmap, .fb_destroy = exynos_drm_fb_destroy, };
Signature · 1 line
2.41.0
Thomas Zimmermann
maintainerPATCH v3 7/12 drm/exynos: Set fbdev FBINFO_VIRTFB flag
In reply to Thomas ZimmermannMark the framebuffer with FBINFO_VIRTFB. The framebuffer range is in DMA-able memory and should be accessed with the CPU's regular memory ops.
v2:
* drop FBINFO_FLAG_DEFAULT
--- drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/exynos/exynos_drm_fbdev.c +1 -0
@@ -79,6 +79,7 @@ static int exynos_drm_fbdev_update(struct drm_fb_helper *helper, offset = fbi->var.xoffset * fb->format->cpp[0 ]; offset += fbi->var.yoffset * fb->pitches[0 ]; + fbi->flags |=FBINFO_VIRTFB ; fbi->screen_buffer = exynos_gem->kvaddr + offset; fbi->screen_size = size; fbi->fix.smem_len = size;
Signature · 1 line
2.41.0
Thomas Zimmermann
maintainerPATCH v3 8/12 drm/omapdrm: Set VM flags in GEM-object mmap function
In reply to Thomas ZimmermannUse the mmap callback in struct drm_gem_object_funcs to set the VM flags. Replace a number of mmap helpers in omapdrm with their GEM helper counterparts. Generate DRM's file-operations instance with GEM's DEFINE_DRM_GEM_FOPS.
The omapdrm driver uses DRM's drm_gem_mmap() helper to prepare the VMA structure. It then modifies the resulting VMA state in its own helper omap_gem_mmap_obj(). The patch improves this by setting up the VMA in the mmap callback in drm_gem_object_funcs, which is called from within drm_gem_mmap().
Omapdrm's omap_gem_mmap() and omap_gem_mmap() can then be removed from the driver. A call to drm_gem_mmap() is sufficient for the mmap operation.
Finally, with the omap functions gone, the drivers file_ops in omapdriver_fops can be generated with DEFINE_DRM_GEM_FOPS, which sets DRM's default helpers.
v2:
* detailed commit message (Javier)
* do not set VM_PFNMAP
--- drivers/gpu/drm/omapdrm/omap_drv.c | 12 +----------- drivers/gpu/drm/omapdrm/omap_gem.c | 24 ++++++----------------- drivers/gpu/drm/omapdrm/omap_gem.h | 3 --- drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c | 7 +------ 4 files changed, 8 insertions(+), 38 deletions(-)
drivers/gpu/drm/omapdrm/omap_drv.c +1 -11
@@ -636,17 +636,7 @@ static int dev_open(struct drm_device *dev, struct drm_file *file)return 0 ; } -static const struct file_operations omapdriver_fops = { - .owner =THIS_MODULE , - .open = drm_open, - .unlocked_ioctl = drm_ioctl, - .compat_ioctl = drm_compat_ioctl, - .release = drm_release, - .mmap = omap_gem_mmap, - .poll = drm_poll, - .read = drm_read, - .llseek = noop_llseek, -}; +DEFINE_DRM_GEM_FOPS (omapdriver_fops);static const struct drm_driver omap_drm_driver = { .driver_features = DRIVER_MODESET | DRIVER_GEM |
drivers/gpu/drm/omapdrm/omap_gem.c +6 -18
@@ -524,26 +524,11 @@ static vm_fault_t omap_gem_fault(struct vm_fault *vmf)return ret; } -/** We override mainly to fix up some of the vm mapping flags.. */ -int omap_gem_mmap (struct file *filp,struct vm_area_struct *vma) -{ -int ret; - - ret =drm_gem_mmap (filp, vma); -if (ret) { -DBG ("mmap failed: %d" , ret); -return ret; - } - -return omap_gem_mmap_obj (vma->vm_private_data, vma); -} - -int omap_gem_mmap_obj (struct drm_gem_object *obj, -struct vm_area_struct *vma) +static int omap_gem_object_mmap (struct drm_gem_object *obj,struct vm_area_struct *vma) {struct omap_gem_object *omap_obj =to_omap_bo (obj); -vm_flags_mod (vma,VM_MIXEDMAP ,VM_PFNMAP ); +vm_flags_set (vma,VM_DONTEXPAND |VM_DONTDUMP |VM_IO |VM_MIXEDMAP );if (omap_obj->flags &OMAP_BO_WC ) { vma->vm_page_prot =pgprot_writecombine (vm_get_page_prot (vma->vm_flags));
@@ -563,12 +548,14 @@ int omap_gem_mmap_obj(struct drm_gem_object *obj,* address_space (so unmap_mapping_range does what we want, * in particular in the case of mmap'd dmabufs) */ - vma->vm_pgoff =0 ; + vma->vm_pgoff -=drm_vma_node_start (&obj->vma_node);vma_set_file (vma, obj->filp); vma->vm_page_prot =vm_get_page_prot (vma->vm_flags); } + vma->vm_page_prot =pgprot_decrypted (vma->vm_page_prot); +return 0 ; }
@@ -1282,6 +1269,7 @@ static const struct vm_operations_struct omap_gem_vm_ops = {static const struct drm_gem_object_funcs omap_gem_object_funcs = { .free = omap_gem_free_object, .export = omap_gem_prime_export, + .mmap = omap_gem_object_mmap, .vm_ops = &omap_gem_vm_ops, };
drivers/gpu/drm/omapdrm/omap_gem.h +0 -3
@@ -57,9 +57,6 @@ int omap_gem_dumb_create(struct drm_file *file, struct drm_device *dev, struct drm_mode_create_dumb *args);/* mmap() Interface */ -int omap_gem_mmap (struct file *filp,struct vm_area_struct *vma); -int omap_gem_mmap_obj (struct drm_gem_object *obj, -struct vm_area_struct *vma);u64 omap_gem_mmap_offset (struct drm_gem_object *obj);size_t omap_gem_mmap_size (struct drm_gem_object *obj);
drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c +1 -6
@@ -64,13 +64,8 @@ static int omap_gem_dmabuf_mmap(struct dma_buf *buffer, struct vm_area_struct *vma) {struct drm_gem_object *obj = buffer->priv; -int ret =0 ; - ret =drm_gem_mmap_obj (obj,omap_gem_mmap_size (obj), vma); -if (ret <0 ) -return ret; - -return omap_gem_mmap_obj (obj, vma); +return drm_gem_mmap_obj (obj,omap_gem_mmap_size (obj), vma); }static const struct dma_buf_ops omap_dmabuf_ops = {
Signature · 1 line
2.41.0
Thomas Zimmermann
maintainerPATCH v3 9/12 drm/omapdrm: Use GEM mmap for fbdev emulation
In reply to Thomas ZimmermannThe fbdev emulation currently uses fbdev's default mmap code, which has been written for I/O memory. Provide an mmap that uses GEM's mmap infrastructure.
Utilize fine-grained fbdev macros to initialize struct fb_ops. The macros set the read/write and the draw callbacks for DMA memory. Set the fb_mmap callback to omapdrm's new mmap helper. Also select the correct Kconfig token for fbdev's DMA helpers. Note that the DMA helpers are the same as for system memory.
--- drivers/gpu/drm/omapdrm/Kconfig | 2 +- drivers/gpu/drm/omapdrm/omap_fbdev.c | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-)
drivers/gpu/drm/omapdrm/Kconfig +1 -1
@@ -4,7 +4,7 @@ config DRM_OMAP depends on DRM && OF depends on ARCH_OMAP2PLUS select DRM_KMS_HELPER - select FB_SYS_HELPERS if DRM_FBDEV_EMULATION + select FB_DMA_HELPERS if DRM_FBDEV_EMULATION select VIDEOMODE_HELPERS select HDMI default n
drivers/gpu/drm/omapdrm/omap_fbdev.c +13 -2
@@ -76,6 +76,15 @@ static int omap_fbdev_pan_display(struct fb_var_screeninfo *var,return drm_fb_helper_pan_display (var, fbi); } +static int omap_fbdev_fb_mmap (struct fb_info *info,struct vm_area_struct *vma) +{ +struct drm_fb_helper *helper = info->par; +struct drm_framebuffer *fb = helper->fb; +struct drm_gem_object *bo =drm_gem_fb_get_obj (fb,0 ); + +return drm_gem_mmap_obj (bo,omap_gem_mmap_size (bo), vma); +} +static void omap_fbdev_fb_destroy (struct fb_info *info) {struct drm_fb_helper *helper = info->par;
@@ -97,14 +106,16 @@ static void omap_fbdev_fb_destroy(struct fb_info *info)static const struct fb_ops omap_fb_ops = { .owner =THIS_MODULE , -FB_DEFAULT_SYS_OPS , + __FB_DEFAULT_DMA_OPS_RDWR, .fb_check_var = drm_fb_helper_check_var, .fb_set_par = drm_fb_helper_set_par, .fb_setcmap = drm_fb_helper_setcmap, .fb_blank = drm_fb_helper_blank, .fb_pan_display = omap_fbdev_pan_display, + __FB_DEFAULT_DMA_OPS_DRAW, .fb_ioctl = drm_fb_helper_ioctl, - .fb_destroy = omap_fbdev_fb_destroy, + .fb_mmap = omap_fbdev_fb_mmap, + .fb_destroy = omap_fbdev_fb_destroy, }; static int omap_fbdev_create(struct drm_fb_helper *helper,
Signature · 1 line
2.41.0
Thomas Zimmermann
maintainerPATCH v3 10/12 drm/omapdrm: Set fbdev FBINFO_VIRTFB flag
In reply to Thomas ZimmermannMark the framebuffer with FBINFO_VIRTFB. The framebuffer range is in DMA-able memory and should be accessed with the CPU's regular memory ops.
v2:
* drop FBINFO_DEFAULT
--- drivers/gpu/drm/omapdrm/omap_fbdev.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/omapdrm/omap_fbdev.c +1 -0
@@ -207,6 +207,7 @@ static int omap_fbdev_create(struct drm_fb_helper *helper,drm_fb_helper_fill_info (fbi, helper, sizes); + fbi->flags |=FBINFO_VIRTFB ; fbi->screen_buffer =omap_gem_vaddr (bo); fbi->screen_size = bo->size; fbi->fix.smem_start = dma_addr;
Signature · 1 line
2.41.0
Thomas Zimmermann
maintainerPATCH v3 11/12 fbdev: Remove FB_DEFAULT_SYS_OPS
In reply to Thomas ZimmermannRemove the initializer macro FB_DEFAULT_SYS_OPS and its helper macro __FB_DEFAULT_SYS_OPS_MMAP. There are no users.
--- include/linux/fb.h | 8 -------- 1 file changed, 8 deletions(-)
include/linux/fb.h +0 -8
@@ -586,14 +586,6 @@ extern ssize_t fb_sys_write(struct fb_info *info, const char __user *buf, .fb_copyarea = sys_copyarea, \ .fb_imageblit = sys_imageblit -#define __FB_DEFAULT_SYS_OPS_MMAP \ - .fb_mmap = NULL/* default implementation */ - -#define FB_DEFAULT_SYS_OPS \ - __FB_DEFAULT_SYS_OPS_RDWR, \ - __FB_DEFAULT_SYS_OPS_DRAW, \ - __FB_DEFAULT_SYS_OPS_MMAP -/* * Helpers for framebuffers in DMA-able memory */
Signature · 1 line
2.41.0
Thomas Zimmermann
maintainerPATCH v3 12/12 fbdev: Harmonize some comments in <linux/fb.h>
In reply to Thomas ZimmermannMake the comments for I/O, system and DMA memory say the same. Makes the header file's structure more obvious.
--- include/linux/fb.h | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-)
include/linux/fb.h +2 -10
@@ -529,7 +529,7 @@ extern int fb_pan_display(struct fb_info *info, struct fb_var_screeninfo *var);extern int fb_blank (struct fb_info *info,int blank);/* -* Drawing operations where framebuffer is in I/O memory +* Helpers for framebuffers in I/O memory */ extern void cfb_fillrect (struct fb_info *info,const struct fb_fillrect *rect);
@@ -540,10 +540,6 @@ extern ssize_t fb_io_read(struct fb_info *info, char __user *buf,extern ssize_t fb_io_write (struct fb_info *info,const char __user *buf,size_t count,loff_t *ppos); -/* -* Initializes struct fb_ops for framebuffers in I/O memory. -*/ -#define __FB_DEFAULT_IO_OPS_RDWR \ .fb_read = fb_io_read, \ .fb_write = fb_io_write
@@ -562,7 +558,7 @@ extern ssize_t fb_io_write(struct fb_info *info, const char __user *buf,__FB_DEFAULT_IO_OPS_MMAP /* -* Drawing operations where framebuffer is in system RAM +* Helpers for framebuffers in system memory */ extern void sys_fillrect(struct fb_info *info, const struct fb_fillrect *rect);
@@ -573,10 +569,6 @@ extern ssize_t fb_sys_read(struct fb_info *info, char __user *buf,extern ssize_t fb_sys_write (struct fb_info *info,const char __user *buf,size_t count,loff_t *ppos); -/* -* Initializes struct fb_ops for framebuffers in system memory. -*/ -#define __FB_DEFAULT_SYS_OPS_RDWR \ .fb_read = fb_sys_read, \ .fb_write = fb_sys_write
Signature · 1 line
2.41.0