[Intel-gfx] [PATCH 1/9] drm/i915: rename raw reg access functions

Chris Wilson chris at chris-wilson.co.uk
Mon Mar 25 22:57:34 UTC 2019


Quoting Paulo Zanoni (2019-03-25 22:41:55)
> Em seg, 2019-03-25 às 14:49 -0700, Daniele Ceraolo Spurio escreveu:
> > diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
> > index 1816eeae3ba9..3f74889c4212 100644
> > --- a/drivers/gpu/drm/i915/intel_uncore.c
> > +++ b/drivers/gpu/drm/i915/intel_uncore.c
> > @@ -31,7 +31,7 @@
> >  #define FORCEWAKE_ACK_TIMEOUT_MS 50
> >  #define GT_FIFO_TIMEOUT_MS    10
> >  
> > -#define __raw_posting_read(uncore__, reg__) (void)__raw_i915_read32((uncore__), (reg__))
> > +#define __raw_posting_read(...) ((void)__raw_uncore_read32(__VA_ARGS__))
> 
> Now the person trying to figure out what __raw_posting_read() does will
> have to chase __raw_uncore_read32(), which is not even greppable. I'm
> not sure this is an improvement to our codebase, but the neatness of
> just passing everything does have some value. Not really a big deal, so
> I'm not blocking merging on this.

By the time you get down to __raw_versions, you should have established the
pattern in the higher level functions to figure out that by this point
this is just a convenient wrapper around readl. I hope.

Note, you can kill __raw_posting_read() which should help.
-Chris


More information about the Intel-gfx mailing list