mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 11:33:28 +02:00
drm/amd/display: Dpia hpd status not in sync after S4
[Why] Dpia hpd status not in sync causing driver not enabling BW Alloc after S4. [How] Update hpd_status of the link when querying hpd state from dmub in dpia_query_hpd_status(). Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Acked-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com> Signed-off-by: Meenakshikumar Somasundaram <meenakshikumar.somasundaram@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
2476bf4328
commit
ab76bd72ee
|
|
@ -82,25 +82,33 @@ bool dpia_query_hpd_status(struct dc_link *link)
|
|||
{
|
||||
union dmub_rb_cmd cmd = {0};
|
||||
struct dc_dmub_srv *dmub_srv = link->ctx->dmub_srv;
|
||||
bool is_hpd_high = false;
|
||||
|
||||
/* prepare QUERY_HPD command */
|
||||
cmd.query_hpd.header.type = DMUB_CMD__QUERY_HPD_STATE;
|
||||
cmd.query_hpd.data.instance = link->link_id.enum_id - ENUM_ID_1;
|
||||
cmd.query_hpd.data.ch_type = AUX_CHANNEL_DPIA;
|
||||
|
||||
/* Return HPD status reported by DMUB if query successfully executed. */
|
||||
if (dc_wake_and_execute_dmub_cmd(dmub_srv->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT_WITH_REPLY) &&
|
||||
cmd.query_hpd.data.status == AUX_RET_SUCCESS)
|
||||
is_hpd_high = cmd.query_hpd.data.result;
|
||||
/* Query dpia hpd status from dmub */
|
||||
if (dc_wake_and_execute_dmub_cmd(dmub_srv->ctx, &cmd,
|
||||
DM_DMUB_WAIT_TYPE_WAIT_WITH_REPLY) &&
|
||||
cmd.query_hpd.data.status == AUX_RET_SUCCESS) {
|
||||
DC_LOG_DEBUG("%s: for link(%d) dpia(%d) success, current_hpd_status(%d) new_hpd_status(%d)\n",
|
||||
__func__,
|
||||
link->link_index,
|
||||
link->link_id.enum_id - ENUM_ID_1,
|
||||
link->hpd_status,
|
||||
cmd.query_hpd.data.result);
|
||||
link->hpd_status = cmd.query_hpd.data.result;
|
||||
} else {
|
||||
DC_LOG_ERROR("%s: for link(%d) dpia(%d) failed with status(%d), current_hpd_status(%d) new_hpd_status(0)\n",
|
||||
__func__,
|
||||
link->link_index,
|
||||
link->link_id.enum_id - ENUM_ID_1,
|
||||
cmd.query_hpd.data.status,
|
||||
link->hpd_status);
|
||||
link->hpd_status = false;
|
||||
}
|
||||
|
||||
DC_LOG_DEBUG("%s: link(%d) dpia(%d) cmd_status(%d) result(%d)\n",
|
||||
__func__,
|
||||
link->link_index,
|
||||
link->link_id.enum_id - ENUM_ID_1,
|
||||
cmd.query_hpd.data.status,
|
||||
cmd.query_hpd.data.result);
|
||||
|
||||
return is_hpd_high;
|
||||
return link->hpd_status;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user