Sasha Levin
2019-Dec-10 21:04 UTC
[Nouveau] [PATCH AUTOSEL 5.4 143/350] drm/nouveau: Resume hotplug interrupts earlier
From: Lyude Paul <lyude at redhat.com> [ Upstream commit ac0de16a38a9ec7026ca96132e3883c564497068 ] Currently, we enable hotplug detection only after we re-enable the display. However, this is too late if we're planning on sending sideband messages during the resume process - which we'll need to do in order to reprobe the topology on resume. So, enable hotplug events before reinitializing the display. Cc: Juston Li <juston.li at intel.com> Cc: Imre Deak <imre.deak at intel.com> Cc: Ville Syrj?l? <ville.syrjala at linux.intel.com> Cc: Harry Wentland <hwentlan at amd.com> Cc: Daniel Vetter <daniel.vetter at ffwll.ch> Reviewed-by: Sean Paul <sean at poorly.run> Signed-off-by: Lyude Paul <lyude at redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20191022023641.8026-11-lyude at redhat.com Signed-off-by: Sasha Levin <sashal at kernel.org> --- drivers/gpu/drm/nouveau/nouveau_display.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c index 6f038511a03a9..53f9bceaf17a5 100644 --- a/drivers/gpu/drm/nouveau/nouveau_display.c +++ b/drivers/gpu/drm/nouveau/nouveau_display.c @@ -407,6 +407,17 @@ nouveau_display_init(struct drm_device *dev, bool resume, bool runtime) struct drm_connector_list_iter conn_iter; int ret; + /* + * Enable hotplug interrupts (done as early as possible, since we need + * them for MST) + */ + drm_connector_list_iter_begin(dev, &conn_iter); + nouveau_for_each_non_mst_connector_iter(connector, &conn_iter) { + struct nouveau_connector *conn = nouveau_connector(connector); + nvif_notify_get(&conn->hpd); + } + drm_connector_list_iter_end(&conn_iter); + ret = disp->init(dev, resume, runtime); if (ret) return ret; @@ -416,14 +427,6 @@ nouveau_display_init(struct drm_device *dev, bool resume, bool runtime) */ drm_kms_helper_poll_enable(dev); - /* enable hotplug interrupts */ - drm_connector_list_iter_begin(dev, &conn_iter); - nouveau_for_each_non_mst_connector_iter(connector, &conn_iter) { - struct nouveau_connector *conn = nouveau_connector(connector); - nvif_notify_get(&conn->hpd); - } - drm_connector_list_iter_end(&conn_iter); - return ret; } -- 2.20.1
Lyude Paul
2019-Dec-10 21:29 UTC
[Nouveau] [PATCH AUTOSEL 5.4 143/350] drm/nouveau: Resume hotplug interrupts earlier
huh? Not sure how this got put in the stable queue, but this probably should be dropped. this was prepatory work for some MST functionality that got added recently, not a fix. On Tue, 2019-12-10 at 16:04 -0500, Sasha Levin wrote:> From: Lyude Paul <lyude at redhat.com> > > [ Upstream commit ac0de16a38a9ec7026ca96132e3883c564497068 ] > > Currently, we enable hotplug detection only after we re-enable the > display. However, this is too late if we're planning on sending sideband > messages during the resume process - which we'll need to do in order to > reprobe the topology on resume. > > So, enable hotplug events before reinitializing the display. > > Cc: Juston Li <juston.li at intel.com> > Cc: Imre Deak <imre.deak at intel.com> > Cc: Ville Syrj?l? <ville.syrjala at linux.intel.com> > Cc: Harry Wentland <hwentlan at amd.com> > Cc: Daniel Vetter <daniel.vetter at ffwll.ch> > Reviewed-by: Sean Paul <sean at poorly.run> > Signed-off-by: Lyude Paul <lyude at redhat.com> > Link: > https://patchwork.freedesktop.org/patch/msgid/20191022023641.8026-11-lyude at redhat.com > Signed-off-by: Sasha Levin <sashal at kernel.org> > --- > drivers/gpu/drm/nouveau/nouveau_display.c | 19 +++++++++++-------- > 1 file changed, 11 insertions(+), 8 deletions(-) > > diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c > b/drivers/gpu/drm/nouveau/nouveau_display.c > index 6f038511a03a9..53f9bceaf17a5 100644 > --- a/drivers/gpu/drm/nouveau/nouveau_display.c > +++ b/drivers/gpu/drm/nouveau/nouveau_display.c > @@ -407,6 +407,17 @@ nouveau_display_init(struct drm_device *dev, bool > resume, bool runtime) > struct drm_connector_list_iter conn_iter; > int ret; > > + /* > + * Enable hotplug interrupts (done as early as possible, since we need > + * them for MST) > + */ > + drm_connector_list_iter_begin(dev, &conn_iter); > + nouveau_for_each_non_mst_connector_iter(connector, &conn_iter) { > + struct nouveau_connector *conn = nouveau_connector(connector); > + nvif_notify_get(&conn->hpd); > + } > + drm_connector_list_iter_end(&conn_iter); > + > ret = disp->init(dev, resume, runtime); > if (ret) > return ret; > @@ -416,14 +427,6 @@ nouveau_display_init(struct drm_device *dev, bool > resume, bool runtime) > */ > drm_kms_helper_poll_enable(dev); > > - /* enable hotplug interrupts */ > - drm_connector_list_iter_begin(dev, &conn_iter); > - nouveau_for_each_non_mst_connector_iter(connector, &conn_iter) { > - struct nouveau_connector *conn = nouveau_connector(connector); > - nvif_notify_get(&conn->hpd); > - } > - drm_connector_list_iter_end(&conn_iter); > - > return ret; > } >-- Cheers, Lyude Paul
Sasha Levin
2019-Dec-19 19:39 UTC
[Nouveau] [PATCH AUTOSEL 5.4 143/350] drm/nouveau: Resume hotplug interrupts earlier
On Tue, Dec 10, 2019 at 04:29:54PM -0500, Lyude Paul wrote:>huh? Not sure how this got put in the stable queue, but this probably should >be dropped. this was prepatory work for some MST functionality that got added >recently, not a fix.Dropped, thanks! -- Thanks, Sasha
Maybe Matching Threads
- [PATCH AUTOSEL 5.4 143/350] drm/nouveau: Resume hotplug interrupts earlier
- [PATCH v5 10/14] drm/nouveau: Resume hotplug interrupts earlier
- [PATCH 0/2] drm/nouveau: Fix connector memory corruption issues
- [PATCH v2 0/2] drm/nouveau: Fix connector memory corruption issues
- [PATCH 2/2] drm/nouveau: Avoid looping through fake MST connectors