On Fri, Jun 17, 2016 at 12:51 PM, Ilia Mirkin <imir...@alum.mit.edu> wrote: > On Fri, Jun 17, 2016 at 1:45 PM, Rob Herring <r...@kernel.org> wrote: >> Some gallium drivers have implemented reference counting of pipe_screen >> to avoid creating multiple screens for a device. Move this into the >> pipe-loader where it can be shared. >> >> Not completely sure, but it should not necessary to dup() the fd as >> dri2_create_screen does that for us already. > > Definitely necessary for nouveau, pretty sure for everyone. See > commits a59f2bb17 and a98600b0eb.
Those 2 commits predate commit 13bccee87d63 which dup's the fd for the DRI2 ST before calling pipe loader functions. XA and vl_winsys_drm do the same. vl_winsys_dri opens the fd itself. I'm not sure about vl_winsys_dri3. d3dadapter9 appears to take ownership of the fd. So my conclusion is still that it shouldn't be necessary to dup the fd. Rob _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev