Thread (5 messages) 5 messages, 2 authors, 2020-11-10

Re: [PATCH] drm: remove pgprot_decrypted() before calls to io_remap_pfn_range()

flat view

From: Daniel Vetter <hidden>
Date: 2020-11-10 12:55:00
Also in: dri-devel

On Thu, Nov 05, 2020 at 03:35:54PM -0400, Jason Gunthorpe wrote:
On Thu, Nov 05, 2020 at 08:17:46PM +0100, Daniel Vetter wrote:
quoted
On Thu, Nov 05, 2020 at 01:00:19PM -0400, Jason Gunthorpe wrote:
quoted
commit f8f6ae5d077a ("mm: always have io_remap_pfn_range() set
pgprot_decrypted()") moves the pgprot_decrypted() into
io_remap_pfn_range(). Delete any, now confusing, open coded calls that
directly precede io_remap_pfn_range():

- drm_io_prot() is only in drm_mmap_locked() to call io_remap_pfn_range()

- fb_mmap() immediately calls vm_iomap_memory() which is a convenience
  wrapper for io_remap_pfn_range()

Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
 drivers/gpu/drm/drm_vm.c         | 3 ---
 drivers/video/fbdev/core/fbmem.c | 5 -----
 2 files changed, 8 deletions(-)

rc3 will have the dependent patch, this should not be merged to DRM until it
has the rc3 commits.

There are three other pgprot_decrypted() calls in DRM, I could not figure out
what was what there, but other than very special cases I would expect code to
use io_remap_pfn_range() instead.
There's 4 now, I think linux-next added one. It's another io_remap_pfn

Of the three you mentioned we have:
- ttm and i915 use vm_insert_pfn (and ttm also can do also do pud_mkhuge
  entries)
You can't insert IO memory with vmf_insert_pfn_pmd_prot() (it
doesn't set the special flag) so why does it need decrypted?
Well, see the other thread, we do ... :-/
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help