Re: [PATCH] RFC: dma-buf: Require VM_SPECIAL vma for mmap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 4, 2021 at 9:09 PM Jason Gunthorpe <jgg@xxxxxxxx> wrote:
>
> On Thu, Feb 04, 2021 at 08:59:59PM +0100, Daniel Vetter wrote:
>
> > So I think just checking for VM_PFNMAP after the vma is set up should
> > be enough to guarantee we'll only have pte_special ptes in there,
> > ever. But I'm not sure, this stuff all isn't really documented much
> > and the code is sometimes a maze (to me at least).
>
> Yes, that makes sense. VM_PFNMAP and !VM_MIXEDMAP seems like the right
> check after the VMA is populated
>
> But how do you stuff special pfns into a VMA outside the fault
> handler?

Many drivers we have don't have dynamic buffer management (kinda
overkill for a few framebuffers on a display-only IP block), so the
just remap_pfn_range on ->mmap, and don't have a fault handler at all.

Or I'm not understanding what you're asking?
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux