mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 19:43:40 +02:00
drm/amd/display: Wait for mailbox ready when powering up DMCUB
[Why] Otherwise we can send commands too early and they don't execute until the next command is sent. [How] Check the extra status bit when polling for HW powered up. Reviewed-by: Charlene Liu <charlene.liu@amd.com> Acked-by: Tom Chung <chiahsuan.chung@amd.com> Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
05d3dfd3ed
commit
2812b5add4
|
|
@ -791,11 +791,20 @@ enum dmub_status dmub_srv_cmd_execute(struct dmub_srv *dmub)
|
|||
|
||||
bool dmub_srv_is_hw_pwr_up(struct dmub_srv *dmub)
|
||||
{
|
||||
union dmub_fw_boot_status status;
|
||||
|
||||
if (!dmub->hw_funcs.is_hw_powered_up)
|
||||
return true;
|
||||
|
||||
return dmub->hw_funcs.is_hw_powered_up(dmub) &&
|
||||
dmub->hw_funcs.is_hw_init(dmub);
|
||||
if (!dmub->hw_funcs.is_hw_powered_up(dmub))
|
||||
return false;
|
||||
|
||||
if (!dmub->hw_funcs.is_hw_init(dmub))
|
||||
return false;
|
||||
|
||||
status = dmub->hw_funcs.get_fw_status(dmub);
|
||||
|
||||
return status.bits.dal_fw && status.bits.mailbox_rdy;
|
||||
}
|
||||
|
||||
enum dmub_status dmub_srv_wait_for_hw_pwr_up(struct dmub_srv *dmub,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user