Module: Mesa
Branch: main
Commit: 5f5ccf4bec86907c9dd301c7f3e494a6537a24d5
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5f5ccf4bec86907c9dd301c7f3e494a6537a24d5

Author: Rob Clark <[email protected]>
Date:   Tue Feb 28 16:10:13 2023 -0800

turnip: Use libdrm shim

Signed-off-by: Rob Clark <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21636>

---

 src/freedreno/vulkan/tu_knl.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/src/freedreno/vulkan/tu_knl.c b/src/freedreno/vulkan/tu_knl.c
index 1ab4036867a..c953431bb14 100644
--- a/src/freedreno/vulkan/tu_knl.c
+++ b/src/freedreno/vulkan/tu_knl.c
@@ -8,9 +8,6 @@
  */
 
 #include <fcntl.h>
-#ifdef HAVE_LIBDRM
-#include <xf86drm.h>
-#endif
 
 #ifdef MAJOR_IN_MKDEV
 #include <sys/mkdev.h>
@@ -19,6 +16,8 @@
 #include <sys/sysmacros.h>
 #endif
 
+#include "util/libdrm.h"
+
 #include "tu_device.h"
 #include "tu_knl.h"
 
@@ -158,7 +157,6 @@ tu_physical_device_try_create(struct vk_instance 
*vk_instance,
                               struct _drmDevice *drm_device,
                               struct vk_physical_device **out)
 {
-#ifdef HAVE_LIBDRM
    struct tu_instance *instance =
       container_of(vk_instance, struct tu_instance, vk);
 
@@ -252,7 +250,4 @@ out:
    drmFreeVersion(version);
 
    return result;
-#else
-   return VK_ERROR_INCOMPATIBLE_DRIVER;
-#endif
 }

Reply via email to