[PATCH 11/27] drm/amd/display: Add assertion for invalid surface dimensions

Harry Wentland harry.wentland at amd.com
Fri Jun 9 20:11:24 UTC 2017


From: Corbin McElhanney <corbin.mcelhanney at amd.com>

Change-Id: Ie7e9e43fc522fcd35cc8eef11a021b1984b9c9c6
Signed-off-by: Corbin McElhanney <corbin.mcelhanney at amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng at amd.com>
Acked-by: Harry Wentland <Harry.Wentland at amd.com>
---
 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 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);
-- 
2.11.0



More information about the amd-gfx mailing list