diff mbox

[1/2] drm/i915: Call intel_dp_mst_resume() before resuming displays

Message ID 1457711822-20335-2-git-send-email-cpaul@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

cpaul@redhat.com March 11, 2016, 3:57 p.m. UTC
Since we need MST devices ready before we try to resume displays,
calling this after intel_display_resume() can result in some issues with
various laptop docks where the monitor won't turn back on after
suspending the system.

This order was originally changed in

	commit e7d6f7d70829 ("drm/i915: resume MST after reading back hw state")

In order to fix some unclaimed register errors, however the actual cause
of those has since been fixed.

CC: stable@vger.kernel.org
Signed-off-by: Lyude <cpaul@redhat.com>
---
 drivers/gpu/drm/i915/i915_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Daniel Vetter March 13, 2016, 6:45 p.m. UTC | #1
On Fri, Mar 11, 2016 at 10:57:01AM -0500, Lyude wrote:
> Since we need MST devices ready before we try to resume displays,
> calling this after intel_display_resume() can result in some issues with
> various laptop docks where the monitor won't turn back on after
> suspending the system.
> 
> This order was originally changed in
> 
> 	commit e7d6f7d70829 ("drm/i915: resume MST after reading back hw state")
> 
> In order to fix some unclaimed register errors, however the actual cause
> of those has since been fixed.
> 
> CC: stable@vger.kernel.org
> Signed-off-by: Lyude <cpaul@redhat.com>

Don't we need to first apply patch 2/2 to avoid breaking systems
in-between?
-Daniel

> ---
>  drivers/gpu/drm/i915/i915_drv.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index f357058..08854ae 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -761,12 +761,12 @@ static int i915_drm_resume(struct drm_device *dev)
>  		dev_priv->display.hpd_irq_setup(dev);
>  	spin_unlock_irq(&dev_priv->irq_lock);
>  
> +	intel_dp_mst_resume(dev);
> +
>  	drm_modeset_lock_all(dev);
>  	intel_display_resume(dev);
>  	drm_modeset_unlock_all(dev);
>  
> -	intel_dp_mst_resume(dev);
> -
>  	/*
>  	 * ... but also need to make sure that hotplug processing
>  	 * doesn't cause havoc. Like in the driver load code we don't
> -- 
> 2.5.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
cpaul@redhat.com March 16, 2016, 9:49 p.m. UTC | #2
On Sun, 2016-03-13 at 19:45 +0100, Daniel Vetter wrote:
> On Fri, Mar 11, 2016 at 10:57:01AM -0500, Lyude wrote:
> > 
> > Since we need MST devices ready before we try to resume displays,
> > calling this after intel_display_resume() can result in some issues with
> > various laptop docks where the monitor won't turn back on after
> > suspending the system.
> > 
> > This order was originally changed in
> > 
> > 	commit e7d6f7d70829 ("drm/i915: resume MST after reading back hw state")
> > 
> > In order to fix some unclaimed register errors, however the actual cause
> > of those has since been fixed.
> > 
> > CC: stable@vger.kernel.org
> > Signed-off-by: Lyude <cpaul@redhat.com>
> Don't we need to first apply patch 2/2 to avoid breaking systems
> in-between?
> -Daniel
AFAICT the warns don't appear even with this patch, so no.
> 
> > 
> > ---
> >  drivers/gpu/drm/i915/i915_drv.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_drv.c
> > b/drivers/gpu/drm/i915/i915_drv.c
> > index f357058..08854ae 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.c
> > +++ b/drivers/gpu/drm/i915/i915_drv.c
> > @@ -761,12 +761,12 @@ static int i915_drm_resume(struct drm_device *dev)
> >  		dev_priv->display.hpd_irq_setup(dev);
> >  	spin_unlock_irq(&dev_priv->irq_lock);
> >  
> > +	intel_dp_mst_resume(dev);
> > +
> >  	drm_modeset_lock_all(dev);
> >  	intel_display_resume(dev);
> >  	drm_modeset_unlock_all(dev);
> >  
> > -	intel_dp_mst_resume(dev);
> > -
> >  	/*
> >  	 * ... but also need to make sure that hotplug processing
> >  	 * doesn't cause havoc. Like in the driver load code we don't
> > -- 
> > 2.5.0
> > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
cpaul@redhat.com March 29, 2016, 2:11 p.m. UTC | #3
bump

Could we get a reviewed-by for this patch? It's needed in addition to the patch
series I sent for removing intel_dp_dpcd_read_wake() for the T560 to have it's
monitors work properly on resume.

On Wed, 2016-03-16 at 17:49 -0400, Lyude Paul wrote:
> On Sun, 2016-03-13 at 19:45 +0100, Daniel Vetter wrote:
> > 
> > On Fri, Mar 11, 2016 at 10:57:01AM -0500, Lyude wrote:
> > > 
> > > 
> > > Since we need MST devices ready before we try to resume displays,
> > > calling this after intel_display_resume() can result in some issues with
> > > various laptop docks where the monitor won't turn back on after
> > > suspending the system.
> > > 
> > > This order was originally changed in
> > > 
> > > 	commit e7d6f7d70829 ("drm/i915: resume MST after reading back hw state")
> > > 
> > > In order to fix some unclaimed register errors, however the actual cause
> > > of those has since been fixed.
> > > 
> > > CC: stable@vger.kernel.org
> > > Signed-off-by: Lyude <cpaul@redhat.com>
> > Don't we need to first apply patch 2/2 to avoid breaking systems
> > in-between?
> > -Daniel
> AFAICT the warns don't appear even with this patch, so no.
> > 
> > 
> > > 
> > > 
> > > ---
> > >  drivers/gpu/drm/i915/i915_drv.c | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/i915_drv.c
> > > b/drivers/gpu/drm/i915/i915_drv.c
> > > index f357058..08854ae 100644
> > > --- a/drivers/gpu/drm/i915/i915_drv.c
> > > +++ b/drivers/gpu/drm/i915/i915_drv.c
> > > @@ -761,12 +761,12 @@ static int i915_drm_resume(struct drm_device *dev)
> > >  		dev_priv->display.hpd_irq_setup(dev);
> > >  	spin_unlock_irq(&dev_priv->irq_lock);
> > >  
> > > +	intel_dp_mst_resume(dev);
> > > +
> > >  	drm_modeset_lock_all(dev);
> > >  	intel_display_resume(dev);
> > >  	drm_modeset_unlock_all(dev);
> > >  
> > > -	intel_dp_mst_resume(dev);
> > > -
> > >  	/*
> > >  	 * ... but also need to make sure that hotplug processing
> > >  	 * doesn't cause havoc. Like in the driver load code we don't
> > > -- 
> > > 2.5.0
> > > 
> > > _______________________________________________
> > > Intel-gfx mailing list
> > > Intel-gfx@lists.freedesktop.org
> > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Daniel Vetter March 30, 2016, 6:23 a.m. UTC | #4
On Tue, Mar 29, 2016 at 10:11:54AM -0400, Lyude Paul wrote:
> bump
> 
> Could we get a reviewed-by for this patch? It's needed in addition to the patch
> series I sent for removing intel_dp_dpcd_read_wake() for the T560 to have it's
> monitors work properly on resume.

Applied, thanks.
-Daniel

> 
> On Wed, 2016-03-16 at 17:49 -0400, Lyude Paul wrote:
> > On Sun, 2016-03-13 at 19:45 +0100, Daniel Vetter wrote:
> > > 
> > > On Fri, Mar 11, 2016 at 10:57:01AM -0500, Lyude wrote:
> > > > 
> > > > 
> > > > Since we need MST devices ready before we try to resume displays,
> > > > calling this after intel_display_resume() can result in some issues with
> > > > various laptop docks where the monitor won't turn back on after
> > > > suspending the system.
> > > > 
> > > > This order was originally changed in
> > > > 
> > > > 	commit e7d6f7d70829 ("drm/i915: resume MST after reading back hw state")
> > > > 
> > > > In order to fix some unclaimed register errors, however the actual cause
> > > > of those has since been fixed.
> > > > 
> > > > CC: stable@vger.kernel.org
> > > > Signed-off-by: Lyude <cpaul@redhat.com>
> > > Don't we need to first apply patch 2/2 to avoid breaking systems
> > > in-between?
> > > -Daniel
> > AFAICT the warns don't appear even with this patch, so no.
> > > 
> > > 
> > > > 
> > > > 
> > > > ---
> > > >  drivers/gpu/drm/i915/i915_drv.c | 4 ++--
> > > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > > 
> > > > diff --git a/drivers/gpu/drm/i915/i915_drv.c
> > > > b/drivers/gpu/drm/i915/i915_drv.c
> > > > index f357058..08854ae 100644
> > > > --- a/drivers/gpu/drm/i915/i915_drv.c
> > > > +++ b/drivers/gpu/drm/i915/i915_drv.c
> > > > @@ -761,12 +761,12 @@ static int i915_drm_resume(struct drm_device *dev)
> > > >  		dev_priv->display.hpd_irq_setup(dev);
> > > >  	spin_unlock_irq(&dev_priv->irq_lock);
> > > >  
> > > > +	intel_dp_mst_resume(dev);
> > > > +
> > > >  	drm_modeset_lock_all(dev);
> > > >  	intel_display_resume(dev);
> > > >  	drm_modeset_unlock_all(dev);
> > > >  
> > > > -	intel_dp_mst_resume(dev);
> > > > -
> > > >  	/*
> > > >  	 * ... but also need to make sure that hotplug processing
> > > >  	 * doesn't cause havoc. Like in the driver load code we don't
> > > > -- 
> > > > 2.5.0
> > > > 
> > > > _______________________________________________
> > > > Intel-gfx mailing list
> > > > Intel-gfx@lists.freedesktop.org
> > > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> -- 
> Cheers,
> 	Lyude
>
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index f357058..08854ae 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -761,12 +761,12 @@  static int i915_drm_resume(struct drm_device *dev)
 		dev_priv->display.hpd_irq_setup(dev);
 	spin_unlock_irq(&dev_priv->irq_lock);
 
+	intel_dp_mst_resume(dev);
+
 	drm_modeset_lock_all(dev);
 	intel_display_resume(dev);
 	drm_modeset_unlock_all(dev);
 
-	intel_dp_mst_resume(dev);
-
 	/*
 	 * ... but also need to make sure that hotplug processing
 	 * doesn't cause havoc. Like in the driver load code we don't