[PATCH 4/5] drm/udl: Map BO memory pages in unencrypted mode

Thomas Zimmermann tzimmermann at suse.de
Thu Oct 24 14:42:36 UTC 2019


The udl driver's fbdev code maps pages in unencrypted mode. To switch
over to generic fbdev emulation, we set this flag in the BO mapping code.

Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
---
 drivers/gpu/drm/udl/udl_gem.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/udl/udl_gem.c b/drivers/gpu/drm/udl/udl_gem.c
index 6ca097c270d6..68e4757e83f5 100644
--- a/drivers/gpu/drm/udl/udl_gem.c
+++ b/drivers/gpu/drm/udl/udl_gem.c
@@ -100,6 +100,9 @@ int udl_drm_gem_mmap(struct file *filp, struct vm_area_struct *vma)
 
 	update_vm_cache_attr(to_udl_bo(vma->vm_private_data), vma);
 
+	/* We don't want the framebuffer to be mapped encrypted */
+	vma->vm_page_prot = pgprot_decrypted(vma->vm_page_prot);
+
 	return ret;
 }
 
@@ -158,7 +161,7 @@ int udl_gem_vmap(struct udl_gem_object *obj)
 			return -ENOMEM;
 		return 0;
 	}
-		
+
 	ret = udl_gem_get_pages(obj);
 	if (ret)
 		return ret;
-- 
2.23.0



More information about the dri-devel mailing list