Skip to content

Commit 61d861c

Browse files
Nicholas Kazlauskasalexdeucher
authored andcommitted
drm/amd/display: Move AllowDRAMSelfRefreshOrDRAMClockChangeInVblank to bounding box
[Why] This is a global parameter, not a per pipe parameter and it's useful for experimenting with the prefetch schedule to be adjustable from the SOC bb. [How] Add a parameter to the SOC bb, default is the existing policy for all DCN. Fill it in when filling SOC bb parameters. Revert the policy to use MinDCFClk at the same time since that's not going to give us P-State in most cases on the spreadsheet. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1403 Signed-off-by: Nicholas Kazlauskas <[email protected]> Signed-off-by: Aurabindo Pillai <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent b6d5850 commit 61d861c

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
#define DC_LOGGER_INIT(logger)
9393

9494
struct _vcs_dpi_ip_params_st dcn3_0_ip = {
95-
.use_min_dcfclk = 1,
95+
.use_min_dcfclk = 0,
9696
.clamp_min_dcfclk = 0,
9797
.odm_capable = 1,
9898
.gpuvm_enable = 0,

drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3644,8 +3644,7 @@ static double TruncToValidBPP(
36443644
void dml30_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_lib)
36453645
{
36463646
struct vba_vars_st *v = &mode_lib->vba;
3647-
int MinPrefetchMode = 0;
3648-
int MaxPrefetchMode = 2;
3647+
int MinPrefetchMode, MaxPrefetchMode;
36493648
int i;
36503649
unsigned int j, k, m;
36513650
bool EnoughWritebackUnits = true;
@@ -3657,6 +3656,10 @@ void dml30_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l
36573656

36583657
/*MODE SUPPORT, VOLTAGE STATE AND SOC CONFIGURATION*/
36593658

3659+
CalculateMinAndMaxPrefetchMode(
3660+
mode_lib->vba.AllowDRAMSelfRefreshOrDRAMClockChangeInVblank,
3661+
&MinPrefetchMode, &MaxPrefetchMode);
3662+
36603663
/*Scale Ratio, taps Support Check*/
36613664

36623665
v->ScaleRatioAndTapsSupport = true;

drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,8 @@ static void fetch_socbb_params(struct display_mode_lib *mode_lib)
244244
mode_lib->vba.DRAMClockChangeSupportsVActive = !soc->disable_dram_clock_change_vactive_support ||
245245
mode_lib->vba.DummyPStateCheck;
246246
mode_lib->vba.AllowDramClockChangeOneDisplayVactive = soc->allow_dram_clock_one_display_vactive;
247+
mode_lib->vba.AllowDRAMSelfRefreshOrDRAMClockChangeInVblank =
248+
soc->allow_dram_self_refresh_or_dram_clock_change_in_vblank;
247249

248250
mode_lib->vba.Downspreading = soc->downspread_percent;
249251
mode_lib->vba.DRAMChannelWidth = soc->dram_channel_width_bytes; // new!
@@ -733,8 +735,6 @@ static void fetch_pipe_params(struct display_mode_lib *mode_lib)
733735
mode_lib->vba.OverrideHostVMPageTableLevels;
734736
}
735737

736-
mode_lib->vba.AllowDRAMSelfRefreshOrDRAMClockChangeInVblank = dm_try_to_allow_self_refresh_and_mclk_switch;
737-
738738
if (mode_lib->vba.OverrideGPUVMPageTableLevels)
739739
mode_lib->vba.GPUVMMaxPageTableLevels = mode_lib->vba.OverrideGPUVMPageTableLevels;
740740

0 commit comments

Comments
 (0)