Commit f7f3cfee authored by Harry Wentland's avatar Harry Wentland Committed by Alex Deucher

drm/amd/display: fix crash with modesetting driver

They might call commit with ACTION_NOTHING without a mode.
We shouldn't crash but simply skip updating stream scaling
settings since scaling obviously didn't change without a
provided mode.
Signed-off-by: default avatarHarry Wentland <harry.wentland@amd.com>
Reviewed-by: default avatarAndrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Acked-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 94cd1f79
......@@ -638,6 +638,10 @@ static void update_stream_scaling_settings(
struct rect src = { 0 }; /* viewport in composition space*/
struct rect dst = { 0 }; /* stream addressable area */
/* no mode. nothing to be done */
if (!mode)
return;
/* Full screen scaling by default */
src.width = mode->hdisplay;
src.height = mode->vdisplay;
......
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