]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/amd/display: check surface size is at least as large as stream
authorLeon Elazar <leon.elazar@amd.com>
Tue, 17 Jan 2017 21:16:04 +0000 (16:16 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 26 Sep 2017 21:11:38 +0000 (17:11 -0400)
Signed-off-by: Leon Elazar <leon.elazar@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c
drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c

index 82cddb6425a017a0eeed77b4a57fd3509bfda591..0b8f8927162f0a49c0e9f467044e8a068dddebb6 100644 (file)
@@ -967,9 +967,9 @@ static bool dce110_validate_surface_sets(
                        return false;
 
                if (set[i].surfaces[0]->src_rect.width
-                               != set[i].stream->src.width
+                               < set[i].stream->src.width
                                || set[i].surfaces[0]->src_rect.height
-                               != set[i].stream->src.height)
+                               < set[i].stream->src.height)
                        return false;
                if (set[i].surfaces[0]->format
                                >= SURFACE_PIXEL_FORMAT_VIDEO_BEGIN)
index fa8699d3b9efd6fb82c750e53f35066406467f11..7c12185b1dbe5905e2684b7428093bb16763cb79 100644 (file)
@@ -966,9 +966,9 @@ static bool dce112_validate_surface_sets(
                        return false;
 
                if (set[i].surfaces[0]->clip_rect.width
-                               != set[i].stream->src.width
+                               < set[i].stream->src.width
                                || set[i].surfaces[0]->clip_rect.height
-                               != set[i].stream->src.height)
+                               < set[i].stream->src.height)
                        return false;
                if (set[i].surfaces[0]->format
                                >= SURFACE_PIXEL_FORMAT_VIDEO_BEGIN)