Merge "disp: msm: dp: Detect failure cases when setting mst topology manager"
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

commit
dd2ff80eb4
@@ -403,10 +403,16 @@ static int dp_mst_sim_topology_mgr_set_mst(
|
|||||||
struct drm_dp_mst_topology_mgr *mgr,
|
struct drm_dp_mst_topology_mgr *mgr,
|
||||||
bool mst_state)
|
bool mst_state)
|
||||||
{
|
{
|
||||||
|
int rc;
|
||||||
struct dp_mst_private *mst = container_of(mgr,
|
struct dp_mst_private *mst = container_of(mgr,
|
||||||
struct dp_mst_private, mst_mgr);
|
struct dp_mst_private, mst_mgr);
|
||||||
|
|
||||||
drm_dp_mst_topology_mgr_set_mst(mgr, mst_state);
|
rc = drm_dp_mst_topology_mgr_set_mst(mgr, mst_state);
|
||||||
|
if (rc < 0) {
|
||||||
|
DRM_ERROR("unable to set mst topology mgr, rc: %d\n", rc);
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
if (mst_state)
|
if (mst_state)
|
||||||
queue_work(system_long_wq, &mst->simulator.probe_work);
|
queue_work(system_long_wq, &mst->simulator.probe_work);
|
||||||
|
|
||||||
@@ -1945,9 +1951,12 @@ static void dp_mst_display_hpd(void *dp_display, bool hpd_status,
|
|||||||
mst->mst_session_state = hpd_status;
|
mst->mst_session_state = hpd_status;
|
||||||
mutex_unlock(&mst->mst_lock);
|
mutex_unlock(&mst->mst_lock);
|
||||||
|
|
||||||
if (!hpd_status)
|
if (!hpd_status) {
|
||||||
rc = mst->mst_fw_cbs->topology_mgr_set_mst(&mst->mst_mgr,
|
rc = mst->mst_fw_cbs->topology_mgr_set_mst(&mst->mst_mgr,
|
||||||
hpd_status);
|
hpd_status);
|
||||||
|
if (rc < 0)
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
if (info && !info->mst_protocol) {
|
if (info && !info->mst_protocol) {
|
||||||
if (hpd_status) {
|
if (hpd_status) {
|
||||||
@@ -1959,13 +1968,21 @@ static void dp_mst_display_hpd(void *dp_display, bool hpd_status,
|
|||||||
mst->mst_fw_cbs = &drm_dp_mst_fw_helper_ops;
|
mst->mst_fw_cbs = &drm_dp_mst_fw_helper_ops;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hpd_status)
|
if (hpd_status) {
|
||||||
rc = mst->mst_fw_cbs->topology_mgr_set_mst(&mst->mst_mgr,
|
rc = mst->mst_fw_cbs->topology_mgr_set_mst(&mst->mst_mgr,
|
||||||
hpd_status);
|
hpd_status);
|
||||||
|
if (rc < 0)
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
dp_mst_hpd_event_notify(mst, hpd_status);
|
dp_mst_hpd_event_notify(mst, hpd_status);
|
||||||
|
|
||||||
DP_MST_INFO_LOG("mst display hpd:%d, rc:%d\n", hpd_status, rc);
|
DP_MST_INFO_LOG("mst display hpd success. hpd:%d, rc:%d\n", hpd_status,
|
||||||
|
rc);
|
||||||
|
return;
|
||||||
|
fail:
|
||||||
|
DRM_ERROR("mst display hpd failed. hpd: %d, rc: %d\n",
|
||||||
|
hpd_status, rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dp_mst_display_hpd_irq(void *dp_display,
|
static void dp_mst_display_hpd_irq(void *dp_display,
|
||||||
|
Reference in New Issue
Block a user