Skip to content

Commit 1319fb8

Browse files
Cruise Hungalexdeucher
authored andcommitted
drm/amd/display: Control BW allocation in FW side
[Why] The BW allocation feature should be controlled in FW side. [How] Pass the control bit to FW boot option. Reviewed-by: Meenakshikumar Somasundaram <meenakshikumar.somasundaram@amd.com> Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Signed-off-by: Cruise Hung <Cruise.Hung@amd.com> Signed-off-by: Tom Chung <chiahsuan.chung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent d021bd4 commit 1319fb8

5 files changed

Lines changed: 4 additions & 7 deletions

File tree

drivers/gpu/drm/amd/display/dc/dc.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -850,8 +850,7 @@ union dpia_debug_options {
850850
uint32_t enable_force_tbt3_work_around:1; /* bit 4 */
851851
uint32_t disable_usb4_pm_support:1; /* bit 5 */
852852
uint32_t enable_usb4_bw_zero_alloc_patch:1; /* bit 6 */
853-
uint32_t enable_bw_allocation_mode:1; /* bit 7 */
854-
uint32_t reserved:24;
853+
uint32_t reserved:25;
855854
} bits;
856855
uint32_t raw;
857856
};

drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_dpia_bw.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -225,11 +225,6 @@ bool link_dpia_enable_usb4_dp_bw_alloc_mode(struct dc_link *link)
225225
bool ret = false;
226226
uint8_t val;
227227

228-
if (link->dc->debug.dpia_debug.bits.enable_bw_allocation_mode == false) {
229-
DC_LOG_DEBUG("%s: link[%d] DPTX BW allocation mode disabled", __func__, link->link_index);
230-
return false;
231-
}
232-
233228
val = DPTX_BW_ALLOC_MODE_ENABLE | DPTX_BW_ALLOC_UNMASK_IRQ;
234229

235230
if (core_link_write_dpcd(link, DPTX_BW_ALLOCATION_MODE_CONTROL, &val, sizeof(uint8_t)) == DC_OK) {

drivers/gpu/drm/amd/display/dmub/dmub_srv.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,7 @@ struct dmub_srv_hw_params {
318318
bool enable_non_transparent_setconfig;
319319
bool lower_hbr3_phy_ssc;
320320
bool override_hbr3_pll_vco;
321+
bool disable_dpia_bw_allocation;
321322
};
322323

323324
/**

drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,7 @@ void dmub_dcn31_enable_dmub_boot_options(struct dmub_srv *dmub, const struct dmu
380380
boot_options.bits.override_hbr3_pll_vco = params->override_hbr3_pll_vco;
381381

382382
boot_options.bits.sel_mux_phy_c_d_phy_f_g = (dmub->asic == DMUB_ASIC_DCN31B) ? 1 : 0;
383+
boot_options.bits.disable_dpia_bw_allocation = params->disable_dpia_bw_allocation;
383384

384385
REG_WRITE(DMCUB_SCRATCH14, boot_options.all);
385386
}

drivers/gpu/drm/amd/display/dmub/src/dmub_dcn35.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,7 @@ void dmub_dcn35_enable_dmub_boot_options(struct dmub_srv *dmub, const struct dmu
418418
boot_options.bits.disable_sldo_opt = params->disable_sldo_opt;
419419
boot_options.bits.enable_non_transparent_setconfig = params->enable_non_transparent_setconfig;
420420
boot_options.bits.lower_hbr3_phy_ssc = params->lower_hbr3_phy_ssc;
421+
boot_options.bits.disable_dpia_bw_allocation = params->disable_dpia_bw_allocation;
421422

422423
REG_WRITE(DMCUB_SCRATCH14, boot_options.all);
423424
}

0 commit comments

Comments
 (0)