Re: [PATCH 6/6] drm/fb-helper: Use fb_{cfb,sys}_{read, write}()

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

 



Hi

Am 26.04.23 um 17:15 schrieb Geert Uytterhoeven:
Hi Thomas,

On Tue, Apr 25, 2023 at 4:28 PM Thomas Zimmermann <tzimmermann@xxxxxxx> wrote:
Implement DRM fbdev helpers for reading and writing framebuffer
memory with the respective fbdev functions. Removes duplicate
code.

Signed-off-by: Thomas Zimmermann <tzimmermann@xxxxxxx>

Thanks for your patch!

--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c

@@ -816,21 +727,10 @@ static ssize_t drm_fb_helper_read_screen_buffer(struct fb_info *info, char __use
  ssize_t drm_fb_helper_sys_read(struct fb_info *info, char __user *buf,
                                size_t count, loff_t *ppos)
  {
-       return __drm_fb_helper_read(info, buf, count, ppos, drm_fb_helper_read_screen_buffer);
+       return fb_sys_read(info, buf, count, ppos);
  }
  EXPORT_SYMBOL(drm_fb_helper_sys_read);

I guess drm_fb_helper_sys_read() can just be removed?

Yes, soon.


@@ -849,7 +749,7 @@ ssize_t drm_fb_helper_sys_write(struct fb_info *info, const char __user *buf,
         ssize_t ret;
         struct drm_rect damage_area;

-       ret = __drm_fb_helper_write(info, buf, count, ppos, drm_fb_helper_write_screen_buffer);
+       ret = fb_sys_write(info, buf, count, ppos);
         if (ret <= 0)
                 return ret;


drm_fb_helper_sys_write() cannot be removed yet, because it does damage
handling below.  If the fb_ops.fb_sync() callback would be enhanced to pass
a region, drm_fb_helper could implement .fb_sync() instead of .fb_write().

Most DRM's fbdev support can soon use regular fbdev helpers from this patchset. Only DRM's i915 and the generic fbdev need damage handling. But they are both special in their own way, so each will get its own implementation. I have prototype patches to make this happen.

Best regards
Thomas


Likewise for the "cfb" (which is a misnomer) variants below.

Gr{oetje,eeting}s,

                         Geert


--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux