summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/dispnv50
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2023-09-20 00:56:26 +0300
committerLyude Paul <lyude@redhat.com>2023-09-20 01:22:17 +0300
commit757033808c95b0ee66b87803af6d0bf7fdaee3e6 (patch)
tree765d070fda04d7c2fb47b9b6cd7e618cbd08375d /drivers/gpu/drm/nouveau/dispnv50
parent625ead3d39d7021b3e9a2d0662b8bd0c3b5a7ac2 (diff)
downloadlinux-757033808c95b0ee66b87803af6d0bf7fdaee3e6.tar.xz
drm/nouveau/kms/nv50-: fixup sink D3 before tearing down link
- fixes bug preventing this on SST - implement for MST Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Acked-by: Danilo Krummrich <me@dakr.org> Signed-off-by: Lyude Paul <lyude@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230919220442.202488-32-lyude@redhat.com
Diffstat (limited to 'drivers/gpu/drm/nouveau/dispnv50')
-rw-r--r--drivers/gpu/drm/nouveau/dispnv50/disp.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
index 1fcd1b36a275..1ea4b113058c 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
@@ -1300,6 +1300,7 @@ nv50_mstm_cleanup(struct drm_atomic_state *state,
}
if (mstm->disabled) {
+ nouveau_dp_power_down(mstm->outp);
nvif_outp_release(&mstm->outp->outp);
mstm->disabled = false;
}
@@ -1551,7 +1552,6 @@ nv50_sor_atomic_disable(struct drm_encoder *encoder, struct drm_atomic_state *st
#endif
struct drm_dp_aux *aux = &nv_connector->aux;
int ret;
- u8 pwr;
#ifdef CONFIG_DRM_NOUVEAU_BACKLIGHT
if (backlight && backlight->uses_dpcd) {
@@ -1568,15 +1568,8 @@ nv50_sor_atomic_disable(struct drm_encoder *encoder, struct drm_atomic_state *st
nv_encoder->hdmi.enabled = false;
}
- if (nv_encoder->dcb->type == DCB_OUTPUT_DP) {
- ret = drm_dp_dpcd_readb(aux, DP_SET_POWER, &pwr);
-
- if (ret == 0) {
- pwr &= ~DP_SET_POWER_MASK;
- pwr |= DP_SET_POWER_D3;
- drm_dp_dpcd_writeb(aux, DP_SET_POWER, pwr);
- }
- }
+ if (nv_encoder->dcb->type == DCB_OUTPUT_DP)
+ nouveau_dp_power_down(nv_encoder);
nv_encoder->update(nv_encoder, nv_crtc->index, NULL, 0, 0);
nv50_audio_disable(encoder, nv_crtc);