[Intel-gfx] [PATCH 1/3] drm/i915: Use standard form -EDEADLK check

Ville Syrjala ville.syrjala at linux.intel.com
Thu Sep 30 10:41:31 UTC 2021


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

Unify how we check for -EDEADLK vs. other errors from
crtc vs. encoder compute_config() calls.

Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_display.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index a4453dd1bb51..4fa0b7cfa888 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -7699,11 +7699,10 @@ intel_modeset_pipe_config(struct intel_atomic_state *state,
 
 		ret = encoder->compute_config(encoder, pipe_config,
 					      connector_state);
+		if (ret == -EDEADLK)
+			return ret;
 		if (ret < 0) {
-			if (ret != -EDEADLK)
-				drm_dbg_kms(&i915->drm,
-					    "Encoder config failure: %d\n",
-					    ret);
+			drm_dbg_kms(&i915->drm, "Encoder config failure: %d\n", ret);
 			return ret;
 		}
 	}
-- 
2.32.0



More information about the Intel-gfx mailing list