radv: do not open random render node(s)
authorEmil Velikov <emil.velikov@collabora.com>
Thu, 1 Dec 2016 20:58:20 +0000 (20:58 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 15 Mar 2017 11:38:02 +0000 (11:38 +0000)
commit743315f2696d77bc731baefdc9433994d3a4cfb3
tree1bf67aa694be84bb1901b5333c2e560ba237b468
parent8ff2937dfa60dd86ed0ee0b5bfb3d80f5ab0ae7e
radv: do not open random render node(s)

drmGetDevices2() provides us with enough flexibility to build heuristics
upon. Opening a random node on the other hand will wake up the device,
regardless if it's the one we're interested or not.

v2: Rebase.
v3: Return VK_ERROR_INCOMPATIBLE_DRIVER for no devices (Ilia)

Cc: Michel Dänzer <michel.daenzer@amd.com>
Cc: Dave Airlie <airlied@redhat.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> (v1)
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> (v1)
Tested-by: Mike Lothian <mike@fireburn.co.uk>
src/amd/vulkan/radv_device.c