Re: [Mesa-dev] [PATCH v4 07/11] amdgpu: use common screen ref counting

2017-01-09 Thread Emil Velikov
On 29 July 2016 at 20:08, Marek Olšák wrote: > On Fri, Jul 29, 2016 at 8:01 PM, Rob Herring wrote: >> On Fri, Jul 29, 2016 at 12:51 PM, Marek Olšák wrote: >>> The fd table and reference counting in the winsys is required by the >>> GL-VDPAU interop. >>> >>> radeon_drm_winsys_create and amdgpu_wi

Re: [Mesa-dev] [PATCH v4 07/11] amdgpu: use common screen ref counting

2016-07-29 Thread Marek Olšák
On Fri, Jul 29, 2016 at 8:01 PM, Rob Herring wrote: > On Fri, Jul 29, 2016 at 12:51 PM, Marek Olšák wrote: >> The fd table and reference counting in the winsys is required by the >> GL-VDPAU interop. >> >> radeon_drm_winsys_create and amdgpu_winsys_create are publicly >> exported by both *_dri.so

Re: [Mesa-dev] [PATCH v4 07/11] amdgpu: use common screen ref counting

2016-07-29 Thread Rob Herring
On Fri, Jul 29, 2016 at 12:51 PM, Marek Olšák wrote: > The fd table and reference counting in the winsys is required by the > GL-VDPAU interop. > > radeon_drm_winsys_create and amdgpu_winsys_create are publicly > exported by both *_dri.so and libvdpau_*.so, and whichever is loaded > first will eff

Re: [Mesa-dev] [PATCH v4 07/11] amdgpu: use common screen ref counting

2016-07-29 Thread Marek Olšák
The fd table and reference counting in the winsys is required by the GL-VDPAU interop. radeon_drm_winsys_create and amdgpu_winsys_create are publicly exported by both *_dri.so and libvdpau_*.so, and whichever is loaded first will effectively provide the gallium driver implementation for both of th

Re: [Mesa-dev] [PATCH v4 07/11] amdgpu: use common screen ref counting

2016-07-26 Thread Emil Velikov
On 22 July 2016 at 17:22, Rob Herring wrote: > /* Set functions. */ > - ws->base.unref = amdgpu_winsys_unref; With this in place we're NULL refer in the driver(s). Although you've removed the callers with next patch, IMHO it's worth adding a NULL check here ? -Emil

[Mesa-dev] [PATCH v4 07/11] amdgpu: use common screen ref counting

2016-07-22 Thread Rob Herring
Use the common pipe_screen ref count. amdgpu is unique in its hashing the dev pointer rather than the fd, so the common fd hashing cannot be used. However, the same reference count can be used instead of the private one. The mutex can be dropped as the pipe loader protects the create_screen() calls