[Mesa-dev] [RFC 7/7] radeon: remove screen ref counting

Nicolai Hähnle nhaehnle at gmail.com
Mon Jun 20 13:31:10 UTC 2016


On 17.06.2016 21:05, Rob Herring wrote:
> On Fri, Jun 17, 2016 at 1:45 PM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
>> On 17 June 2016 at 18:45, Rob Herring <robh at kernel.org> wrote:
>>> Now that the pipe-loader is reference counting the screen creation, it
>>> is unnecessary to do in it the winsys/driver.
>
> [...]
>
>>> -static unsigned hash_dev(void *key)
>>> -{
>>> -#if defined(PIPE_ARCH_X86_64)
>>> -   return pointer_to_intptr(key) ^ (pointer_to_intptr(key) >> 32);
>>> -#else
>>> -   return pointer_to_intptr(key);
>>> -#endif
>>> -}
>>> -
>> As you can see above the hashing algo is different for AMDGPU. Not
>> familiar with the story behind any of this, so hopefully the AMD folk
>> will give you some insights.
>
> They are also hashing the fd in libdrm amdgpu_device_initialize(), so
> I thought this was redundant (unless you have an old libdrm).

Correct. The idea is that there may be non-Mesa users of libdrm_amdgpu 
(in particular, the amdgpu-pro stack).

The hashing in libdrm is different as well, though, and apparently on 
purpose, see commit c68d58aa14b7f of libdrm. This might mean the series 
doesn't work as is. Christian or Marek might know more.

Cheers,
Nicolai


More information about the mesa-dev mailing list