Skip to content

Commit 85c8c61

Browse files
Lyudegregkh
authored andcommitted
drm/nouveau/drm/nouveau: Check rc from drm_dp_mst_topology_mgr_resume()
commit b89fdf7 upstream. We need to actually make sure we check this on resume since otherwise we won't know whether or not the topology is still there once we've resumed, which will cause us to still think the topology is connected even after it's been removed if the removal happens mid-suspend. Signed-off-by: Lyude Paul <lyude@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 4f44e58 commit 85c8c61

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

  • drivers/gpu/drm/nouveau/dispnv50

drivers/gpu/drm/nouveau/dispnv50/disp.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,8 +1224,16 @@ nv50_mstm_fini(struct nv50_mstm *mstm)
12241224
static void
12251225
nv50_mstm_init(struct nv50_mstm *mstm)
12261226
{
1227-
if (mstm && mstm->mgr.mst_state)
1228-
drm_dp_mst_topology_mgr_resume(&mstm->mgr);
1227+
int ret;
1228+
1229+
if (!mstm || !mstm->mgr.mst_state)
1230+
return;
1231+
1232+
ret = drm_dp_mst_topology_mgr_resume(&mstm->mgr);
1233+
if (ret == -1) {
1234+
drm_dp_mst_topology_mgr_set_mst(&mstm->mgr, false);
1235+
drm_kms_helper_hotplug_event(mstm->mgr.dev);
1236+
}
12291237
}
12301238

12311239
static void

0 commit comments

Comments
 (0)