[PATCH 24/72] drm/i915/display: Inject a failure into the initial modeset

Chris Wilson chris at chris-wilson.co.uk
Sat Dec 12 16:57:55 UTC 2020


Experiment with how fault tolerant we are if the initial modeset fails
and we need to abort the driver load.

Suggested-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_display.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 761be8deaa9b..71966472a3fb 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -18495,8 +18495,12 @@ static int intel_initial_commit(struct drm_device *dev)
 		}
 	}
 
-	ret = drm_atomic_commit(state);
+	if (i915_inject_probe_failure(to_i915(dev))) {
+		ret = -ENODEV;
+		goto out;
+	}
 
+	ret = drm_atomic_commit(state);
 out:
 	if (ret == -EDEADLK) {
 		drm_atomic_state_clear(state);
-- 
2.20.1



More information about the Intel-gfx-trybot mailing list