Message ID | 20190417223742.28246-2-jose.souza@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v4,1/4] drm/i915/bdw+: Move misc display IRQ handling to it own function | expand |
On Wed, 2019-04-17 at 15:37 -0700, José Roberto de Souza wrote: > A new macro that is going to be added in a further patch will need to > adjust the offset returned by _MMIO_TRANS2(), so here adding > _TRANS2() and moving most of the implementation of _MMIO_TRANS2() to > it and while at it taking the opportunity to rename pipe to trans. > > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> > Signed-off-by: José Roberto de Souza <jose.souza@intel.com> > --- > drivers/gpu/drm/i915/i915_reg.h | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h > index b74824f0b5b1..9ef306b79e0d 100644 > --- a/drivers/gpu/drm/i915/i915_reg.h > +++ b/drivers/gpu/drm/i915/i915_reg.h > @@ -250,9 +250,10 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg) > #define _MMIO_PIPE2(pipe, reg) _MMIO(INTEL_INFO(dev_priv)- > > pipe_offsets[pipe] - \ > > INTEL_INFO(dev_priv)- > > pipe_offsets[PIPE_A] + (reg) + \ > > DISPLAY_MMIO_BASE(dev_priv)) > -#define _MMIO_TRANS2(pipe, reg) _MMIO(INTEL_INFO(dev_priv)- > > trans_offsets[(pipe)] - \ > > - INTEL_INFO(dev_priv)- > > trans_offsets[TRANSCODER_A] + (reg) + \ > > - DISPLAY_MMIO_BASE(dev_priv)) > +#define _TRANS2(trans, reg) (INTEL_INFO(dev_priv)- _TRANS() and _MMIO_TRANS() name the first argument "tran" Can you please keep the same name "tran"? Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiya@intel.com> > > trans_offsets[(trans)] - \ > > + INTEL_INFO(dev_priv)- > > trans_offsets[TRANSCODER_A] + (reg) + \ > > + DISPLAY_MMIO_BASE(dev_priv)) > +#define _MMIO_TRANS2(trans, reg) _MMIO(_TRANS2(trans, reg)) > #define _CURSOR2(pipe, reg) _MMIO(INTEL_INFO(dev_priv)- > > cursor_offsets[(pipe)] - \ > > INTEL_INFO(dev_priv)- > > cursor_offsets[PIPE_A] + (reg) + \ > > DISPLAY_MMIO_BASE(dev_priv))
On Wed, 2019-04-17 at 15:37 -0700, José Roberto de Souza wrote: > A new macro that is going to be added in a further patch will need to > adjust the offset returned by _MMIO_TRANS2(), so here adding > _TRANS2() and moving most of the implementation of _MMIO_TRANS2() to > it and while at it taking the opportunity to rename pipe to trans. > > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> > Signed-off-by: José Roberto de Souza <jose.souza@intel.com> > --- > drivers/gpu/drm/i915/i915_reg.h | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h > index b74824f0b5b1..9ef306b79e0d 100644 > --- a/drivers/gpu/drm/i915/i915_reg.h > +++ b/drivers/gpu/drm/i915/i915_reg.h > @@ -250,9 +250,10 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg) > #define _MMIO_PIPE2(pipe, reg) _MMIO(INTEL_INFO(dev_priv)- > >pipe_offsets[pipe] - \ > INTEL_INFO(dev_priv)- > >pipe_offsets[PIPE_A] + (reg) + \ > DISPLAY_MMIO_BASE(dev_priv)) > -#define _MMIO_TRANS2(pipe, reg) _MMIO(INTEL_INFO(dev_priv)- > >trans_offsets[(pipe)] - \ > - INTEL_INFO(dev_priv)- > >trans_offsets[TRANSCODER_A] + (reg) + \ > - DISPLAY_MMIO_BASE(dev_priv)) > +#define _TRANS2(trans, reg) (INTEL_INFO(dev_priv)- _TRANS() and _MMIO_TRANS() name the first argument "tran" Can you please keep the same name "tran"? Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiya@intel.com> > >trans_offsets[(trans)] - \ > + INTEL_INFO(dev_priv)- > >trans_offsets[TRANSCODER_A] + (reg) + \ > + DISPLAY_MMIO_BASE(dev_priv)) > +#define _MMIO_TRANS2(trans, reg) _MMIO(_TRANS2(trans, reg)) > #define _CURSOR2(pipe, reg) _MMIO(INTEL_INFO(dev_priv)- > >cursor_offsets[(pipe)] - \ > INTEL_INFO(dev_priv)- > >cursor_offsets[PIPE_A] + (reg) + \ > DISPLAY_MMIO_BASE(dev_priv))
On Wed, Apr 17, 2019 at 09:09:40PM -0700, Dhinakaran Pandiyan wrote: >On Wed, 2019-04-17 at 15:37 -0700, José Roberto de Souza wrote: >> A new macro that is going to be added in a further patch will need to >> adjust the offset returned by _MMIO_TRANS2(), so here adding >> _TRANS2() and moving most of the implementation of _MMIO_TRANS2() to >> it and while at it taking the opportunity to rename pipe to trans. >> >> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> >> Signed-off-by: José Roberto de Souza <jose.souza@intel.com> >> --- >> drivers/gpu/drm/i915/i915_reg.h | 7 ++++--- >> 1 file changed, 4 insertions(+), 3 deletions(-) >> >> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h >> index b74824f0b5b1..9ef306b79e0d 100644 >> --- a/drivers/gpu/drm/i915/i915_reg.h >> +++ b/drivers/gpu/drm/i915/i915_reg.h >> @@ -250,9 +250,10 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg) >> #define _MMIO_PIPE2(pipe, reg) _MMIO(INTEL_INFO(dev_priv)- >> > pipe_offsets[pipe] - \ >> >> INTEL_INFO(dev_priv)- >> > pipe_offsets[PIPE_A] + (reg) + \ >> >> DISPLAY_MMIO_BASE(dev_priv)) >> -#define _MMIO_TRANS2(pipe, reg) _MMIO(INTEL_INFO(dev_priv)- >> > trans_offsets[(pipe)] - \ >> >> - INTEL_INFO(dev_priv)- >> > trans_offsets[TRANSCODER_A] + (reg) + \ >> >> - DISPLAY_MMIO_BASE(dev_priv)) >> +#define _TRANS2(trans, reg) (INTEL_INFO(dev_priv)- > >_TRANS() and _MMIO_TRANS() name the first argument "tran" > >Can you please keep the same name "tran"? humn... but we also have several local "trans" variables, HTOTAL(), HBLANK, etc, and there's also "trans_offsets" that is used here. _TRANS() and _MMIO_TRANS() look more like the offenders to me. For the patch, regardless of the argument name: Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Lucas De Marchi > >Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiya@intel.com> > >> > trans_offsets[(trans)] - \ >> >> + INTEL_INFO(dev_priv)- >> > trans_offsets[TRANSCODER_A] + (reg) + \ >> >> + DISPLAY_MMIO_BASE(dev_priv)) >> +#define _MMIO_TRANS2(trans, reg) _MMIO(_TRANS2(trans, reg)) >> #define _CURSOR2(pipe, reg) _MMIO(INTEL_INFO(dev_priv)- >> > cursor_offsets[(pipe)] - \ >> >> INTEL_INFO(dev_priv)- >> > cursor_offsets[PIPE_A] + (reg) + \ >> >> DISPLAY_MMIO_BASE(dev_priv)) > >_______________________________________________ >Intel-gfx mailing list >Intel-gfx@lists.freedesktop.org >https://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index b74824f0b5b1..9ef306b79e0d 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h @@ -250,9 +250,10 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg) #define _MMIO_PIPE2(pipe, reg) _MMIO(INTEL_INFO(dev_priv)->pipe_offsets[pipe] - \ INTEL_INFO(dev_priv)->pipe_offsets[PIPE_A] + (reg) + \ DISPLAY_MMIO_BASE(dev_priv)) -#define _MMIO_TRANS2(pipe, reg) _MMIO(INTEL_INFO(dev_priv)->trans_offsets[(pipe)] - \ - INTEL_INFO(dev_priv)->trans_offsets[TRANSCODER_A] + (reg) + \ - DISPLAY_MMIO_BASE(dev_priv)) +#define _TRANS2(trans, reg) (INTEL_INFO(dev_priv)->trans_offsets[(trans)] - \ + INTEL_INFO(dev_priv)->trans_offsets[TRANSCODER_A] + (reg) + \ + DISPLAY_MMIO_BASE(dev_priv)) +#define _MMIO_TRANS2(trans, reg) _MMIO(_TRANS2(trans, reg)) #define _CURSOR2(pipe, reg) _MMIO(INTEL_INFO(dev_priv)->cursor_offsets[(pipe)] - \ INTEL_INFO(dev_priv)->cursor_offsets[PIPE_A] + (reg) + \ DISPLAY_MMIO_BASE(dev_priv))
A new macro that is going to be added in a further patch will need to adjust the offset returned by _MMIO_TRANS2(), so here adding _TRANS2() and moving most of the implementation of _MMIO_TRANS2() to it and while at it taking the opportunity to rename pipe to trans. Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com> --- drivers/gpu/drm/i915/i915_reg.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)