[Intel-gfx] [RFC PATCH 16/20] drm/i915/regs: Set DISPLAY_MMIO_BASE to 0 for xe

Matthew Brost matthew.brost at intel.com
Thu Dec 22 22:21:23 UTC 2022


From: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>

Only required for some old pre-gen9 platforms, not for Xe.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
---
 drivers/gpu/drm/i915/Makefile                         | 2 +-
 drivers/gpu/drm/i915/display/intel_display_reg_defs.h | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
index f47f00b162a4..a6e7cd2185c2 100644
--- a/drivers/gpu/drm/i915/Makefile
+++ b/drivers/gpu/drm/i915/Makefile
@@ -12,7 +12,7 @@
 # Note the danger in using -Wall -Wextra is that when CI updates gcc we
 # will most likely get a sudden build breakage... Hopefully we will fix
 # new warnings before CI updates!
-subdir-ccflags-y := -Wall -Wextra
+subdir-ccflags-y := -Wall -Wextra -DI915
 subdir-ccflags-y += -Wno-format-security
 subdir-ccflags-y += -Wno-unused-parameter
 subdir-ccflags-y += -Wno-type-limits
diff --git a/drivers/gpu/drm/i915/display/intel_display_reg_defs.h b/drivers/gpu/drm/i915/display/intel_display_reg_defs.h
index 02605418ff08..e163eedd8ffd 100644
--- a/drivers/gpu/drm/i915/display/intel_display_reg_defs.h
+++ b/drivers/gpu/drm/i915/display/intel_display_reg_defs.h
@@ -8,7 +8,11 @@
 
 #include "i915_reg_defs.h"
 
+#ifdef I915
 #define DISPLAY_MMIO_BASE(dev_priv)	(INTEL_INFO(dev_priv)->display.mmio_offset)
+#else
+#define DISPLAY_MMIO_BASE(dev_priv)    ((dev_priv) ? 0U : 0U)
+#endif
 
 #define VLV_DISPLAY_BASE		0x180000
 
-- 
2.37.3



More information about the Intel-gfx mailing list