Module: Mesa
Branch: staging/21.0
Commit: 5bcbe14854d2686c186930056cf137cf7a13db3e
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5bcbe14854d2686c186930056cf137cf7a13db3e

Author: Icecream95 <[email protected]>
Date:   Mon Mar  1 10:51:45 2021 +1300

pipe-loader,gallium/drm: Fix the kmsro pipe_loader target

Include drm_helper.h to define the driver descriptor again, but with a
new define GALLIUM_KMSRO_ONLY to disable defining descriptors for the
drivers that kmsro uses.

Fixes clinfo on Panfrost.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4002
Fixes: 9ec28b8d226 ("gallium/drm: Deduplicate screen creation for the dynamic 
(clover) pipe loader.")
Acked-by: Eric Anholt <[email protected]>
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9380>
(cherry picked from commit 06a883cfe55751a19a73b6915de63c2eaf6c42b4)

---

 .pick_status.json                                 | 2 +-
 src/gallium/auxiliary/target-helpers/drm_helper.h | 9 +++++++++
 src/gallium/targets/pipe-loader/pipe_kmsro.c      | 2 ++
 3 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index be1a9e301f1..b2b003361ee 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -382,7 +382,7 @@
         "description": "pipe-loader,gallium/drm: Fix the kmsro pipe_loader 
target",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "9ec28b8d226558aa2748dbf813b125f8938a09cc"
     },
diff --git a/src/gallium/auxiliary/target-helpers/drm_helper.h 
b/src/gallium/auxiliary/target-helpers/drm_helper.h
index ef872fc10b2..6bab07a40e7 100644
--- a/src/gallium/auxiliary/target-helpers/drm_helper.h
+++ b/src/gallium/auxiliary/target-helpers/drm_helper.h
@@ -60,6 +60,15 @@ const struct drm_driver_descriptor descriptor_name = {       
  \
 
 #endif
 
+#ifdef GALLIUM_KMSRO_ONLY
+#undef GALLIUM_V3D
+#undef GALLIUM_VC4
+#undef GALLIUM_FREEDRENO
+#undef GALLIUM_ETNAVIV
+#undef GALLIUM_PANFROST
+#undef GALLIUM_LIMA
+#endif
+
 #ifdef GALLIUM_I915
 #include "i915/drm/i915_drm_public.h"
 #include "i915/i915_public.h"
diff --git a/src/gallium/targets/pipe-loader/pipe_kmsro.c 
b/src/gallium/targets/pipe-loader/pipe_kmsro.c
index 86e82e9a94b..4110517d923 100644
--- a/src/gallium/targets/pipe-loader/pipe_kmsro.c
+++ b/src/gallium/targets/pipe-loader/pipe_kmsro.c
@@ -2,3 +2,5 @@
 #include "target-helpers/inline_debug_helper.h"
 #include "frontend/drm_driver.h"
 #include "kmsro/drm/kmsro_drm_public.h"
+#define GALLIUM_KMSRO_ONLY
+#include "target-helpers/drm_helper.h"

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to