[Intel-gfx] [PATCH 19/26] drm/i915: add ValleyView specific force wake get/put functions
Ben Widawsky
ben at bwidawsk.net
Mon Mar 26 20:20:22 CEST 2012
On Fri, Mar 23, 2012 at 02:20:09PM -0300, Eugeni Dodonov wrote:
> On Thu, Mar 22, 2012 at 18:39, Jesse Barnes <jbarnes at virtuousgeek.org>wrote:
>
> > ValleyView handles force wake differently than previous chipsets, so add
> > a couple of new functions for it. But leave it disabled by default
> > until we test it (need a chip with the Punit enabled first).
> >
> > Signed-off-by: Jesse Barnes <jbarnes at virtuousgeek.org>
> > ---
> > #define NEEDS_FORCE_WAKE(dev_priv, reg) \
> > (((dev_priv)->info->gen >= 6) && \
> > ((reg) < 0x40000) && \
> > - ((reg) != FORCEWAKE))
> > + ((reg) != FORCEWAKE)) && \
> > + (!IS_VALLEYVIEW((dev_priv)->dev))
> >
>
> In the spirit of bikeshedding, I think that NEEDS_FORCE_WAKE is becoming a
> bit scary this way. But I don't know if it makes sense to move the gen and
> dev check into a feature flag, to avoid similar issues with possible future
> generations of chips..
Agreed. I think the better approach is to check if the fwake function
pointers are !NULL also (since it will apply to other chipsets
potentially as well).
>
> --
> Eugeni Dodonov
> <http://eugeni.dodonov.net/>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
More information about the Intel-gfx
mailing list