提交 f7f3cfee 编写于 作者: H Harry Wentland 提交者: 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: NHarry Wentland <harry.wentland@amd.com>
Reviewed-by: NAndrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Acked-by: NHarry Wentland <Harry.Wentland@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册