[PATCH 2/9] drm/i915: Add SCDC RR Interrupt Registers

Ankit Nautiyal ankit.k.nautiyal at intel.com
Mon Mar 7 05:38:58 UTC 2022


Add registers for detecting SCDC RR Interrupt

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal at intel.com>
---
 drivers/gpu/drm/i915/i915_drv.h | 15 +++++++++++++++
 drivers/gpu/drm/i915/i915_reg.h | 13 +++++++++++++
 2 files changed, 28 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 51417e9b740f..79f0a40713f6 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -148,6 +148,21 @@ struct i915_hotplug {
 	struct workqueue_struct *dp_wq;
 };
 
+enum scdc_pin {
+	SCDC_PORT_NONE,
+	SCDC_PORT_A,
+	SCDC_PORT_B,
+	SCDC_PORT_C,
+	SCDC_PORT_TC1,
+	SCDC_PORT_TC2,
+	SCDC_PORT_TC3,
+	SCDC_PORT_TC4,
+	SCDC_PORT_TC5,
+	SCDC_PORT_TC6,
+
+	SCDC_NUM_PINS
+};
+
 #define I915_GEM_GPU_DOMAINS \
 	(I915_GEM_DOMAIN_RENDER | \
 	 I915_GEM_DOMAIN_SAMPLER | \
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index cfd569684fa7..ab3f85a3cb0e 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -6068,6 +6068,19 @@
 					 SDE_TC_HOTPLUG_ICP(HPD_PORT_TC3) | \
 					 SDE_TC_HOTPLUG_ICP(HPD_PORT_TC2) | \
 					 SDE_TC_HOTPLUG_ICP(HPD_PORT_TC1))
+#define _SCDC_PIN_DDI(scdc_pin)	((scdc_pin) - SCDC_PORT_A)
+#define _SCDC_PIN_TC(scdc_pin)	((scdc_pin) - SCDC_PORT_TC1)
+#define SDE_DDI_SCDC_RR_ICP(scdc_pin)	REG_BIT(0 + _SCDC_PIN_DDI(scdc_pin))
+#define SDE_TC_SCDC_RR_ICP(scdc_pin)	REG_BIT(8 + _SCDC_PIN_TC(scdc_pin))
+#define SDE_DDI_SCDC_MASK_ICP		(SDE_DDI_SCDC_RR_ICP(SCDC_PORT_C) | \
+					 SDE_DDI_SCDC_RR_ICP(SCDC_PORT_B) | \
+					 SDE_DDI_SCDC_RR_ICP(SCDC_PORT_A))
+#define SDE_TC_SCDC_MASK_ICP		(SDE_TC_SCDC_RR_ICP(SCDC_PORT_TC6) | \
+					 SDE_TC_SCDC_RR_ICP(SCDC_PORT_TC5) | \
+					 SDE_TC_SCDC_RR_ICP(SCDC_PORT_TC4) | \
+					 SDE_TC_SCDC_RR_ICP(SCDC_PORT_TC3) | \
+					 SDE_TC_SCDC_RR_ICP(SCDC_PORT_TC2) | \
+					 SDE_TC_SCDC_RR_ICP(SCDC_PORT_TC1))
 
 #define SDEISR  _MMIO(0xc4000)
 #define SDEIMR  _MMIO(0xc4004)
-- 
2.25.1



More information about the Intel-gfx-trybot mailing list