Commit 1781958f authored by Leon Elazar's avatar Leon Elazar Committed by Alex Deucher

drm/amd/display: Surface Validation Fixes + Audio Mask

1. dc: Adding missing mask for audio register DCCG_AUDIO_DTO_SOURCE
2. Changing the surface validation to check the limits of the clip rect instead of the source rect.
Signed-off-by: default avatarLeon Elazar <leon.elazar@amd.com>
Acked-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 227d2518
......@@ -48,6 +48,7 @@
#define AUD_COMMON_MASK_SH_LIST_BASE(mask_sh)\
SF(DCCG_AUDIO_DTO_SOURCE, DCCG_AUDIO_DTO0_SOURCE_SEL, mask_sh),\
SF(DCCG_AUDIO_DTO_SOURCE, DCCG_AUDIO_DTO_SEL, mask_sh),\
SF(DCCG_AUDIO_DTO_SOURCE, DCCG_AUDIO_DTO2_USE_512FBR_DTO, mask_sh),\
SF(DCCG_AUDIO_DTO0_MODULE, DCCG_AUDIO_DTO0_MODULE, mask_sh),\
SF(DCCG_AUDIO_DTO0_PHASE, DCCG_AUDIO_DTO0_PHASE, mask_sh),\
SF(DCCG_AUDIO_DTO1_MODULE, DCCG_AUDIO_DTO1_MODULE, mask_sh),\
......
......@@ -1009,10 +1009,10 @@ static bool dce110_validate_surface_sets(
if (set[i].surface_count > 2)
return false;
if (set[i].surfaces[0]->src_rect.width
< set[i].stream->src.width
|| set[i].surfaces[0]->src_rect.height
< set[i].stream->src.height)
if (set[i].surfaces[0]->clip_rect.width
> set[i].stream->src.width
|| set[i].surfaces[0]->clip_rect.height
> set[i].stream->src.height)
return false;
if (set[i].surfaces[0]->format
>= SURFACE_PIXEL_FORMAT_VIDEO_BEGIN)
......
......@@ -975,9 +975,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)
......
......@@ -805,9 +805,9 @@ static bool dce80_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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment