Commit 93a8955b authored by Eric Yang's avatar Eric Yang Committed by Alex Deucher

drm/amd/display: fix chroma vp wa corner case

[Why]
Previous implementation we may have residual chroma address offset
if transition from wa enable -> wa disable.

[How]
Clear address offset cache when viewport updates. Also update the
vp size check condition to account for rotation angle
Signed-off-by: default avatarEric Yang <Eric.Yang2@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Acked-by: default avatarHarry Wentland <harry.wentland@amd.com>
Acked-by: default avatarRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 30221e62
...@@ -251,10 +251,20 @@ static void hubp21_apply_PLAT_54186_wa( ...@@ -251,10 +251,20 @@ static void hubp21_apply_PLAT_54186_wa(
ROTATION_ANGLE, &rotation_angle, ROTATION_ANGLE, &rotation_angle,
H_MIRROR_EN, &h_mirror_en); H_MIRROR_EN, &h_mirror_en);
/* apply wa only for NV12 surface with scatter gather enabled with view port > 512 */ /* reset persistent cached data */
hubp21->PLAT_54186_wa_chroma_addr_offset = 0;
/* apply wa only for NV12 surface with scatter gather enabled with viewport > 512 along
* the vertical direction*/
if (address->type != PLN_ADDR_TYPE_VIDEO_PROGRESSIVE || if (address->type != PLN_ADDR_TYPE_VIDEO_PROGRESSIVE ||
address->video_progressive.luma_addr.high_part == 0xf4 address->video_progressive.luma_addr.high_part == 0xf4)
|| viewport_c_height <= 512) return;
if ((rotation_angle == 0 || rotation_angle == 180)
&& viewport_c_height <= 512)
return;
if ((rotation_angle == 90 || rotation_angle == 270)
&& viewport_c_width <= 512)
return; return;
switch (rotation_angle) { switch (rotation_angle) {
......
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