Skip to content

Commit f30f551

Browse files
Bindu Ramamurthyalexdeucher
authored andcommitted
drm/amd/display: Populate socclk entries for dcn3.02/3.03
[Why] Initialize socclk entries in bandwidth params for dcn302, dcn303. [How] Fetch the sockclk values from smu for the DPM levels and for the DPM levels where smu returns 0, previous level values are reported. Reviewed-by: Roman Li <[email protected]> Acked-by: Rodrigo Siqueira <[email protected]> Signed-off-by: Bindu Ramamurthy <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent d794091 commit f30f551

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

drivers/gpu/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,10 @@ void dcn3_init_clocks(struct clk_mgr *clk_mgr_base)
190190
&clk_mgr_base->bw_params->clk_table.entries[0].dtbclk_mhz,
191191
&num_levels);
192192

193+
/* SOCCLK */
194+
dcn3_init_single_clock(clk_mgr, PPCLK_SOCCLK,
195+
&clk_mgr_base->bw_params->clk_table.entries[0].socclk_mhz,
196+
&num_levels);
193197
// DPREFCLK ???
194198

195199
/* DISPCLK */

drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1399,10 +1399,13 @@ void dcn302_update_bw_bounding_box(struct dc *dc, struct clk_bw_params *bw_param
13991399
dcn3_02_soc.clock_limits[i].dppclk_mhz = max_dppclk_mhz;
14001400
dcn3_02_soc.clock_limits[i].phyclk_mhz = max_phyclk_mhz;
14011401
dcn3_02_soc.clock_limits[i].dtbclk_mhz = dcn3_02_soc.clock_limits[0].dtbclk_mhz;
1402+
if (!bw_params->clk_table.entries[i].socclk_mhz && i > 0)
1403+
dcn3_02_soc.clock_limits[i].socclk_mhz = dcn3_02_soc.clock_limits[i-1].socclk_mhz;
1404+
else
1405+
dcn3_02_soc.clock_limits[i].socclk_mhz = bw_params->clk_table.entries[i].socclk_mhz;
14021406
/* These clocks cannot come from bw_params, always fill from dcn3_02_soc[1] */
1403-
/* FCLK, PHYCLK_D18, SOCCLK, DSCCLK */
1407+
/* FCLK, PHYCLK_D18, DSCCLK */
14041408
dcn3_02_soc.clock_limits[i].phyclk_d18_mhz = dcn3_02_soc.clock_limits[0].phyclk_d18_mhz;
1405-
dcn3_02_soc.clock_limits[i].socclk_mhz = dcn3_02_soc.clock_limits[0].socclk_mhz;
14061409
dcn3_02_soc.clock_limits[i].dscclk_mhz = dcn3_02_soc.clock_limits[0].dscclk_mhz;
14071410
}
14081411
/* re-init DML with updated bb */

drivers/gpu/drm/amd/display/dc/dcn303/dcn303_resource.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1327,10 +1327,13 @@ void dcn303_update_bw_bounding_box(struct dc *dc, struct clk_bw_params *bw_param
13271327
dcn3_03_soc.clock_limits[i].dppclk_mhz = max_dppclk_mhz;
13281328
dcn3_03_soc.clock_limits[i].phyclk_mhz = max_phyclk_mhz;
13291329
dcn3_03_soc.clock_limits[i].dtbclk_mhz = dcn3_03_soc.clock_limits[0].dtbclk_mhz;
1330+
if (!bw_params->clk_table.entries[i].socclk_mhz && i > 0)
1331+
dcn3_03_soc.clock_limits[i].socclk_mhz = dcn3_03_soc.clock_limits[i-1].socclk_mhz;
1332+
else
1333+
dcn3_03_soc.clock_limits[i].socclk_mhz = bw_params->clk_table.entries[i].socclk_mhz;
13301334
/* These clocks cannot come from bw_params, always fill from dcn3_03_soc[1] */
1331-
/* FCLK, PHYCLK_D18, SOCCLK, DSCCLK */
1335+
/* FCLK, PHYCLK_D18, DSCCLK */
13321336
dcn3_03_soc.clock_limits[i].phyclk_d18_mhz = dcn3_03_soc.clock_limits[0].phyclk_d18_mhz;
1333-
dcn3_03_soc.clock_limits[i].socclk_mhz = dcn3_03_soc.clock_limits[0].socclk_mhz;
13341337
dcn3_03_soc.clock_limits[i].dscclk_mhz = dcn3_03_soc.clock_limits[0].dscclk_mhz;
13351338
}
13361339
/* re-init DML with updated bb */

0 commit comments

Comments
 (0)