Commit a23299bb authored by Jani Nikula's avatar Jani Nikula

drm/i915/fdi: use -EAGAIN instead of local special return value

Using standard -EAGAIN should be perfectly fine instead of using a
special case value.
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210930093229.28598-1-jani.nikula@intel.com
parent 7d8de8ca
...@@ -7555,12 +7555,7 @@ intel_modeset_pipe_config(struct intel_atomic_state *state, ...@@ -7555,12 +7555,7 @@ intel_modeset_pipe_config(struct intel_atomic_state *state,
ret = intel_crtc_compute_config(to_intel_crtc(crtc), pipe_config); ret = intel_crtc_compute_config(to_intel_crtc(crtc), pipe_config);
if (ret == -EDEADLK) if (ret == -EDEADLK)
return ret; return ret;
if (ret < 0) { if (ret == -EAGAIN) {
drm_dbg_kms(&i915->drm, "CRTC fixup failed\n");
return ret;
}
if (ret == I915_DISPLAY_CONFIG_RETRY) {
if (drm_WARN(&i915->drm, !retry, if (drm_WARN(&i915->drm, !retry,
"loop in pipe configuration computation\n")) "loop in pipe configuration computation\n"))
return -EINVAL; return -EINVAL;
...@@ -7569,6 +7564,10 @@ intel_modeset_pipe_config(struct intel_atomic_state *state, ...@@ -7569,6 +7564,10 @@ intel_modeset_pipe_config(struct intel_atomic_state *state,
retry = false; retry = false;
goto encoder_retry; goto encoder_retry;
} }
if (ret < 0) {
drm_dbg_kms(&i915->drm, "CRTC fixup failed\n");
return ret;
}
/* Dithering seems to not pass-through bits correctly when it should, so /* Dithering seems to not pass-through bits correctly when it should, so
* only enable it on 6bpc panels and when its not a compliance * only enable it on 6bpc panels and when its not a compliance
......
...@@ -267,7 +267,7 @@ int ilk_fdi_compute_config(struct intel_crtc *crtc, ...@@ -267,7 +267,7 @@ int ilk_fdi_compute_config(struct intel_crtc *crtc,
} }
if (needs_recompute) if (needs_recompute)
return I915_DISPLAY_CONFIG_RETRY; return -EAGAIN;
return ret; return ret;
} }
......
...@@ -12,7 +12,6 @@ struct intel_crtc; ...@@ -12,7 +12,6 @@ struct intel_crtc;
struct intel_crtc_state; struct intel_crtc_state;
struct intel_encoder; struct intel_encoder;
#define I915_DISPLAY_CONFIG_RETRY 1
int intel_fdi_link_freq(struct drm_i915_private *i915, int intel_fdi_link_freq(struct drm_i915_private *i915,
const struct intel_crtc_state *pipe_config); const struct intel_crtc_state *pipe_config);
int ilk_fdi_compute_config(struct intel_crtc *intel_crtc, int ilk_fdi_compute_config(struct intel_crtc *intel_crtc,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment