Re: [PATCH 2/9] fbdev: Put mmap for deferred I/O into drivers
From: Javier Martinez Canillas <javierm@redhat.com>
Date: 2022-03-08 14:03:13
Also in:
dri-devel
From: Javier Martinez Canillas <javierm@redhat.com>
Date: 2022-03-08 14:03:13
Also in:
dri-devel
On 3/3/22 21:58, Thomas Zimmermann wrote:
The fbdev mmap function fb_mmap() unconditionally overrides the driver's implementation if deferred I/O has been activated. This makes it hard to implement mmap with anything but a vmalloc()'ed software buffer. That is specifically a problem for DRM, where video memory is maintained by a memory manager. Leave the mmap handling to drivers and expect them to call the helper for deferred I/O by thmeselves. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> ---
[snip]
+ /* + * FB deferred I/O want you to handle mmap in your drivers. At a + * minimum, point struct fb_ops.fb_mmap to fb_deferred_io_mmap(). + */ + if (WARN_ON_ONCE(info->fbdefio)) + return -ENODEV; +
Maybe part of that comment could be printed as a WARN_ON_ONCE() message ? Regardless, the patch looks good to me: Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> -- Best regards, Javier Martinez Canillas Linux Engineering Red Hat