Skip to content

Commit 859cc65

Browse files
author
Thomas Zimmermann
committed
drm/fbdev-dma: Use regular fbdev I/O helpers
Use the regular fbdev helpers for framebuffer I/O instead of DRM's helpers. Fbdev-dma does not use damage handling, so DRM's fbdev helpers are mere wrappers around the fbdev code. By using fbdev helpers directly within each DRM fbdev emulation, we can eventually remove DRM's wrapper functions entirely. v4: * use initializer macros for struct fb_ops v2: * use FB_SYS_HELPERS option Signed-off-by: Thomas Zimmermann <[email protected]> Acked-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 6ebf23b commit 859cc65

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

drivers/gpu/drm/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ config DRM_TTM_HELPER
223223
config DRM_GEM_DMA_HELPER
224224
tristate
225225
depends on DRM
226+
select FB_SYS_HELPERS if DRM_FBDEV_EMULATION
226227
help
227228
Choose this if you need the GEM DMA helper functions
228229

drivers/gpu/drm/drm_fbdev_dma.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// SPDX-License-Identifier: MIT
22

3+
#include <linux/fb.h>
4+
35
#include <drm/drm_crtc_helper.h>
46
#include <drm/drm_drv.h>
57
#include <drm/drm_fb_helper.h>
@@ -64,14 +66,11 @@ static const struct fb_ops drm_fbdev_dma_fb_ops = {
6466
.owner = THIS_MODULE,
6567
.fb_open = drm_fbdev_dma_fb_open,
6668
.fb_release = drm_fbdev_dma_fb_release,
67-
.fb_read = drm_fb_helper_sys_read,
68-
.fb_write = drm_fb_helper_sys_write,
69+
__FB_DEFAULT_SYS_OPS_RDWR,
6970
DRM_FB_HELPER_DEFAULT_OPS,
70-
.fb_fillrect = drm_fb_helper_sys_fillrect,
71-
.fb_copyarea = drm_fb_helper_sys_copyarea,
72-
.fb_imageblit = drm_fb_helper_sys_imageblit,
73-
.fb_destroy = drm_fbdev_dma_fb_destroy,
71+
__FB_DEFAULT_SYS_OPS_DRAW,
7472
.fb_mmap = drm_fbdev_dma_fb_mmap,
73+
.fb_destroy = drm_fbdev_dma_fb_destroy,
7574
};
7675

7776
/*

0 commit comments

Comments
 (0)