提交 e7b1322e 编写于 作者: C Corbin McElhanney 提交者: Alex Deucher

drm/amd/display: Don't update surface if dimensions are 0

Signed-off-by: NCorbin McElhanney <corbin.mcelhanney@amd.com>
Reviewed-by: NTony Cheng <Tony.Cheng@amd.com>
Acked-by: NHarry Wentland <Harry.Wentland@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 9c42df59
......@@ -1250,8 +1250,15 @@ void dc_update_surfaces_and_stream(struct dc *dc,
}
}
/* only proceed if we need to make a surface update */
if (!srf_updates)
/* do not perform surface update if surface has invalid dimensions
* (all zero) and no scaling_info is provided
*/
if (surface_count > 0 &&
srf_updates->surface->src_rect.width == 0 &&
srf_updates->surface->src_rect.height == 0 &&
srf_updates->surface->dst_rect.width == 0 &&
srf_updates->surface->dst_rect.height == 0 &&
!srf_updates->scaling_info)
return;
update_type = dc_check_update_surfaces_for_stream(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册