[Intel-gfx] [PATCH 20/33] drm/i915: VLV_ADPA must be used in VLV code

Ville Syrjälä ville.syrjala at linux.intel.com
Fri Jan 25 12:59:42 CET 2013


On Thu, Jan 24, 2013 at 11:12:10PM +0100, Daniel Vetter wrote:
> On Thu, Jan 24, 2013 at 03:29:45PM +0200, ville.syrjala at linux.intel.com wrote:
> > From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> > 
> > ADPA doesn't include the required offset, so don't use it in VLV
> > specific code. VLV_ADPA must be used instead.
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_crt.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
> > index 71a5eba..9fe3d67 100644
> > --- a/drivers/gpu/drm/i915/intel_crt.c
> > +++ b/drivers/gpu/drm/i915/intel_crt.c
> > @@ -305,12 +305,12 @@ static bool valleyview_crt_detect_hotplug(struct drm_connector *connector)
> >  	bool ret;
> >  	u32 save_adpa;
> >  
> > -	save_adpa = adpa = I915_READ(ADPA);
> > +	save_adpa = adpa = I915_READ(VLV_ADPA);
> >  	DRM_DEBUG_KMS("trigger hotplug detect cycle: adpa=0x%x\n", adpa);
> >  
> >  	adpa |= ADPA_CRT_HOTPLUG_FORCE_TRIGGER;
> >  
> > -	I915_WRITE(ADPA, adpa);
> > +	I915_WRITE(VLV_ADPA, adpa);
> >  
> >  	if (wait_for((I915_READ(ADPA) & ADPA_CRT_HOTPLUG_FORCE_TRIGGER) == 0,
> >  		     1000)) {
> 
> A few are missing here ... I wonder whether we shouldn't just use
> crt->adpa_reg instead? intel_ironlake_crt_detect_hotplug right above
> suffers from the same by using PCH_ADPA.

Dang. I'll make a patch to use apda_reg always.

> -Daniel
> 
> > @@ -319,7 +319,7 @@ static bool valleyview_crt_detect_hotplug(struct drm_connector *connector)
> >  	}
> >  
> >  	/* Check the status to see if both blue and green are on now */
> > -	adpa = I915_READ(ADPA);
> > +	adpa = I915_READ(VLV_ADPA);
> >  	if ((adpa & ADPA_CRT_HOTPLUG_MONITOR_MASK) != 0)
> >  		ret = true;
> >  	else
> > -- 
> > 1.7.12.4
> > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> -- 
> Daniel Vetter
> Software Engineer, Intel Corporation
> +41 (0) 79 365 57 48 - http://blog.ffwll.ch

-- 
Ville Syrjälä
Intel OTC



More information about the Intel-gfx mailing list