Commit 5d74be8c authored by Samson Tam's avatar Samson Tam Committed by Alex Deucher

drm/amd/display: fix YUV video color corruption in DCN401

[Why]
Missing check causes sequence error which results in chroma
 filter coefficients not being updated in certain modes
 when we display YUV video in fullscreen.  This results in
 color corruption in video

[How]
Add back chroma_coef_mode check in dscl_set_scl_filter
 so that filter coefficients are calculated and updated when
 we have YUV surface
Reviewed-by: default avatarAlvin Lee <alvin.lee2@amd.com>
Acked-by: default avatarZaeem Mohamed <zaeem.mohamed@amd.com>
Signed-off-by: default avatarSamson Tam <samson.tam@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent dbe2c4c8
......@@ -297,17 +297,21 @@ static void dpp401_dscl_set_scl_filter(
if ((dpp->base.ctx->dc->config.use_spl) && (!dpp->base.ctx->dc->debug.disable_spl)) {
filter_h = scl_data->dscl_prog_data.filter_h;
filter_v = scl_data->dscl_prog_data.filter_v;
filter_h_c = scl_data->dscl_prog_data.filter_h_c;
filter_v_c = scl_data->dscl_prog_data.filter_v_c;
if (chroma_coef_mode) {
filter_h_c = scl_data->dscl_prog_data.filter_h_c;
filter_v_c = scl_data->dscl_prog_data.filter_v_c;
}
} else {
filter_h = dpp401_dscl_get_filter_coeffs_64p(
scl_data->taps.h_taps, scl_data->ratios.horz);
filter_v = dpp401_dscl_get_filter_coeffs_64p(
scl_data->taps.v_taps, scl_data->ratios.vert);
filter_h_c = dpp401_dscl_get_filter_coeffs_64p(
scl_data->taps.h_taps_c, scl_data->ratios.horz_c);
filter_v_c = dpp401_dscl_get_filter_coeffs_64p(
scl_data->taps.v_taps_c, scl_data->ratios.vert_c);
if (chroma_coef_mode) {
filter_h_c = dpp401_dscl_get_filter_coeffs_64p(
scl_data->taps.h_taps_c, scl_data->ratios.horz_c);
filter_v_c = dpp401_dscl_get_filter_coeffs_64p(
scl_data->taps.v_taps_c, scl_data->ratios.vert_c);
}
}
h_2tap_hardcode_coef_en = scl_data->taps.h_taps < 3
......
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