linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/shmem: drop pgprot_decrypted()
@ 2020-02-28 10:47 Gerd Hoffmann
  2020-02-28 11:15 ` Thomas Hellström (VMware)
  0 siblings, 1 reply; 2+ messages in thread
From: Gerd Hoffmann @ 2020-02-28 10:47 UTC (permalink / raw)
  To: dri-devel
  Cc: thomas_os, Gerd Hoffmann, Maarten Lankhorst, Maxime Ripard,
	David Airlie, Daniel Vetter, open list

Was added by commit 95cf9264d5f3 ("x86, drm, fbdev: Do not specify
encrypted memory for video mappings"), then it was kept through various
changes.

While vram actually needs decrypted mappings this is not correct for
shmem gem objects which live in main memory not io memory, so remove the
call.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 drivers/gpu/drm/drm_gem_shmem_helper.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c b/drivers/gpu/drm/drm_gem_shmem_helper.c
index aad9324dcf4f..df31e5782eed 100644
--- a/drivers/gpu/drm/drm_gem_shmem_helper.c
+++ b/drivers/gpu/drm/drm_gem_shmem_helper.c
@@ -548,7 +548,6 @@ int drm_gem_shmem_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma)
 	vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
 	if (!shmem->map_cached)
 		vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
-	vma->vm_page_prot = pgprot_decrypted(vma->vm_page_prot);
 	vma->vm_ops = &drm_gem_shmem_vm_ops;
 
 	return 0;
-- 
2.18.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/shmem: drop pgprot_decrypted()
  2020-02-28 10:47 [PATCH] drm/shmem: drop pgprot_decrypted() Gerd Hoffmann
@ 2020-02-28 11:15 ` Thomas Hellström (VMware)
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Hellström (VMware) @ 2020-02-28 11:15 UTC (permalink / raw)
  To: Gerd Hoffmann, dri-devel; +Cc: David Airlie, open list

On 2/28/20 11:47 AM, Gerd Hoffmann wrote:
> Was added by commit 95cf9264d5f3 ("x86, drm, fbdev: Do not specify
> encrypted memory for video mappings"), then it was kept through various
> changes.
>
> While vram actually needs decrypted mappings this is not correct for
> shmem gem objects which live in main memory not io memory, so remove the
> call.
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>   drivers/gpu/drm/drm_gem_shmem_helper.c | 1 -
>   1 file changed, 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c b/drivers/gpu/drm/drm_gem_shmem_helper.c
> index aad9324dcf4f..df31e5782eed 100644
> --- a/drivers/gpu/drm/drm_gem_shmem_helper.c
> +++ b/drivers/gpu/drm/drm_gem_shmem_helper.c
> @@ -548,7 +548,6 @@ int drm_gem_shmem_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma)
>   	vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
>   	if (!shmem->map_cached)
>   		vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
> -	vma->vm_page_prot = pgprot_decrypted(vma->vm_page_prot);
>   	vma->vm_ops = &drm_gem_shmem_vm_ops;
>   
>   	return 0;

Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>

Thanks,

Thomas



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-28 11:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-28 10:47 [PATCH] drm/shmem: drop pgprot_decrypted() Gerd Hoffmann
2020-02-28 11:15 ` Thomas Hellström (VMware)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).