From 556ee1b75c94cd88710e2fa8c83e2dc22717fc4f Mon Sep 17 00:00:00 2001 From: Corbin McElhanney Date: Thu, 1 Jun 2017 16:54:53 -0400 Subject: [PATCH] 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 --- drivers/gpu/drm/amd/display/dc/core/dc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c index 976229e..f5102b6 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); -- 2.7.4