Re: [PATCH 1/3] drm/i915: rename macro parameter(ring) to (engine)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 20, 2016 at 06:16:05PM +0100, Dave Gordon wrote:
> 'ring' is an old deprecated term for a GPU engine. Here we make the
> terminology more consistent by renaming the 'ring' parameter of lots of
> macros that calculate addresses within the MMIO space of an engine.
> 
> Signed-off-by: Dave Gordon <david.s.gordon@xxxxxxxxx>
Reviewed-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>

> ---
>  drivers/gpu/drm/i915/i915_reg.h         | 14 +++++++-------
>  drivers/gpu/drm/i915/intel_lrc.h        | 16 ++++++++--------
>  drivers/gpu/drm/i915/intel_ringbuffer.h | 24 ++++++++++++------------
>  3 files changed, 27 insertions(+), 27 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index 8bfde75..559c9d7 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -186,13 +186,13 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg)
>  #define  GEN9_GRDOM_GUC			(1 << 5)
>  #define  GEN8_GRDOM_MEDIA2		(1 << 7)
>  
> -#define RING_PP_DIR_BASE(ring)		_MMIO((ring)->mmio_base+0x228)
> -#define RING_PP_DIR_BASE_READ(ring)	_MMIO((ring)->mmio_base+0x518)
> -#define RING_PP_DIR_DCLV(ring)		_MMIO((ring)->mmio_base+0x220)
> +#define RING_PP_DIR_BASE(engine)	_MMIO((engine)->mmio_base+0x228)
> +#define RING_PP_DIR_BASE_READ(engine)	_MMIO((engine)->mmio_base+0x518)
> +#define RING_PP_DIR_DCLV(engine)	_MMIO((engine)->mmio_base+0x220)
>  #define   PP_DIR_DCLV_2G		0xffffffff

Since these registers don't refer to the actual ring buffer, but the
state of the engine itself, I was thinking about updating the RING_
prefix as well. I didn't think it is worth it atm.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux