OSDN Git Service

winsys/amdgpu: Only re-export KMS handles for different DRM FDs
authorMichel Dänzer <mdaenzer@redhat.com>
Mon, 23 Dec 2019 17:51:57 +0000 (18:51 +0100)
committerMichel Dänzer <michel@daenzer.net>
Thu, 23 Jan 2020 16:39:34 +0000 (17:39 +0100)
commitc6468f66c7a47f0e16df2f1200db33eef6d2d1f4
tree888194e004d35229f34c1d8cf78561ab3b40fb44
parent24075ac60fcc09dad173cb792e8f186c6379c086
winsys/amdgpu: Only re-export KMS handles for different DRM FDs

When the amdgpu_screen_winsys uses the same FD as the amdgpu_winsys
(which is always the case for the first amdgpu_screen_winsys), we can
just use bo->u.real.kms_handle.

v2:
* Also only create the kms_handles hash table if the
  amdgpu_screen_winsys fd is different from the amdgpu_winsys one.

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_bo.c
src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
src/gallium/winsys/amdgpu/drm/amdgpu_winsys.h