[Intel-gfx] [PATCH 38/43] drm/i915: Parametrize AUX registes

Ville Syrjälä ville.syrjala at linux.intel.com
Mon Sep 28 06:34:10 PDT 2015


On Mon, Sep 28, 2015 at 03:28:39PM +0200, Daniel Vetter wrote:
> On Mon, Sep 28, 2015 at 03:15:18PM +0300, Jani Nikula wrote:
> > On Fri, 18 Sep 2015, ville.syrjala at linux.intel.com wrote:
> > > @@ -1012,35 +1012,16 @@ intel_dp_aux_transfer(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg)
> > >  static uint32_t g4x_aux_ctl_reg(struct drm_i915_private *dev_priv,
> > >  				enum port port)
> > >  {
> > > -	switch (port) {
> > > -	case PORT_B:
> > > -		return DPB_AUX_CH_CTL;
> > > -	case PORT_C:
> > > -		return DPC_AUX_CH_CTL;
> > > -	case PORT_D:
> > > -		return DPD_AUX_CH_CTL;
> > > -	default:
> > > -		MISSING_CASE(port);
> > > -		return DPB_AUX_CH_CTL;
> > > -	}
> > > +	return DP_AUX_CH_CTL(port);
> > 
> > Together with the previous patch you now lose all MISSING_CASE/BUG/WARN
> > for having an out-of-bounds/unsupported port. I kinda liked them.
> 
> MISSING_REG() to satisfy the typechecks would be good I think. Or
> MISSING_CASE_REG().

I've never caught anything with such checks, but if people want then I
could keep them around. I suppose the fact that we don't have AUX for
port E+ means they could actually be useful here, at least on SKL. For
the other platforms they're pointless IMO, but I can include them there
if people so wish. I didn't actually check if port E on SKL was the only
exception, or if we continue with similar limitations in the future.

-- 
Ville Syrjälä
Intel OTC


More information about the Intel-gfx mailing list