[Intel-gfx] [CI] drm/i915: Inject a failure point when registering a connector

Chris Wilson chris at chris-wilson.co.uk
Wed Oct 10 12:38:33 UTC 2018


Check we can handle a late display load failure where the final act of
registering the connector fails.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Jani Nikula <jani.nikula at linux.intel.com>
Cc: Ville Syrjala <ville.syrjala at linux.intel.com>
Cc: Daniel Vetter <daniel.vetter at intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
Acked-by: Jani Nikula <jani.nikula at linux.intel.com>
---
 drivers/gpu/drm/i915/intel_connector.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_connector.c b/drivers/gpu/drm/i915/intel_connector.c
index d56f50a6f5a0..598d5cb9b657 100644
--- a/drivers/gpu/drm/i915/intel_connector.c
+++ b/drivers/gpu/drm/i915/intel_connector.c
@@ -107,8 +107,15 @@ int intel_connector_register(struct drm_connector *connector)
 	if (ret)
 		goto err;
 
+	if (i915_inject_load_failure()) {
+		ret = -EFAULT;
+		goto err_backlight;
+	}
+
 	return 0;
 
+err_backlight:
+	intel_backlight_device_unregister(intel_connector);
 err:
 	return ret;
 }
-- 
2.19.1



More information about the Intel-gfx mailing list