Re: [PATCH v3 1/2] drm/gem: drm_gem_dumb_map_offset(): reject dma-buf

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

 



On Fri, Aug 18, 2017 at 10:41:21AM -0700, Eric Anholt wrote:
> Noralf Trønnes <noralf@xxxxxxxxxxx> writes:
> > Den 18.08.2017 09.46, skrev Daniel Vetter:
> >> On Thu, Aug 17, 2017 at 06:21:30PM +0200, Noralf Trønnes wrote:
> >>> Reject mapping an imported dma-buf since is's an invalid use-case.
> >>>
> >>> Cc: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>
> >>> Cc: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
> >>> Cc: Sean Paul <seanpaul@xxxxxxxxxxxx>
> >>> Cc: Daniel Vetter <daniel.vetter@xxxxxxxx>
> >>> Signed-off-by: Noralf Trønnes <noralf@xxxxxxxxxxx>
> >> I think acks from someone using mali would be good too. amdgpu already has
> >> such checks, so I think on the desktop side we're ok.
> >>
> >> Acked-by: Daniel Vetter <daniel.vetter@xxxxxxxx>
> >>
> >> But I think this one here definitely needs a few more acks. I could break
> >> uabi if we're unlucky, so let's not rush it.
> >
> > Ok, I've CC'ed the affected parties to increase the odds that they look
> > at this. These are the drivers using drm_gem_dumb_map_offset()
> > (hopefully I got the list right):
> 
> If I understand the affected path right, this would break the PL111+VC4
> combination: PL111 makes (dumb) buffers for scanout, and VC4 imports
> them and uses them for rendering.  A vc4 glReadPixels of the window
> system buffer would map it and fail.

It only rejects the map call on dumb buffers, and mmap on imported dma-buf
tends to not really work well, or at least break a few abstractions. Are
you sure this works currently?
-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