path: root/tests
diff options
authorMario Kleiner <>2015-07-29 21:09:04 +0200
committerAlex Deucher <>2015-07-30 00:11:13 -0400
commit77062850e930e4fa2d1748e96a2ccac4a3869197 (patch)
tree6d4bfcccd90655349257c084047e8dbe9cea310f /tests
parent13e8572c59027248dd901f057ee300fbbacf5c22 (diff)
libdrm/amdgpu: Use private fd for amdgpu_device and winsys hash table to fix ZaphodHeads. (v2)amdgpu
The amdgpu_device for a device node needs its own dup'ed fd, instead of using the original fd passed in for a screen, to make multi-x-screen ZaphodHeads configurations work on amdgpu. The original fd's lifetime differs from that of the amdgpu_device, and from the one stored in the hash. The hash key is the fd, and in order to compare hash entries we fstat them, so the fd must be around for as long as the amdgpu_device is. This patch for libdrm/amdgpu is a translation of the radeon-winsys ZaphodHeads fix for mesa's radeon-winsys, from mesa commit 28dda47ae4d974e3e032d60e8e0965c8c068c6d8 "winsys/radeon: Use dup fd as key in drm-winsys hash table to fix ZaphodHeads." Signed-off-by: Mario Kleiner <> Acked-by: Marek Olšák <> Reviewed-by: Christian König <> v2: Check for valid fd's being >= 0, because fd == 0 is in theory a valid, although unlikely, fd and fd == -1 would denote an invalid fd. Thanks to William Lewis for pointing this out. Reported-by: William Lewis <> Signed-off-by: Mario Kleiner <>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions