[Intel-gfx] [PATCH 10/12] drm/i915: Disable SDVO port after the pipe on PCH platforms

Daniel Vetter daniel at ffwll.ch
Thu May 21 14:24:45 PDT 2015


On Thu, May 21, 2015 at 12:26:21PM -0700, Jesse Barnes wrote:
> On 05/05/2015 07:17 AM, ville.syrjala at linux.intel.com wrote:
> > From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_sdvo.c | 25 +++++++++++++++++--------
> >  1 file changed, 17 insertions(+), 8 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
> > index 4a87691..d24ef75 100644
> > --- a/drivers/gpu/drm/i915/intel_sdvo.c
> > +++ b/drivers/gpu/drm/i915/intel_sdvo.c
> > @@ -1465,6 +1465,15 @@ static void intel_disable_sdvo(struct intel_encoder *encoder)
> >  	}
> >  }
> >  
> > +static void pch_disable_sdvo(struct intel_encoder *encoder)
> > +{
> > +}
> > +
> > +static void pch_post_disable_sdvo(struct intel_encoder *encoder)
> > +{
> > +	intel_disable_sdvo(encoder);
> > +}
> > +
> >  static void intel_enable_sdvo(struct intel_encoder *encoder)
> >  {
> >  	struct drm_device *dev = encoder->base.dev;
> > @@ -1477,14 +1486,9 @@ static void intel_enable_sdvo(struct intel_encoder *encoder)
> >  	bool success;
> >  
> >  	temp = I915_READ(intel_sdvo->sdvo_reg);
> > -	if ((temp & SDVO_ENABLE) == 0) {
> > -		/* HW workaround for IBX, we need to move the port
> > -		 * to transcoder A before disabling it, so restore it here. */
> > -		if (HAS_PCH_IBX(dev))
> > -			temp |= SDVO_PIPE_SEL(intel_crtc->pipe);
> > +	temp |= SDVO_ENABLE;
> > +	intel_sdvo_write_sdvox(intel_sdvo, temp);
> >  
> > -		intel_sdvo_write_sdvox(intel_sdvo, temp | SDVO_ENABLE);
> > -	}
> >  	for (i = 0; i < 2; i++)
> >  		intel_wait_for_vblank(dev, intel_crtc->pipe);
> >  
> > @@ -2987,7 +2991,12 @@ bool intel_sdvo_init(struct drm_device *dev, uint32_t sdvo_reg, bool is_sdvob)
> >  	}
> >  
> >  	intel_encoder->compute_config = intel_sdvo_compute_config;
> > -	intel_encoder->disable = intel_disable_sdvo;
> > +	if (HAS_PCH_SPLIT(dev)) {
> > +		intel_encoder->disable = pch_disable_sdvo;
> > +		intel_encoder->post_disable = pch_post_disable_sdvo;
> > +	} else {
> > +		intel_encoder->disable = intel_disable_sdvo;
> > +	}
> >  	intel_encoder->pre_enable = intel_sdvo_pre_enable;
> >  	intel_encoder->enable = intel_enable_sdvo;
> >  	intel_encoder->get_hw_state = intel_sdvo_get_hw_state;
> > 
> 
> Commit should probably have something about the hw workaround block
> being superceded (assuming that block was intentional in this patch),
> but either way:

I added a small note and merged all the patches. Some minor conflicts
because the 12bpc fixes haven't landed yet since they lack review ...
hint, hint ;-)

> Reviewed-by: Jesse Barnes <jbarnes at virtuousgeek.org>

Thanks for patches&review, Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the Intel-gfx mailing list