Commit 823b42a8 authored by Lyude Paul's avatar Lyude Paul Committed by Kelsey Skunberg

drm/dp_mst: Reformat drm_dp_check_act_status() a bit

BugLink: https://bugs.launchpad.net/bugs/1885932

commit a5cb5fa6 upstream.

Just add a bit more line wrapping, get rid of some extraneous
whitespace, remove an unneeded goto label, and move around some variable
declarations. No functional changes here.
Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
[this isn't a fix, but it's needed for the fix that comes after this]
Fixes: ad7f8a1f ("drm/helper: add Displayport multi-stream helper (v0.6)")
Cc: Sean Paul <sean@poorly.run>
Cc: <stable@vger.kernel.org> # v3.17+
Reviewed-by: default avatarSean Paul <sean@poorly.run>
Link: https://patchwork.freedesktop.org/patch/msgid/20200406221253.1307209-3-lyude@redhat.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
Signed-off-by: default avatarKelsey Skunberg <kelsey.skunberg@canonical.com>
parent 8bb7e5b9
......@@ -2688,33 +2688,31 @@ static int drm_dp_dpcd_write_payload(struct drm_dp_mst_topology_mgr *mgr,
*/
int drm_dp_check_act_status(struct drm_dp_mst_topology_mgr *mgr)
{
int count = 0, ret;
u8 status;
int ret;
int count = 0;
do {
ret = drm_dp_dpcd_readb(mgr->aux, DP_PAYLOAD_TABLE_UPDATE_STATUS, &status);
ret = drm_dp_dpcd_readb(mgr->aux,
DP_PAYLOAD_TABLE_UPDATE_STATUS,
&status);
if (ret < 0) {
DRM_DEBUG_KMS("failed to read payload table status %d\n", ret);
goto fail;
DRM_DEBUG_KMS("failed to read payload table status %d\n",
ret);
return ret;
}
if (status & DP_PAYLOAD_ACT_HANDLED)
break;
count++;
udelay(100);
} while (count < 30);
if (!(status & DP_PAYLOAD_ACT_HANDLED)) {
DRM_DEBUG_KMS("failed to get ACT bit %d after %d retries\n", status, count);
ret = -EINVAL;
goto fail;
DRM_DEBUG_KMS("failed to get ACT bit %d after %d retries\n",
status, count);
return -EINVAL;
}
return 0;
fail:
return ret;
}
EXPORT_SYMBOL(drm_dp_check_act_status);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment