Commit 73596dbf authored by Lyude Paul's avatar Lyude Paul

drm/nouveau/kms/nv50-: Just use drm_dp_dpcd_read() in nouveau_dp.c

Since this actually logs accesses, we should probably always be using
this imho…
Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
Reviewed-by: default avatarBen Skeggs <bskeggs@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200826182456.322681-4-lyude@redhat.com
parent 6ba11932
...@@ -42,16 +42,12 @@ nouveau_dp_detect(struct nouveau_connector *nv_connector, ...@@ -42,16 +42,12 @@ nouveau_dp_detect(struct nouveau_connector *nv_connector,
{ {
struct drm_device *dev = nv_encoder->base.base.dev; struct drm_device *dev = nv_encoder->base.base.dev;
struct nouveau_drm *drm = nouveau_drm(dev); struct nouveau_drm *drm = nouveau_drm(dev);
struct nvkm_i2c_aux *aux; struct drm_dp_aux *aux = &nv_connector->aux;
u8 dpcd[8]; u8 dpcd[DP_RECEIVER_CAP_SIZE];
int ret; int ret;
aux = nv_encoder->aux; ret = drm_dp_dpcd_read(aux, DP_DPCD_REV, dpcd, DP_RECEIVER_CAP_SIZE);
if (!aux) if (ret != sizeof(dpcd))
return -ENODEV;
ret = nvkm_rdaux(aux, DP_DPCD_REV, dpcd, sizeof(dpcd));
if (ret)
return ret; return ret;
nv_encoder->dp.link_bw = 27000 * dpcd[1]; nv_encoder->dp.link_bw = 27000 * dpcd[1];
......
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