Skip to content

Commit 09d62c7

Browse files
Sung Joon Kimalexdeucher
authored andcommitted
drm/amd/display: Update dcn351 to latest dcn35 config
[why & how] There were some fixes in dcn35 that need to be ported over to dcn351 to prevent any regression. Signed-off-by: Sung Joon Kim <[email protected]> Reviewed-by: Liu, Xi (Alex) <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 1202f79 commit 09d62c7

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

drivers/gpu/drm/amd/display/dc/dml/dcn351/dcn351_fpu.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,8 @@ void dcn351_update_bw_bounding_box_fpu(struct dc *dc,
402402
clock_limits[i].socclk_mhz;
403403
dc->dml2_options.bbox_overrides.clks_table.clk_entries[i].memclk_mhz =
404404
clk_table->entries[i].memclk_mhz * clk_table->entries[i].wck_ratio;
405+
dc->dml2_options.bbox_overrides.clks_table.clk_entries[i].dtbclk_mhz =
406+
clock_limits[i].dtbclk_mhz;
405407
dc->dml2_options.bbox_overrides.clks_table.num_entries_per_clk.num_dcfclk_levels =
406408
clk_table->num_entries;
407409
dc->dml2_options.bbox_overrides.clks_table.num_entries_per_clk.num_fclk_levels =
@@ -414,6 +416,8 @@ void dcn351_update_bw_bounding_box_fpu(struct dc *dc,
414416
clk_table->num_entries;
415417
dc->dml2_options.bbox_overrides.clks_table.num_entries_per_clk.num_memclk_levels =
416418
clk_table->num_entries;
419+
dc->dml2_options.bbox_overrides.clks_table.num_entries_per_clk.num_dtbclk_levels =
420+
clk_table->num_entries;
417421
}
418422
}
419423

@@ -613,6 +617,7 @@ void dcn351_decide_zstate_support(struct dc *dc, struct dc_state *context)
613617
if (context->res_ctx.pipe_ctx[i].plane_state)
614618
plane_count++;
615619
}
620+
616621
/*dcn351 does not support z9/z10*/
617622
if (context->stream_count == 0 || plane_count == 0) {
618623
support = DCN_ZSTATE_SUPPORT_ALLOW_Z8_ONLY;
@@ -626,11 +631,9 @@ void dcn351_decide_zstate_support(struct dc *dc, struct dc_state *context)
626631
dc->debug.minimum_z8_residency_time > 0 ? dc->debug.minimum_z8_residency_time : 1000;
627632
bool allow_z8 = context->bw_ctx.dml.vba.StutterPeriod > (double)minmum_z8_residency;
628633

629-
630634
/*for psr1/psr-su, we allow z8 and z10 based on latency, for replay with IPS enabled, it will enter ips2*/
631-
if (is_pwrseq0 && (is_psr || is_replay))
635+
if (is_pwrseq0 && (is_psr || is_replay))
632636
support = allow_z8 ? allow_z8 : DCN_ZSTATE_SUPPORT_DISALLOW;
633-
634637
}
635638
context->bw_ctx.bw.dcn.clk.zstate_support = support;
636639
}

drivers/gpu/drm/amd/display/dc/hwss/dcn351/dcn351_init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ static const struct hw_sequencer_funcs dcn351_funcs = {
6767
.prepare_bandwidth = dcn35_prepare_bandwidth,
6868
.optimize_bandwidth = dcn35_optimize_bandwidth,
6969
.update_bandwidth = dcn20_update_bandwidth,
70-
.set_drr = dcn10_set_drr,
70+
.set_drr = dcn35_set_drr,
7171
.get_position = dcn10_get_position,
7272
.set_static_screen_control = dcn35_set_static_screen_control,
7373
.setup_stereo = dcn10_setup_stereo,

drivers/gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -700,6 +700,8 @@ static const struct dc_debug_options debug_defaults_drv = {
700700
.disable_dcc = DCC_ENABLE,
701701
.disable_dpp_power_gate = true,
702702
.disable_hubp_power_gate = true,
703+
.disable_optc_power_gate = true, /*should the same as above two*/
704+
.disable_hpo_power_gate = true, /*dmubfw force domain25 on*/
703705
.disable_clock_gate = false,
704706
.disable_dsc_power_gate = true,
705707
.vsr_support = true,
@@ -742,12 +744,13 @@ static const struct dc_debug_options debug_defaults_drv = {
742744
},
743745
.seamless_boot_odm_combine = DML_FAIL_SOURCE_PIXEL_FORMAT,
744746
.enable_z9_disable_interface = true, /* Allow support for the PMFW interface for disable Z9*/
747+
.minimum_z8_residency_time = 2100,
745748
.using_dml2 = true,
746749
.support_eDP1_5 = true,
747750
.enable_hpo_pg_support = false,
748751
.enable_legacy_fast_update = true,
749752
.enable_single_display_2to1_odm_policy = true,
750-
.disable_idle_power_optimizations = true,
753+
.disable_idle_power_optimizations = false,
751754
.dmcub_emulation = false,
752755
.disable_boot_optimizations = false,
753756
.disable_unbounded_requesting = false,
@@ -758,8 +761,10 @@ static const struct dc_debug_options debug_defaults_drv = {
758761
.disable_z10 = true,
759762
.ignore_pg = true,
760763
.psp_disabled_wa = true,
761-
.ips2_eval_delay_us = 200,
762-
.ips2_entry_delay_us = 400
764+
.ips2_eval_delay_us = 2000,
765+
.ips2_entry_delay_us = 800,
766+
.disable_dmub_reallow_idle = true,
767+
.static_screen_wait_frames = 2,
763768
};
764769

765770
static const struct dc_panel_config panel_config_defaults = {

0 commit comments

Comments
 (0)