Skip to content

Commit 7fca1dd

Browse files
committed
drm/gma500: Use regular fbdev I/O helpers
Use the regular fbdev helpers for framebuffer I/O instead of DRM's helpers. Gma500 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_IO_HELPERS option Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Sam Ravnborg <sam@ravnborg.org> Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230530151228.22979-6-tzimmermann@suse.de
1 parent ac9dc1b commit 7fca1dd

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

drivers/gpu/drm/gma500/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ config DRM_GMA500
33
tristate "Intel GMA500/600/3600/3650 KMS Framebuffer"
44
depends on DRM && PCI && X86 && MMU
55
select DRM_KMS_HELPER
6+
select FB_IO_HELPERS if DRM_FBDEV_EMULATION
67
select I2C
78
select I2C_ALGOBIT
89
# GMA500 depends on ACPI_VIDEO when ACPI is enabled, just like i915

drivers/gpu/drm/gma500/fbdev.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*
66
**************************************************************************/
77

8+
#include <linux/fb.h>
89
#include <linux/pfn_t.h>
910

1011
#include <drm/drm_crtc_helper.h>
@@ -134,13 +135,10 @@ static void psb_fbdev_fb_destroy(struct fb_info *info)
134135

135136
static const struct fb_ops psb_fbdev_fb_ops = {
136137
.owner = THIS_MODULE,
138+
__FB_DEFAULT_IO_OPS_RDWR,
137139
DRM_FB_HELPER_DEFAULT_OPS,
138140
.fb_setcolreg = psb_fbdev_fb_setcolreg,
139-
.fb_read = drm_fb_helper_cfb_read,
140-
.fb_write = drm_fb_helper_cfb_write,
141-
.fb_fillrect = drm_fb_helper_cfb_fillrect,
142-
.fb_copyarea = drm_fb_helper_cfb_copyarea,
143-
.fb_imageblit = drm_fb_helper_cfb_imageblit,
141+
__FB_DEFAULT_IO_OPS_DRAW,
144142
.fb_mmap = psb_fbdev_fb_mmap,
145143
.fb_destroy = psb_fbdev_fb_destroy,
146144
};

0 commit comments

Comments
 (0)