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

drm/amd/display: Update DRAM watermark before checking to update TTU

[Why]
In most cases, DRAM watermark is large enough that the result of the
condition to increase TTU doesn't change after DRAM watermark is
increased. However, there is are cases where the condition fails and
becomes true after DRAM watermark is increased. This results in minTTU <
DRAM watermarks which leads to PSR hang since p-state is requested but
not allowed.

[How]
Check whether to update TTU after DRAM watermark is updated.

Signed-off-by: Jaehyun Chung <jaehyun.chung@amd.com>
Reviewed-by: Jun Lei <Jun.Lei@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Jaehyun Chung and committed by
Alex Deucher
2fdcc916 b754c07a

+2 -1
+2 -1
drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20v2.c
··· 2614 2614 2615 2615 if (mode_lib->vba.DRAMClockChangeSupportsVActive && 2616 2616 mode_lib->vba.MinActiveDRAMClockChangeMargin > 60) { 2617 + mode_lib->vba.DRAMClockChangeWatermark += 25; 2617 2618 2618 2619 for (k = 0; k < mode_lib->vba.NumberOfActivePlanes; ++k) { 2619 2620 if (mode_lib->vba.PrefetchMode[mode_lib->vba.VoltageLevel][mode_lib->vba.maxMpcComb] == 0) { ··· 2623 2622 mode_lib->vba.MinTTUVBlank[k] += 25; 2624 2623 } 2625 2624 } 2626 - mode_lib->vba.DRAMClockChangeWatermark += 25; 2625 + 2627 2626 mode_lib->vba.DRAMClockChangeSupport[0][0] = dm_dram_clock_change_vactive; 2628 2627 } else if (mode_lib->vba.DummyPStateCheck && 2629 2628 mode_lib->vba.MinActiveDRAMClockChangeMargin > 0) {