mirror of
https://github.com/torvalds/linux.git
synced 2026-04-30 04:22:32 -04:00
Revert "drm/amd/display: add mechanism to skip DCN init"
To avoid s3 faild at the first cycle on renoir platform, it needs to revert this patch: drm/amd/display: add mechanism to skip DCN init Signed-off-by: changfeng <Changfeng.Zhu@amd.com> Ackedy-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -153,16 +153,18 @@ static bool dmub_srv_hw_setup(struct dmub_srv *dmub, enum dmub_asic asic)
|
||||
funcs->set_gpint = dmub_dcn20_set_gpint;
|
||||
funcs->is_gpint_acked = dmub_dcn20_is_gpint_acked;
|
||||
funcs->get_gpint_response = dmub_dcn20_get_gpint_response;
|
||||
funcs->get_fw_status = dmub_dcn20_get_fw_boot_status;
|
||||
funcs->enable_dmub_boot_options = dmub_dcn20_enable_dmub_boot_options;
|
||||
|
||||
if (asic == DMUB_ASIC_DCN21)
|
||||
if (asic == DMUB_ASIC_DCN21) {
|
||||
dmub->regs = &dmub_srv_dcn21_regs;
|
||||
|
||||
funcs->is_auto_load_done = dmub_dcn21_is_auto_load_done;
|
||||
funcs->is_phy_init = dmub_dcn21_is_phy_init;
|
||||
}
|
||||
#ifdef CONFIG_DRM_AMD_DC_DCN3_0
|
||||
if (asic == DMUB_ASIC_DCN30) {
|
||||
dmub->regs = &dmub_srv_dcn30_regs;
|
||||
|
||||
funcs->is_auto_load_done = dmub_dcn30_is_auto_load_done;
|
||||
funcs->backdoor_load = dmub_dcn30_backdoor_load;
|
||||
funcs->setup_windows = dmub_dcn30_setup_windows;
|
||||
}
|
||||
@@ -462,10 +464,6 @@ enum dmub_status dmub_srv_hw_init(struct dmub_srv *dmub,
|
||||
dmub_rb_init(&dmub->inbox1_rb, &rb_params);
|
||||
}
|
||||
|
||||
/* Report to DMUB what features are supported by current driver */
|
||||
if (dmub->hw_funcs.enable_dmub_boot_options)
|
||||
dmub->hw_funcs.enable_dmub_boot_options(dmub);
|
||||
|
||||
if (dmub->hw_funcs.reset_release)
|
||||
dmub->hw_funcs.reset_release(dmub);
|
||||
|
||||
@@ -526,10 +524,11 @@ enum dmub_status dmub_srv_wait_for_auto_load(struct dmub_srv *dmub,
|
||||
if (!dmub->hw_init)
|
||||
return DMUB_STATUS_INVALID;
|
||||
|
||||
for (i = 0; i <= timeout_us; i += 100) {
|
||||
union dmub_fw_boot_status status = dmub->hw_funcs.get_fw_status(dmub);
|
||||
if (!dmub->hw_funcs.is_auto_load_done)
|
||||
return DMUB_STATUS_OK;
|
||||
|
||||
if (status.bits.dal_fw && status.bits.mailbox_rdy)
|
||||
for (i = 0; i <= timeout_us; i += 100) {
|
||||
if (dmub->hw_funcs.is_auto_load_done(dmub))
|
||||
return DMUB_STATUS_OK;
|
||||
|
||||
udelay(100);
|
||||
@@ -538,6 +537,27 @@ enum dmub_status dmub_srv_wait_for_auto_load(struct dmub_srv *dmub,
|
||||
return DMUB_STATUS_TIMEOUT;
|
||||
}
|
||||
|
||||
enum dmub_status dmub_srv_wait_for_phy_init(struct dmub_srv *dmub,
|
||||
uint32_t timeout_us)
|
||||
{
|
||||
uint32_t i = 0;
|
||||
|
||||
if (!dmub->hw_init)
|
||||
return DMUB_STATUS_INVALID;
|
||||
|
||||
if (!dmub->hw_funcs.is_phy_init)
|
||||
return DMUB_STATUS_OK;
|
||||
|
||||
for (i = 0; i <= timeout_us; i += 10) {
|
||||
if (dmub->hw_funcs.is_phy_init(dmub))
|
||||
return DMUB_STATUS_OK;
|
||||
|
||||
udelay(10);
|
||||
}
|
||||
|
||||
return DMUB_STATUS_TIMEOUT;
|
||||
}
|
||||
|
||||
enum dmub_status dmub_srv_wait_for_idle(struct dmub_srv *dmub,
|
||||
uint32_t timeout_us)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user