[Intel-xe] [PATCH 5/9] fixup! drm/xe/display: Implement display support

Jani Nikula jani.nikula at intel.com
Fri Aug 11 09:35:55 UTC 2023


With "drm/i915/irq: add dedicated intel_display_irq_init()" we can ditch
the xe local copy of the same function. It's also called as part of
intel_display_driver_early_probe(), so there's no need to call it from
xe_display_init_nommio(). This changes the init order for xe, as the
call is moved to xe_display_init_noirq() i.e. a bit later. I don't think
it should make a diffence. *fingers crossed*

With "drm/i915/irq: move all PCH irq postinstall calls to display code"
it's no longer necessary to call icp_irq_postinstall() and
gen11_de_irq_postinstall() separately. Drop
gen11_display_irq_postinstall() and call gen11_de_irq_postinstall()
directly.

Signed-off-by: Jani Nikula <jani.nikula at intel.com>
---
 drivers/gpu/drm/xe/display/ext/i915_irq.c | 36 -----------------------
 drivers/gpu/drm/xe/display/ext/i915_irq.h |  4 ---
 drivers/gpu/drm/xe/xe_display.c           |  3 +-
 3 files changed, 1 insertion(+), 42 deletions(-)

diff --git a/drivers/gpu/drm/xe/display/ext/i915_irq.c b/drivers/gpu/drm/xe/display/ext/i915_irq.c
index df543f1cbfba..216cd6e6e7e3 100644
--- a/drivers/gpu/drm/xe/display/ext/i915_irq.c
+++ b/drivers/gpu/drm/xe/display/ext/i915_irq.c
@@ -6,10 +6,7 @@
 #include "i915_drv.h"
 #include "i915_irq.h"
 #include "i915_reg.h"
-#include "intel_display_irq.h"
-#include "intel_display_types.h"
 #include "intel_hotplug.h"
-#include "intel_hotplug_irq.h"
 #include "intel_uncore.h"
 
 void gen3_irq_reset(struct intel_uncore *uncore, i915_reg_t imr,
@@ -67,39 +64,6 @@ void gen3_irq_init(struct intel_uncore *uncore,
  * and related files, but that will be described in separate chapters.
  */
 
-void gen11_display_irq_postinstall(struct drm_i915_private *dev_priv)
-{
-	if (!HAS_DISPLAY(dev_priv))
-		return;
-
-	if (INTEL_PCH_TYPE(dev_priv) >= PCH_ICP)
-		icp_irq_postinstall(dev_priv);
-
-	gen11_de_irq_postinstall(dev_priv);
-}
-
-void intel_display_irq_init(struct drm_i915_private *dev_priv)
-{
-	struct drm_device *dev = &dev_priv->drm;
-
-	if (!HAS_DISPLAY(dev_priv))
-		return;
-
-	dev->vblank_disable_immediate = true;
-
-	/* Most platforms treat the display irq block as an always-on
-	 * power domain. vlv/chv can disable it at runtime and need
-	 * special care to avoid writing any of the display block registers
-	 * outside of the power domain. We defer setting up the display irqs
-	 * in this case to the runtime pm.
-	 */
-	dev_priv->display_irqs_enabled = true;
-	if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
-		dev_priv->display_irqs_enabled = false;
-
-	intel_hotplug_irq_init(dev_priv);
-}
-
 void intel_display_irq_uninstall(struct drm_i915_private *dev_priv)
 {
 	intel_hpd_cancel_work(dev_priv);
diff --git a/drivers/gpu/drm/xe/display/ext/i915_irq.h b/drivers/gpu/drm/xe/display/ext/i915_irq.h
index 3df524bbbecf..d7931139d4cd 100644
--- a/drivers/gpu/drm/xe/display/ext/i915_irq.h
+++ b/drivers/gpu/drm/xe/display/ext/i915_irq.h
@@ -13,8 +13,6 @@
 struct drm_i915_private;
 struct intel_uncore;
 
-void intel_display_irq_init(struct drm_i915_private *dev_priv);
-
 bool intel_irqs_enabled(struct drm_i915_private *dev_priv);
 void intel_synchronize_irq(struct drm_i915_private *i915);
 
@@ -28,8 +26,6 @@ void gen3_irq_init(struct intel_uncore *uncore,
 		   i915_reg_t ier, u32 ier_val,
 		   i915_reg_t iir);
 
-void gen11_display_irq_postinstall(struct drm_i915_private *dev_priv);
-
 #define GEN8_IRQ_RESET_NDX(uncore, type, which) \
 ({ \
 	unsigned int which_ = which; \
diff --git a/drivers/gpu/drm/xe/xe_display.c b/drivers/gpu/drm/xe/xe_display.c
index ec7a654bf587..be4cd6ebbe83 100644
--- a/drivers/gpu/drm/xe/xe_display.c
+++ b/drivers/gpu/drm/xe/xe_display.c
@@ -155,7 +155,6 @@ int xe_display_init_nommio(struct xe_device *xe)
 
 	/* This must be called before any calls to HAS_PCH_* */
 	intel_detect_pch(xe);
-	intel_display_irq_init(xe);
 
 	err = intel_power_domains_init(xe);
 	if (err)
@@ -313,7 +312,7 @@ void xe_display_irq_postinstall(struct xe_device *xe, struct xe_gt *gt)
 		return;
 
 	if (gt->info.id == XE_GT0)
-		gen11_display_irq_postinstall(xe);
+		gen11_de_irq_postinstall(xe);
 }
 
 static void intel_suspend_encoders(struct xe_device *xe)
-- 
2.39.2



More information about the Intel-xe mailing list