summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLyude Paul <lyude@redhat.com>2020-08-26 14:24:56 -0400
committerLyude Paul <lyude@redhat.com>2020-08-31 19:10:09 -0400
commit79416e97dda0118b137302575a70a14259a27d7d (patch)
tree7d989a976d5a0885f45aa75e1aa773bcefe34b25
parentb9936121d95b0127d34fa6c25678994582d1b17c (diff)
drm/nouveau/kms: Start using drm_dp_read_dpcd_caps()topic/nouveau-i915-dp-helpers-and-cleanup-2020-08-31-1
Now that we've extracted i915's code for reading both the normal DPCD caps and extended DPCD caps into a shared helper, let's start using this in nouveau to enable us to start checking extended DPCD caps for free. Signed-off-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Ben Skeggs <bskeggs@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200826182456.322681-21-lyude@redhat.com
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_dp.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_dp.c b/drivers/gpu/drm/nouveau/nouveau_dp.c
index 59be357b17e0..810bf6956568 100644
--- a/drivers/gpu/drm/nouveau/nouveau_dp.c
+++ b/drivers/gpu/drm/nouveau/nouveau_dp.c
@@ -54,15 +54,13 @@ nouveau_dp_probe_dpcd(struct nouveau_connector *nv_connector,
int ret;
u8 *dpcd = outp->dp.dpcd;
- ret = drm_dp_dpcd_read(aux, DP_DPCD_REV, dpcd, DP_RECEIVER_CAP_SIZE);
- if (ret == DP_RECEIVER_CAP_SIZE && dpcd[DP_DPCD_REV]) {
- ret = drm_dp_read_desc(aux, &outp->dp.desc,
- drm_dp_is_branch(dpcd));
- if (ret < 0)
- goto out;
- } else {
+ ret = drm_dp_read_dpcd_caps(aux, dpcd);
+ if (ret < 0)
+ goto out;
+
+ ret = drm_dp_read_desc(aux, &outp->dp.desc, drm_dp_is_branch(dpcd));
+ if (ret < 0)
goto out;
- }
if (nouveau_mst) {
mstm = outp->dp.mstm;