From: Wesley Chalmers <wesley.chalm...@amd.com>

DML does not calculate chroma values for RQ when surface is not YUV, but DC
will unconditionally use the uninitialized values for HW programming.
This does not cause visual corruption since HW will ignore garbage chroma
values when surface is not YUV, but causes presubmission tests to fail
golden value comparison.

Change-Id: I44aa094f7bae9c26fc27e108b3eb284db5b00a56
Signed-off-by: Wesley Chalmers <wesley.chalm...@amd.com>
Signed-off-by: Eryk Brol <eryk.b...@amd.com>
Reviewed-by: Wenjing Liu <wenjing....@amd.com>
Acked-by: Harry Wentland <harry.wentl...@amd.com>
---
 drivers/gpu/drm/amd/display/dc/dml/dml1_display_rq_dlg_calc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/dc/dml/dml1_display_rq_dlg_calc.c 
b/drivers/gpu/drm/amd/display/dc/dml/dml1_display_rq_dlg_calc.c
index c2037daa8e66..0efbf411667a 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/dml1_display_rq_dlg_calc.c
+++ b/drivers/gpu/drm/amd/display/dc/dml/dml1_display_rq_dlg_calc.c
@@ -239,6 +239,8 @@ void dml1_extract_rq_regs(
        extract_rq_sizing_regs(mode_lib, &(rq_regs->rq_regs_l), 
rq_param.sizing.rq_l);
        if (rq_param.yuv420)
                extract_rq_sizing_regs(mode_lib, &(rq_regs->rq_regs_c), 
rq_param.sizing.rq_c);
+       else
+               memset(&(rq_regs->rq_regs_c), 0, sizeof(rq_regs->rq_regs_c));
 
        rq_regs->rq_regs_l.swath_height = 
dml_log2(rq_param.dlg.rq_l.swath_height);
        rq_regs->rq_regs_c.swath_height = 
dml_log2(rq_param.dlg.rq_c.swath_height);
-- 
2.17.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to