Re: [PATCH v5 08/13] drm/omapdrm: Use regular fbdev I/O helpers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 30/05/2023 18:02, Thomas Zimmermann wrote:
Use the regular fbdev helpers for framebuffer I/O instead of DRM's
helpers. Omapdrm 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 <tzimmermann@xxxxxxx>
Acked-by: Sam Ravnborg <sam@xxxxxxxxxxxx>
Cc: Tomi Valkeinen <tomba@xxxxxxxxxx>
---
  drivers/gpu/drm/omapdrm/Kconfig      |  1 +
  drivers/gpu/drm/omapdrm/omap_fbdev.c | 11 +++--------
  2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/omapdrm/Kconfig b/drivers/gpu/drm/omapdrm/Kconfig
index 76ded1568bd0..b4ac76c9f31b 100644
--- a/drivers/gpu/drm/omapdrm/Kconfig
+++ b/drivers/gpu/drm/omapdrm/Kconfig
@@ -4,6 +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 VIDEOMODE_HELPERS
  	select HDMI
  	default n
diff --git a/drivers/gpu/drm/omapdrm/omap_fbdev.c b/drivers/gpu/drm/omapdrm/omap_fbdev.c
index b950e93b3846..b7ccce0704a3 100644
--- a/drivers/gpu/drm/omapdrm/omap_fbdev.c
+++ b/drivers/gpu/drm/omapdrm/omap_fbdev.c
@@ -4,6 +4,8 @@
   * Author: Rob Clark <rob@xxxxxx>
   */
+#include <linux/fb.h>
+
  #include <drm/drm_drv.h>
  #include <drm/drm_crtc_helper.h>
  #include <drm/drm_fb_helper.h>
@@ -95,20 +97,13 @@ 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_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_ioctl	= drm_fb_helper_ioctl,
-
-	.fb_read = drm_fb_helper_sys_read,
-	.fb_write = drm_fb_helper_sys_write,
-	.fb_fillrect = drm_fb_helper_sys_fillrect,
-	.fb_copyarea = drm_fb_helper_sys_copyarea,
-	.fb_imageblit = drm_fb_helper_sys_imageblit,
-
  	.fb_destroy = omap_fbdev_fb_destroy,
  };

Reviewed-by: Tomi Valkeinen <tomi.valkeinen@xxxxxxxxxxxxxxxx>

 Tomi




[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux