Commit e5ff8e18 authored by Chris Wilson's avatar Chris Wilson 🤔
Browse files

sna: Skip restoring a mode for link-status=bad if the crtc was idle



If we do not have a mode (and bo) enabled on the crtc, then trying to
restore that bo ends up in a NULL pointer dereference.
Reported-by: Stanislav Lisovskiy's avatarStanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Signed-off-by: Chris Wilson's avatarChris Wilson <chris@chris-wilson.co.uk>
parent 746ab3bb
...@@ -5470,6 +5470,9 @@ output_retrain_link(struct sna *sna, struct sna_output *output) ...@@ -5470,6 +5470,9 @@ output_retrain_link(struct sna *sna, struct sna_output *output)
int crtc_x = crtc->offset & 0xffff; int crtc_x = crtc->offset & 0xffff;
int crtc_y = crtc->offset >> 16; int crtc_y = crtc->offset >> 16;
if (!crtc->bo)
return false;
return sna_crtc_flip(sna, crtc, crtc->bo, crtc_x, crtc_y); return sna_crtc_flip(sna, crtc, crtc->bo, crtc_x, crtc_y);
} }
......
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