summaryrefslogtreecommitdiffstats
path: root/drivers/video/fbdev/core/fb_chrdev.c
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2023-11-27 14:15:58 +0100
committerThomas Zimmermann <tzimmermann@suse.de>2023-11-29 12:20:44 +0100
commit76f92201b821dd2f442ebe37ec9b52b525855bac (patch)
tree156abcd154eb74b08493323ecfdeca50b40daa76 /drivers/video/fbdev/core/fb_chrdev.c
parent23dad7b95fea68426311405a0627b90c06c3fc34 (diff)
downloadlinux-stable-76f92201b821dd2f442ebe37ec9b52b525855bac.tar.gz
linux-stable-76f92201b821dd2f442ebe37ec9b52b525855bac.tar.bz2
linux-stable-76f92201b821dd2f442ebe37ec9b52b525855bac.zip
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
Diffstat (limited to 'drivers/video/fbdev/core/fb_chrdev.c')
-rw-r--r--drivers/video/fbdev/core/fb_chrdev.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/video/fbdev/core/fb_chrdev.c b/drivers/video/fbdev/core/fb_chrdev.c
index 32a7315b4b6d..b73a122950a9 100644
--- a/drivers/video/fbdev/core/fb_chrdev.c
+++ b/drivers/video/fbdev/core/fb_chrdev.c
@@ -325,11 +325,6 @@ static int fb_mmap(struct file *file, struct vm_area_struct *vma)
if (info->fbops->fb_mmap) {
int res;
- /*
- * The framebuffer needs to be accessed decrypted, be sure
- * SME protection is removed ahead of the call
- */
- vma->vm_page_prot = pgprot_decrypted(vma->vm_page_prot);
res = info->fbops->fb_mmap(info, vma);
mutex_unlock(&info->mm_lock);
return res;