diff mbox

drm/i915: fix up the edp power well check

Message ID 1369850171-16754-1-git-send-email-daniel.vetter@ffwll.ch (mailing list archive)
State New, archived
Headers show

Commit Message

Daniel Vetter May 29, 2013, 5:56 p.m. UTC
Now that we track the cpu transcoder we need accurately in the pipe
config we can finally fix up the transcoder check. With the current
code eDP on port D will be broken since we'd errornously cut the
power.

For reference see

commit 2124b72e6283c4e84a55e71077fee91793f4c801
Author: Paulo Zanoni <paulo.r.zanoni@intel.com>
Date:   Fri Mar 22 14:07:23 2013 -0300

    drm/i915: don't disable the power well yet

Cc: Takashi Iwai <tiwai@suse.de>
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/i915/intel_display.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Comments

Daniel Vetter May 29, 2013, 7:45 p.m. UTC | #1
On Wed, May 29, 2013 at 07:56:11PM +0200, Daniel Vetter wrote:
> Now that we track the cpu transcoder we need accurately in the pipe
> config we can finally fix up the transcoder check. With the current
> code eDP on port D will be broken since we'd errornously cut the
> power.
> 
> For reference see
> 
> commit 2124b72e6283c4e84a55e71077fee91793f4c801
> Author: Paulo Zanoni <paulo.r.zanoni@intel.com>
> Date:   Fri Mar 22 14:07:23 2013 -0300
> 
>     drm/i915: don't disable the power well yet
> 
> Cc: Takashi Iwai <tiwai@suse.de>
> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Adding imre since he smashed his r-b onto the regressing commit.
-Daniel

> ---
>  drivers/gpu/drm/i915/intel_display.c |    6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 3db4ed2..1ee9e92 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -5809,12 +5809,8 @@ static void haswell_modeset_global_resources(struct drm_device *dev)
>  		/* Even the eDP panel fitter is outside the always-on well. */
>  		if (crtc->config.pch_pfit.size && crtc->base.enabled)
>  			enable = true;
> -	}
>  
> -	list_for_each_entry(encoder, &dev->mode_config.encoder_list,
> -			    base.head) {
> -		if (encoder->type != INTEL_OUTPUT_EDP &&
> -		    encoder->connectors_active)
> +		if (crtc->config.cpu_transcoder != TRANSCODER_EDP)
>  			enable = true;
>  	}
>  
> -- 
> 1.7.10.4
>
Daniel Vetter May 29, 2013, 10:52 p.m. UTC | #2
On Wed, May 29, 2013 at 09:45:20PM +0200, Daniel Vetter wrote:
> On Wed, May 29, 2013 at 07:56:11PM +0200, Daniel Vetter wrote:
> > Now that we track the cpu transcoder we need accurately in the pipe
> > config we can finally fix up the transcoder check. With the current
> > code eDP on port D will be broken since we'd errornously cut the
> > power.
> > 
> > For reference see
> > 
> > commit 2124b72e6283c4e84a55e71077fee91793f4c801
> > Author: Paulo Zanoni <paulo.r.zanoni@intel.com>
> > Date:   Fri Mar 22 14:07:23 2013 -0300
> > 
> >     drm/i915: don't disable the power well yet
> > 
> > Cc: Takashi Iwai <tiwai@suse.de>
> > Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> > Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> 
> Adding imre since he smashed his r-b onto the regressing commit.

Meh, replied to the wrong patch, never mind.
-Daniel
Takashi Iwai May 31, 2013, 1:53 p.m. UTC | #3
At Wed, 29 May 2013 19:56:11 +0200,
Daniel Vetter wrote:
> 
> Now that we track the cpu transcoder we need accurately in the pipe
> config we can finally fix up the transcoder check. With the current
> code eDP on port D will be broken since we'd errornously cut the
> power.
> 
> For reference see
> 
> commit 2124b72e6283c4e84a55e71077fee91793f4c801
> Author: Paulo Zanoni <paulo.r.zanoni@intel.com>
> Date:   Fri Mar 22 14:07:23 2013 -0300
> 
>     drm/i915: don't disable the power well yet
> 
> Cc: Takashi Iwai <tiwai@suse.de>

Sorry, I have no hardware that showed the problem around here for
testing now, unfortunately.


Takashi

> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  drivers/gpu/drm/i915/intel_display.c |    6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 3db4ed2..1ee9e92 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -5809,12 +5809,8 @@ static void haswell_modeset_global_resources(struct drm_device *dev)
>  		/* Even the eDP panel fitter is outside the always-on well. */
>  		if (crtc->config.pch_pfit.size && crtc->base.enabled)
>  			enable = true;
> -	}
>  
> -	list_for_each_entry(encoder, &dev->mode_config.encoder_list,
> -			    base.head) {
> -		if (encoder->type != INTEL_OUTPUT_EDP &&
> -		    encoder->connectors_active)
> +		if (crtc->config.cpu_transcoder != TRANSCODER_EDP)
>  			enable = true;
>  	}
>  
> -- 
> 1.7.10.4
>
Paulo Zanoni May 31, 2013, 3:15 p.m. UTC | #4
2013/5/29 Daniel Vetter <daniel.vetter@ffwll.ch>:
> Now that we track the cpu transcoder we need accurately in the pipe
> config we can finally fix up the transcoder check. With the current
> code eDP on port D will be broken since we'd errornously cut the
> power.
>
> For reference see
>
> commit 2124b72e6283c4e84a55e71077fee91793f4c801
> Author: Paulo Zanoni <paulo.r.zanoni@intel.com>
> Date:   Fri Mar 22 14:07:23 2013 -0300
>
>     drm/i915: don't disable the power well yet
>
> Cc: Takashi Iwai <tiwai@suse.de>
> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  drivers/gpu/drm/i915/intel_display.c |    6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 3db4ed2..1ee9e92 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -5809,12 +5809,8 @@ static void haswell_modeset_global_resources(struct drm_device *dev)
>                 /* Even the eDP panel fitter is outside the always-on well. */
>                 if (crtc->config.pch_pfit.size && crtc->base.enabled)
>                         enable = true;
> -       }
>
> -       list_for_each_entry(encoder, &dev->mode_config.encoder_list,
> -                           base.head) {
> -               if (encoder->type != INTEL_OUTPUT_EDP &&
> -                   encoder->connectors_active)
> +               if (crtc->config.cpu_transcoder != TRANSCODER_EDP)

Don't you also need to check for crtc->base.enabled here? If you do
this, please notice that all 3 checks inside the loop will have a
check for crtc->base.enabled inside, so you might want to move that to
a "if (!crtc->base.enabled) continue;" or something similar.

Please also update/remove the comment that has an "XXX" tag.


>                         enable = true;
>         }
>
> --
> 1.7.10.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Daniel Vetter May 31, 2013, 3:23 p.m. UTC | #5
On Fri, May 31, 2013 at 03:53:05PM +0200, Takashi Iwai wrote:
> At Wed, 29 May 2013 19:56:11 +0200,
> Daniel Vetter wrote:
> > 
> > Now that we track the cpu transcoder we need accurately in the pipe
> > config we can finally fix up the transcoder check. With the current
> > code eDP on port D will be broken since we'd errornously cut the
> > power.
> > 
> > For reference see
> > 
> > commit 2124b72e6283c4e84a55e71077fee91793f4c801
> > Author: Paulo Zanoni <paulo.r.zanoni@intel.com>
> > Date:   Fri Mar 22 14:07:23 2013 -0300
> > 
> >     drm/i915: don't disable the power well yet
> > 
> > Cc: Takashi Iwai <tiwai@suse.de>
> 
> Sorry, I have no hardware that showed the problem around here for
> testing now, unfortunately.

Np, that was just an fyi cc ;-)
-Daniel
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 3db4ed2..1ee9e92 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -5809,12 +5809,8 @@  static void haswell_modeset_global_resources(struct drm_device *dev)
 		/* Even the eDP panel fitter is outside the always-on well. */
 		if (crtc->config.pch_pfit.size && crtc->base.enabled)
 			enable = true;
-	}
 
-	list_for_each_entry(encoder, &dev->mode_config.encoder_list,
-			    base.head) {
-		if (encoder->type != INTEL_OUTPUT_EDP &&
-		    encoder->connectors_active)
+		if (crtc->config.cpu_transcoder != TRANSCODER_EDP)
 			enable = true;
 	}