fbdev: Warn on incorrect framebuffer access
authorThomas Zimmermann <tzimmermann@suse.de>
Mon, 27 Nov 2023 13:16:00 +0000 (14:16 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Wed, 29 Nov 2023 11:20:50 +0000 (12:20 +0100)
commitb3e8813773c568fd2d65e9752abfda27442e502e
tree4bfd1fbb2a8f32f89fabb3a375293edaecfa5652
parent33253d9e01d40542f07aaf718a655893cd2949e5
fbdev: Warn on incorrect framebuffer access

Test in framebuffer read, write and drawing helpers if FBINFO_VIRTFB
has been set correctly. Framebuffers in I/O memory should only be
accessed with the architecture's respective helpers. Framebuffers
in system memory should be accessed with the regular load and
store operations. Presumably not all drivers get this right, so we
now warn about it.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231127131655.4020-32-tzimmermann@suse.de
drivers/video/fbdev/core/cfbcopyarea.c
drivers/video/fbdev/core/cfbfillrect.c
drivers/video/fbdev/core/cfbimgblt.c
drivers/video/fbdev/core/fb_io_fops.c
drivers/video/fbdev/core/fb_sys_fops.c
drivers/video/fbdev/core/syscopyarea.c
drivers/video/fbdev/core/sysfillrect.c
drivers/video/fbdev/core/sysimgblt.c
include/linux/fb.h