summaryrefslogtreecommitdiff
path: root/src/intel/vulkan/anv_device.c
diff options
context:
space:
mode:
authorJosé Roberto de Souza <jose.souza@intel.com>2022-10-06 09:42:41 -0700
committerMarge Bot <emma+marge@anholt.net>2022-11-07 17:22:14 +0000
commit41ee836c9ab89ee7b1a1384b64a341d3876f9491 (patch)
treee3d13c749251ac8e28eb15f87969edf52c7b8aa2 /src/intel/vulkan/anv_device.c
parent29550bc50aef656afb99da7c45611767af0c3a6e (diff)
intel: Add and use intel_gem_can_render_on_fd()
Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19425>
Diffstat (limited to 'src/intel/vulkan/anv_device.c')
-rw-r--r--src/intel/vulkan/anv_device.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 48e445d2ea1..b1e6260131e 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -968,11 +968,8 @@ anv_physical_device_try_create(struct vk_instance *vk_instance,
if (instance->vk.enabled_extensions.KHR_display) {
master_fd = open(primary_path, O_RDWR | O_CLOEXEC);
if (master_fd >= 0) {
- int val;
- /* prod the device with a GETPARAM call which will fail if
- * we don't have permission to even render on this device
- */
- if (!intel_gem_get_param(master_fd, I915_PARAM_CHIPSET_ID, &val) || !val) {
+ /* fail if we don't have permission to even render on this device */
+ if (!intel_gem_can_render_on_fd(master_fd)) {
close(master_fd);
master_fd = -1;
}