OSDN Git Service

drm/amd/display: Adjust DML workaround threshold
authorJoshua Aberback <joshua.aberback@amd.com>
Fri, 1 Nov 2019 21:29:20 +0000 (17:29 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 19 Nov 2019 15:12:52 +0000 (10:12 -0500)
[Why]
There is a case where the margin is between 50 and 60, but applying the
workaround causes a hang. By increasing the threshold, we are blocking more
cases from switching p-state during active, but those cases will fall back
to switching during blank, which is fine.

[How]
 - increase required margin from 50 to 60

Signed-off-by: Joshua Aberback <joshua.aberback@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20.c
drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20v2.c

index 77b7574..3b224b1 100644 (file)
@@ -2578,7 +2578,7 @@ static void dml20_DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPer
                                        + mode_lib->vba.DRAMClockChangeLatency;
 
        if (mode_lib->vba.DRAMClockChangeSupportsVActive &&
-                       mode_lib->vba.MinActiveDRAMClockChangeMargin > 50) {
+                       mode_lib->vba.MinActiveDRAMClockChangeMargin > 60) {
                mode_lib->vba.DRAMClockChangeWatermark += 25;
                mode_lib->vba.DRAMClockChangeSupport[0][0] = dm_dram_clock_change_vactive;
        } else {
index 62dfd36..6482d7b 100644 (file)
@@ -2612,7 +2612,7 @@ static void dml20v2_DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndP
                                        + mode_lib->vba.DRAMClockChangeLatency;
 
        if (mode_lib->vba.DRAMClockChangeSupportsVActive &&
-               mode_lib->vba.MinActiveDRAMClockChangeMargin > 50) {
+                       mode_lib->vba.MinActiveDRAMClockChangeMargin > 60) {
                mode_lib->vba.DRAMClockChangeWatermark += 25;
                mode_lib->vba.DRAMClockChangeSupport[0][0] = dm_dram_clock_change_vactive;
        } else if (mode_lib->vba.DummyPStateCheck &&