aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChad Versace <[email protected]>2018-11-12 14:13:13 -0800
committerChia-I Wu <[email protected]>2019-03-11 10:01:33 -0700
commitcca208a0330f72d1cba7f679cf78e1121ee23d7b (patch)
treed01f2ce31551fcfe1059d68e7b878c7894be73d6
parent5486943ed969ff421c7d4ab7fa35104bff668d74 (diff)
turnip: Require DRM device version >= 1.3
Because the driver will require support for iova.
-rw-r--r--src/freedreno/vulkan/tu_device.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/freedreno/vulkan/tu_device.c b/src/freedreno/vulkan/tu_device.c
index c5d94999600..f32868e9c81 100644
--- a/src/freedreno/vulkan/tu_device.c
+++ b/src/freedreno/vulkan/tu_device.c
@@ -87,6 +87,10 @@ tu_physical_device_init(struct tu_physical_device *device,
return vk_error(instance, VK_ERROR_INCOMPATIBLE_DRIVER);
}
+ /* Version 1.3 added MSM_INFO_IOVA. */
+ const int min_version_major = 1;
+ const int min_version_minor = 3;
+
version = drmGetVersion(fd);
if (!version) {
close(fd);
@@ -112,6 +116,19 @@ tu_physical_device_init(struct tu_physical_device *device,
return VK_ERROR_INCOMPATIBLE_DRIVER;
}
+
+ if (version->version_major != 1 || version->version_minor < 3) {
+ result = vk_errorf(instance, VK_ERROR_INCOMPATIBLE_DRIVER,
+ "kernel driver for device %s has version %d.%d, "
+ "but Vulkan requires version >= %d.%d",
+ path,
+ version->version_major, version->version_minor,
+ min_version_major, min_version_minor);
+ drmFreeVersion(version);
+ close(fd);
+ return result;
+ }
+
drmFreeVersion(version);
if (instance->debug_flags & TU_DEBUG_STARTUP)