Skip to content

Commit

Permalink
drm/nouveau/kms: Use new drm_dp_read_mst_cap() helper for checking MS…
Browse files Browse the repository at this point in the history
…T caps

Signed-off-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Ben Skeggs <bskeggs@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200826182456.322681-11-lyude@redhat.com
  • Loading branch information
Lyude Paul committed Aug 31, 2020
1 parent 4b46591 commit 8b75e83
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions drivers/gpu/drm/nouveau/nouveau_dp.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ nouveau_dp_probe_dpcd(struct nouveau_connector *nv_connector,
struct nv50_mstm *mstm = NULL;
int ret;
u8 *dpcd = outp->dp.dpcd;
u8 tmp;

ret = drm_dp_dpcd_read(aux, DP_DPCD_REV, dpcd, DP_RECEIVER_CAP_SIZE);
if (ret == DP_RECEIVER_CAP_SIZE && dpcd[DP_DPCD_REV]) {
Expand All @@ -56,19 +55,10 @@ nouveau_dp_probe_dpcd(struct nouveau_connector *nv_connector,
return connector_status_disconnected;
}

if (nouveau_mst)
if (nouveau_mst) {
mstm = outp->dp.mstm;

if (mstm) {
if (dpcd[DP_DPCD_REV] >= DP_DPCD_REV_12) {
ret = drm_dp_dpcd_readb(aux, DP_MSTM_CAP, &tmp);
if (ret < 0)
return connector_status_disconnected;

mstm->can_mst = !!(tmp & DP_MST_CAP);
} else {
mstm->can_mst = false;
}
if (mstm)
mstm->can_mst = drm_dp_read_mst_cap(aux, dpcd);
}

return connector_status_connected;
Expand Down

0 comments on commit 8b75e83

Please sign in to comment.