From: Corbin McElhanney Date: Thu, 1 Jun 2017 20:54:53 +0000 (-0400) Subject: drm/amd/display: Add assertion for invalid surface dimensions X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=556ee1b75c94cd88710e2fa8c83e2dc22717fc4f;p=openwrt%2Fstaging%2Fblogic.git drm/amd/display: Add assertion for invalid surface dimensions Signed-off-by: Corbin McElhanney Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c index 976229eb2492..f5102b644942 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c @@ -1258,8 +1258,10 @@ void dc_update_surfaces_and_stream(struct dc *dc, 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) + !srf_updates->scaling_info) { + ASSERT(false); return; + } update_type = dc_check_update_surfaces_for_stream( dc, srf_updates, surface_count, stream_update, stream_status);