[PATCH 03/11] drm/amd/display: check surface size is at least as large as stream
Harry Wentland
harry.wentland at amd.com
Tue Jan 24 14:25:19 UTC 2017
From: Leon Elazar <leon.elazar at amd.com>
Change-Id: Ifd9624e886da98bf1da27cad550faf202c679323
Signed-off-by: Leon Elazar <leon.elazar 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/dce110/dce110_resource.c | 4 ++--
drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c
index 82cddb6425a0..0b8f8927162f 100644
--- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c
@@ -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)
diff --git a/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c b/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c
index fa8699d3b9ef..7c12185b1dbe 100644
--- a/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c
@@ -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)
--
2.9.3
More information about the amd-gfx
mailing list