[PATCH xserver] prime: clean up slave bo properly. (v2)
Alex Goins
agoins at nvidia.com
Mon May 2 22:01:06 UTC 2016
-1 would be consistent with the invalid handle passed back from
glamor_fd_from_pixmap() when it fails.
It would probably be good to put PixmapUnshareSlavePixmap above the "Unref
the pixmap twice" comment to avoid separating the comment from the lines it
is describing.
Other than that, this looks good to me.
Thanks,
Alex
On Fri, 29 Apr 2016, Dave Airlie wrote:
> On 29 April 2016 at 17:56, Julien Cristau <jcristau at debian.org> wrote:
> > On Fri, Apr 29, 2016 at 15:54:28 +1000, Dave Airlie wrote:
> >
> >> This is an ABI break, in that we now pass NULL to a function
> >> that hasn't accepted it before.
> >>
> >> Alex Goins had a different patch for this but it wasn't symmetrical,
> >> it freed something in a very different place than it allocated it,
> >> this attempts to retain symmetry in the releasing of the backing bo.
> >>
> >> v2: use a new toplevel API, though it still passes NULL to something
> >> that wasn't expecting it.
> >>
> >> Signed-off-by: Dave Airlie <airlied at redhat.com>
> >
> > AIUI you're assuming the handle will never be 0, even though that's a
> > valid fd. Are we somehow sure that'll never happen?
> >
>
> In the X server I think we can pretty safely say fd 0 won't pop up,
>
> I could I suppose pass handle -1 instead.
>
> Dave.
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: https://lists.x.org/mailman/listinfo/xorg-devel
More information about the xorg-devel
mailing list