Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amd/display: Set meta_chunk_value to 0 in DML if DCC disabled in DCN2.1

[WHY]:
Calculating refcyc_per_meta_chunk_vblank_l when DCC is disabled may lead
to a large number causing an assert to get hit. In VBA, this value is 0
when DCC is disabled.

[HOW]:
Set value to 0 to avoid hitting the assert.

Signed-off-by: Sung Lee <sung.lee@amd.com>
Reviewed-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Sung Lee and committed by
Alex Deucher
f2cd2e5d a8665946

+4 -1
+4 -1
drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c
··· 1500 1500 < (unsigned int)dml_pow(2, 13)); 1501 1501 } 1502 1502 1503 - disp_dlg_regs->refcyc_per_meta_chunk_vblank_l = 1503 + if (src->dcc) 1504 + disp_dlg_regs->refcyc_per_meta_chunk_vblank_l = 1504 1505 (unsigned int) (dst_y_per_row_vblank * (double) htotal 1505 1506 * ref_freq_to_pix_freq / (double) meta_chunks_per_row_ub_l); 1507 + else 1508 + disp_dlg_regs->refcyc_per_meta_chunk_vblank_l = 0; 1506 1509 ASSERT(disp_dlg_regs->refcyc_per_meta_chunk_vblank_l < (unsigned int)dml_pow(2, 13)); 1507 1510 1508 1511 disp_dlg_regs->refcyc_per_meta_chunk_vblank_c =