Mesa (master): pipe-loader,gallium/drm: Fix the kmsro pipe_loader target

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Mar 29 23:31:48 UTC 2021


Module: Mesa
Branch: master
Commit: 06a883cfe55751a19a73b6915de63c2eaf6c42b4
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=06a883cfe55751a19a73b6915de63c2eaf6c42b4

Author: Icecream95 <ixn at disroot.org>
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 <eric at anholt.net>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9380>

---

 src/gallium/auxiliary/target-helpers/drm_helper.h | 9 +++++++++
 src/gallium/targets/pipe-loader/pipe_kmsro.c      | 2 ++
 2 files changed, 11 insertions(+)

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"



More information about the mesa-commit mailing list