[Intel-gfx] [PATCH 10/11] drm/i915: move modeset probe failures down to intel_display.c

Jani Nikula jani.nikula at intel.com
Mon Oct 7 15:09:35 UTC 2019


Makes more sense, facilitates further cleanup.

Signed-off-by: Jani Nikula <jani.nikula at intel.com>
---
 drivers/gpu/drm/i915/display/intel_display.c | 6 ++++++
 drivers/gpu/drm/i915/i915_drv.c              | 6 ------
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index db79faffa7c7..f4b9d4e29edc 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -16193,6 +16193,9 @@ int intel_modeset_init_noirq(struct drm_i915_private *i915)
 {
 	int ret;
 
+	if (i915_inject_probe_failure(i915))
+		return -ENODEV;
+
 	if (HAS_DISPLAY(i915) && INTEL_DISPLAY_ENABLED(i915)) {
 		ret = drm_vblank_init(&i915->drm,
 				      INTEL_NUM_PIPES(i915));
@@ -16240,6 +16243,9 @@ int intel_modeset_init_nogem(struct drm_i915_private *i915)
 	struct intel_crtc *crtc;
 	int ret;
 
+	if (i915_inject_probe_failure(i915))
+		return -ENODEV;
+
 	intel_init_pm(i915);
 
 	intel_panel_sanitize_ssc(i915);
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index d092cc130acf..5a778944d7a8 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -272,9 +272,6 @@ intel_teardown_mchbar(struct drm_i915_private *dev_priv)
 /* part #1: call before irq install */
 static int i915_driver_modeset_probe_noirq(struct drm_i915_private *i915)
 {
-	if (i915_inject_probe_failure(i915))
-		return -ENODEV;
-
 	return intel_modeset_init_noirq(i915);
 }
 
@@ -283,9 +280,6 @@ static int i915_driver_modeset_probe(struct drm_i915_private *i915)
 {
 	int ret;
 
-	if (i915_inject_probe_failure(i915))
-		return -ENODEV;
-
 	/* Important: The output setup functions called by modeset_init need
 	 * working irqs for e.g. gmbus and dp aux transfers. */
 	ret = intel_modeset_init_nogem(i915);
-- 
2.20.1



More information about the Intel-gfx mailing list