mirror of
https://github.com/torvalds/linux.git
synced 2024-11-19 10:31:48 +00:00
drm/i915: Handle -EDEADLK from ironlake_check_fdi_lanes()
ironlake_check_fdi_lanes() may try to grab some extra crtc locks. If that fails we need to propagate the -EDEADLK all the way up, and we shouldn't dump out the crtc state or other debug messages either since it wasn't the crtc state that caused the failure. Just hit this on my IVB: [drm:intel_atomic_check [i915]] checking fdi config on pipe C, lanes 3 [drm:intel_atomic_check [i915]] only 2 lanes on pipe C: required 3 lanes [drm:intel_atomic_check [i915]] fdi link bw constraint, reducing pipe bpp to 18 [drm:intel_atomic_check [i915]] checking fdi config on pipe C, lanes 2 [drm:intel_atomic_check [i915]] CRTC bw constrained, retrying [drm:intel_dp_compute_config [i915]] DP link computation with max lane count 4 max rate 270000 max bpp 18 pixel clock 185580KHz [drm:intel_dp_compute_config [i915]] DP lane count 4 clock 162000 bpp 18 [drm:intel_dp_compute_config [i915]] DP link rate required 417555 available 648000 [drm:intel_atomic_check [i915]] checking fdi config on pipe C, lanes 2 WARNING: CPU: 4 PID: 25115 at ../drivers/gpu/drm/drm_modeset_lock.c:241 drm_modeset_lock+0xbc/0xd0 [drm] ... WARNING: CPU: 4 PID: 25115 at ../drivers/gpu/drm/drm_modeset_lock.c:223 drm_modeset_drop_locks+0x4a/0x50 [drm] The warnings are from 'WARN_ON(ctx->contended)'. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20181107213522.17590-1-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak <imre.deak@intel.com>
This commit is contained in:
parent
eef4670ead
commit
8e2b4dffec
@ -6448,6 +6448,9 @@ retry:
|
||||
link_bw, &pipe_config->fdi_m_n, false);
|
||||
|
||||
ret = ironlake_check_fdi_lanes(dev, intel_crtc->pipe, pipe_config);
|
||||
if (ret == -EDEADLK)
|
||||
return ret;
|
||||
|
||||
if (ret == -EINVAL && pipe_config->pipe_bpp > 6*3) {
|
||||
pipe_config->pipe_bpp -= 2*3;
|
||||
DRM_DEBUG_KMS("fdi link bw constraint, reducing pipe bpp to %i\n",
|
||||
@ -11389,6 +11392,8 @@ encoder_retry:
|
||||
* pipe_config->pixel_multiplier;
|
||||
|
||||
ret = intel_crtc_compute_config(to_intel_crtc(crtc), pipe_config);
|
||||
if (ret == -EDEADLK)
|
||||
goto fail;
|
||||
if (ret < 0) {
|
||||
DRM_DEBUG_KMS("CRTC fixup failed\n");
|
||||
goto fail;
|
||||
@ -12526,6 +12531,8 @@ static int intel_atomic_check(struct drm_device *dev,
|
||||
}
|
||||
|
||||
ret = intel_modeset_pipe_config(crtc, pipe_config);
|
||||
if (ret == -EDEADLK)
|
||||
return ret;
|
||||
if (ret) {
|
||||
intel_dump_pipe_config(to_intel_crtc(crtc),
|
||||
pipe_config, "[failed]");
|
||||
|
Loading…
Reference in New Issue
Block a user