[Intel-gfx] [PATCH v4 10/12] drm/i915: HSW cdclk support

Damien Lespiau damien.lespiau at intel.com
Fri May 29 05:56:48 PDT 2015


On Fri, May 29, 2015 at 01:06:47PM +0100, Kahola, Mika wrote:
> > > static void broxton_modeset_global_resources(struct drm_atomic_state
> > *old_state)
> > >  		broxton_set_cdclk(dev, req_cdclk);
> > >  }
> > >
> > > +/* compute the max rate for new configuration */ static int
> > > +ilk_max_pixel_rate(struct drm_i915_private *dev_priv) {
> > > +	struct drm_device *dev = dev_priv->dev;
> > > +	struct intel_crtc *crtc;
> > > +	int max_pixel_rate = 0;
> > > +
> > > +	for_each_intel_crtc(dev, crtc) {
> > > +		if (crtc->new_enabled)
> > > +			max_pixel_rate = max((int)max_pixel_rate,
> > > +					     (int)ilk_pipe_pixel_rate(crtc-
> > >config));
> > > +	}
> > > +
> > > +	return max_pixel_rate;
> > > +}
> > 
> > new_enabled doesn't look like what we want to look at, it looks like a
> > temporary field we shouldn't be using in new code. Maybe
> > crtc->state->enable instead?
> 
> You're right! This was a good catch. I was a bit confused which one to
> use here. I'll revise the patch

I've noticed that the BDW patch after that has to be rebased on top of
this change as well.

-- 
Damien


More information about the Intel-gfx mailing list