drm/amd/display: check surface size is at least as large as stream

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>
This commit is contained in:
Leon Elazar 2017-01-17 16:16:04 -05:00 committed by Alex Deucher
parent cad3c7a997
commit 9c1a57d79d
2 changed files with 4 additions and 4 deletions

View 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)

View 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)