winsys/amdgpu: Re-use amdgpu_screen_winsys when possible
authorMichel Dänzer <mdaenzer@redhat.com>
Mon, 6 Jan 2020 17:47:41 +0000 (18:47 +0100)
committerMichel Dänzer <michel@daenzer.net>
Thu, 23 Jan 2020 16:39:34 +0000 (17:39 +0100)
commitb60f5cbc15a99ddd9251bce40eae7d84c3a1c373
tree6dd11ebcb008172fb2d072903c94ebd199c35a29
parentf76cbc7901f7d500f5a4f74aedfd29970d1efd00
winsys/amdgpu: Re-use amdgpu_screen_winsys when possible

Namely, if os_same_file_description determined that the DRM file
descriptor references the same file description.

v2:
* Adapt to amdgpu_winsys::sws_list_lock.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3202>
src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
src/gallium/winsys/amdgpu/drm/amdgpu_winsys.h