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

Submitted by Jani Nikula on Oct. 7, 2019, 3:09 p.m.

Details

Message ID 25bf6bf7a482c698d236e02c12b686ee1d0fe79f.1570460714.git.jani.nikula@intel.com
State New
Headers show
Series "drm/i915: modeset probe/remove cleanup" ( rev: 1 ) in Intel GFX

Not browsing as part of any series.

Commit Message

Jani Nikula Oct. 7, 2019, 3:09 p.m.
Makes more sense, facilitates further cleanup.

Signed-off-by: Jani Nikula <jani.nikula@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(-)

Patch hide | download patch | download mbox

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);