[Mesa-dev] [RFC 2/7] pipe-loader-drm: Add common pipe_screen refcounting

Rob Herring robh at kernel.org
Sat Jun 18 16:33:12 UTC 2016


On Fri, Jun 17, 2016 at 12:51 PM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> On Fri, Jun 17, 2016 at 1:45 PM, Rob Herring <robh at 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


More information about the mesa-dev mailing list