Skip to content

Commit 226a0ba

Browse files
abelvesalumag
authored andcommitted
drm/nouveau/dp: Use the generic helper to control LTTPR transparent mode
LTTPRs operating modes are defined by the DisplayPort standard and the generic framework now provides a helper to switch between them, which is handling the explicit disabling of non-transparent mode and its disable->enable sequence mentioned in the DP Standard v2.0 section 3.6.6.1. So use the new drm generic helper instead as it makes the code a bit cleaner. Reviewed-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Abel Vesa <abel.vesa@linaro.org> Acked-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Danilo Krummrich <dakr@kernel.org> # via IRC Link: https://patchwork.freedesktop.org/patch/msgid/20250203-drm-dp-msm-add-lttpr-transparent-mode-set-v5-2-c865d0e56d6e@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
1 parent 5e77154 commit 226a0ba

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

drivers/gpu/drm/nouveau/nouveau_dp.c

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -79,21 +79,8 @@ nouveau_dp_probe_dpcd(struct nouveau_connector *nv_connector,
7979
!drm_dp_read_lttpr_common_caps(aux, dpcd, outp->dp.lttpr.caps)) {
8080
int nr = drm_dp_lttpr_count(outp->dp.lttpr.caps);
8181

82-
if (nr) {
83-
drm_dp_dpcd_writeb(aux, DP_PHY_REPEATER_MODE,
84-
DP_PHY_REPEATER_MODE_TRANSPARENT);
85-
86-
if (nr > 0) {
87-
ret = drm_dp_dpcd_writeb(aux, DP_PHY_REPEATER_MODE,
88-
DP_PHY_REPEATER_MODE_NON_TRANSPARENT);
89-
if (ret != 1) {
90-
drm_dp_dpcd_writeb(aux, DP_PHY_REPEATER_MODE,
91-
DP_PHY_REPEATER_MODE_TRANSPARENT);
92-
} else {
93-
outp->dp.lttpr.nr = nr;
94-
}
95-
}
96-
}
82+
if (!drm_dp_lttpr_init(aux, nr))
83+
outp->dp.lttpr.nr = nr;
9784
}
9885

9986
ret = drm_dp_read_dpcd_caps(aux, dpcd);

0 commit comments

Comments
 (0)