fbdev: Push pgprot_decrypted() into mmap implementations
authorThomas Zimmermann <tzimmermann@suse.de>
Mon, 27 Nov 2023 13:15:58 +0000 (14:15 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Wed, 29 Nov 2023 11:20:44 +0000 (12:20 +0100)
commit76f92201b821dd2f442ebe37ec9b52b525855bac
tree156abcd154eb74b08493323ecfdeca50b40daa76
parent23dad7b95fea68426311405a0627b90c06c3fc34
fbdev: Push pgprot_decrypted() into mmap implementations

If a driver sets struct fb_ops.fb_mmap, the fbdev core automatically
calls pgprot_decrypted(). But the default fb_mmap code doesn't handle
pgprot_decrypted().

Move the call to pgprot_decrypted() into each drivers' fb_mmap function.
This only concerns fb_mmap functions for system and DMA memory. For
I/O memory, which is the default case, nothing changes. The fb_mmap
for I/O-memory can later be moved into a helper as well.

DRM's fbdev emulation handles pgprot_decrypted() internally via the
Prime helpers. Fbdev doesn't have to do anything in this case. In
cases where DRM uses deferred I/O, this patch updates fb_mmap correctly.

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-30-tzimmermann@suse.de
19 files changed:
drivers/auxdisplay/cfag12864bfb.c
drivers/auxdisplay/ht16k33.c
drivers/video/fbdev/amba-clcd.c
drivers/video/fbdev/au1100fb.c
drivers/video/fbdev/au1200fb.c
drivers/video/fbdev/core/fb_chrdev.c
drivers/video/fbdev/core/fb_defio.c
drivers/video/fbdev/ep93xx-fb.c
drivers/video/fbdev/gbefb.c
drivers/video/fbdev/omap/omapfb_main.c
drivers/video/fbdev/omap2/omapfb/omapfb-main.c
drivers/video/fbdev/ps3fb.c
drivers/video/fbdev/sa1100fb.c
drivers/video/fbdev/sbuslib.c
drivers/video/fbdev/sh_mobile_lcdcfb.c
drivers/video/fbdev/smscufx.c
drivers/video/fbdev/udlfb.c
drivers/video/fbdev/vermilion/vermilion.c
drivers/video/fbdev/vfb.c