[Intel-xe] [PATCH 6/6] drm/xe: Fixup __intel_de_wait_for_register macro.

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Fri Mar 31 10:24:19 UTC 2023


Create a dummy when output reg is null, this is required for the changes
to MTL display support.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
---
 drivers/gpu/drm/xe/display/xe_de.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/xe/display/xe_de.h b/drivers/gpu/drm/xe/display/xe_de.h
index 9f92fdb4159a..ce42e2938a06 100644
--- a/drivers/gpu/drm/xe/display/xe_de.h
+++ b/drivers/gpu/drm/xe/display/xe_de.h
@@ -70,6 +70,10 @@ __intel_de_wait_for_register(struct drm_i915_private *i915, i915_reg_t reg,
 			     unsigned int fast_timeout_us,
 			     unsigned int slow_timeout_ms, u32 *out_value)
 {
+	u32 dummy;
+	if (!out_value)
+		out_value = &dummy;
+
 	return wait_for_atomic(((*out_value = xe_mmio_read32(to_gt(i915), reg.reg)) & mask) == value,
 			slow_timeout_ms);
 }
-- 
2.34.1



More information about the Intel-xe mailing list