Skip to content

Commit

Permalink
drm/i915/display: Do not re-enable PSR after it was marked as not rel…
Browse files Browse the repository at this point in the history
…iable

If a error happens and sink_not_reliable is set, PSR should be disabled
for good but that is not happening.
It would be disabled by the function handling the PSR error but then
on the next fastset it would be enabled again in
_intel_psr_post_plane_update().
It would only be disabled for good in the next modeset where has_psr
will be set false.

v2:
- release psr lock before continue

Fixes: 9ce5884e5139 ("drm/i915/display: Only keep PSR enabled if there is active planes")
Reported-by: Khaled Almahallawy <[email protected]>
Reported-by: Charlton Lin <[email protected]>
Cc: Jouni Högander <[email protected]>
Signed-off-by: José Roberto de Souza <[email protected]>
Reviewed-by: Jouni Högander <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit 15f26bdc81f7f03561aaea5a10d87bd6638e1459)
Signed-off-by: Joonas Lahtinen <[email protected]>
  • Loading branch information
zehortigoza authored and dumbbell committed Dec 12, 2023
1 parent 7636c55 commit 8504ae9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/gpu/drm/i915/display/intel_psr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1849,6 +1849,9 @@ static void _intel_psr_post_plane_update(const struct intel_atomic_state *state,

mutex_lock(&psr->lock);

if (psr->sink_not_reliable)
goto exit;

drm_WARN_ON(&dev_priv->drm, psr->enabled && !crtc_state->active_planes);

/* Only enable if there is active planes */
Expand All @@ -1859,6 +1862,7 @@ static void _intel_psr_post_plane_update(const struct intel_atomic_state *state,
if (crtc_state->crc_enabled && psr->enabled)
psr_force_hw_tracking_exit(intel_dp);

exit:
mutex_unlock(&psr->lock);
}
}
Expand Down

0 comments on commit 8504ae9

Please sign in to comment.