]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
drm/nouveau/kms/nv50-: Use macros for DP registers in nouveau_dp.c
authorLyude Paul <lyude@redhat.com>
Wed, 26 Aug 2020 18:24:40 +0000 (14:24 -0400)
committerLyude Paul <lyude@redhat.com>
Mon, 31 Aug 2020 23:09:04 +0000 (19:09 -0400)
No functional changes.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Ben Skeggs <bskeggs@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200826182456.322681-5-lyude@redhat.com
drivers/gpu/drm/nouveau/nouveau_dp.c

index 8db9216d52c69c6dd27d81196b669cbf9dc839ec..4030806e3522bd08d7c0c4a39b2f1ccb90fda820 100644 (file)
@@ -50,11 +50,13 @@ nouveau_dp_detect(struct nouveau_connector *nv_connector,
        if (ret != sizeof(dpcd))
                return ret;
 
-       nv_encoder->dp.link_bw = 27000 * dpcd[1];
-       nv_encoder->dp.link_nr = dpcd[2] & DP_MAX_LANE_COUNT_MASK;
+       nv_encoder->dp.link_bw = 27000 * dpcd[DP_MAX_LINK_RATE];
+       nv_encoder->dp.link_nr =
+               dpcd[DP_MAX_LANE_COUNT] & DP_MAX_LANE_COUNT_MASK;
 
        NV_DEBUG(drm, "display: %dx%d dpcd 0x%02x\n",
-                nv_encoder->dp.link_nr, nv_encoder->dp.link_bw, dpcd[0]);
+                nv_encoder->dp.link_nr, nv_encoder->dp.link_bw,
+                dpcd[DP_DPCD_REV]);
        NV_DEBUG(drm, "encoder: %dx%d\n",
                 nv_encoder->dcb->dpconf.link_nr,
                 nv_encoder->dcb->dpconf.link_bw);