[Intel-gfx] [PATCH 08/43] drm/i915: drop register special-casing in forcewake

Daniel Vetter daniel.vetter at ffwll.ch
Thu Dec 15 11:21:27 CET 2011


On Wed, Dec 14, 2011 at 16:05, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> On Wed, 14 Dec 2011 13:57:05 +0100, Daniel Vetter <daniel.vetter at ffwll.ch> wrote:
>> We currently have 3 register for which we must not grab forcewake for:
>> FORCEWAKE, FROCEWAKE_MT and ECOBUS.
>> - FORCEWAKE is excluded in the NEEDS_FORCE_WAKE macro and accessed
>>   with _NOTRACE.
>> - FORCEWAKE_MT is just accessed with _NOTRACE.
>> - ECOBUS is only excluded in the macro.
>>
>> In fear of an ever-growing list of special cases and to cut down the
>> confusion, just access all of them with the _NOTRACE variants.
>
> Instead you build in future confusion by making us guess wtf is this using
> *_NOTRACE. The NOTRACE macro needs a bit of explanation as it now is
> more than simply skipping the tracepoints, and why certain registers
> must be accessed through the macro. Also add that warning to the
> register define.

When I last checked _NOTRACE was only used to avoid the forcewake
dance, hence why I didn't add any comment. Would renaming it to
_NO_FORCEWAKE make you happy, too? Otherwise I think I'll call it _RAW
and smash a bunch of comments all over the place, but imo that's
overkill (and especially in such architectural corner-cases comments
tend to get stale fast or at least not really reflect reality fully
correctly).
-Daniel
-- 
Daniel Vetter
daniel.vetter at ffwll.ch - +41 (0) 79 365 57 48 - http://blog.ffwll.ch



More information about the Intel-gfx mailing list