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

Emil Velikov emil.l.velikov at gmail.com
Fri Jun 17 18:56:49 UTC 2016


On 17 June 2016 at 19:28, Rob Clark <robdclark at gmail.com> wrote:
> On Fri, Jun 17, 2016 at 2:23 PM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
>> Hi Rob,
>>
>> On 17 June 2016 at 18:45, Rob Herring <robh at kernel.org> wrote:
>>
>>>  struct pipe_screen {
>>> +   int refcnt;
>> Can you please use struct pipe_reference throughout and the respective
>> pipe_reference API from src/gallium/auxiliary/util/u_inlines.h.
>
> jfyi, the original per-driver implementation didn't use pipe_reference
> since (iirc) there were some assumptions somewhere or other that
> pipe_reference was the first struct member.
Precisely - the pipe_reference member must be the first one in the
struct. There aren't any other assumptions/reasons that I know of.

>  But yeah, now that we can
> move it to the top of pipe_screen, we should do it properly
>
... and since Rob was (such a star) to moved it at start of
pipe_screen I've went ahead and pushed my luck - suggesting
pipe_reference.
If he's not interested/doesn't have time that's fine. Things should
work without it afaict.

Thanks
Emil


More information about the mesa-dev mailing list