[Intel-gfx] [PATCH 3/4] drm/i915: reorder and reindent the register choosing helper wrappers
Ville Syrjälä
ville.syrjala at linux.intel.com
Wed Oct 31 13:02:45 UTC 2018
On Wed, Oct 31, 2018 at 01:04:52PM +0200, Jani Nikula wrote:
> Try to make it slightly less of an eye sore. No functional changes.
>
> Signed-off-by: Jani Nikula <jani.nikula at intel.com>
> ---
> drivers/gpu/drm/i915/i915_reg.h | 31 +++++++++++++++++--------------
> 1 file changed, 17 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index 0d0145967482..22db12b070af 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -157,20 +157,23 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg)
> /*
> * Named helper wrappers around _PICK_EVEN() and _PICK().
> */
> -#define _PIPE(pipe, a, b) _PICK_EVEN(pipe, a, b)
> -#define _MMIO_PIPE(pipe, a, b) _MMIO(_PIPE(pipe, a, b))
> -#define _PLANE(plane, a, b) _PICK_EVEN(plane, a, b)
> -#define _MMIO_PLANE(plane, a, b) _MMIO(_PLANE(plane, a, b))
> -#define _TRANS(tran, a, b) _PICK_EVEN(tran, a, b)
> -#define _MMIO_TRANS(tran, a, b) _MMIO(_TRANS(tran, a, b))
> -#define _PORT(port, a, b) _PICK_EVEN(port, a, b)
> -#define _MMIO_PORT(port, a, b) _MMIO(_PORT(port, a, b))
> -#define _MMIO_PIPE3(pipe, a, b, c) _MMIO(_PICK(pipe, a, b, c))
> -#define _MMIO_PORT3(pipe, a, b, c) _MMIO(_PICK(pipe, a, b, c))
> -#define _PLL(pll, a, b) _PICK_EVEN(pll, a, b)
> -#define _MMIO_PLL(pll, a, b) _MMIO(_PLL(pll, a, b))
> -#define _PHY3(phy, ...) _PICK(phy, __VA_ARGS__)
> -#define _MMIO_PHY3(phy, a, b, c) _MMIO(_PHY3(phy, a, b, c))
> +#define _PIPE(pipe, a, b) _PICK_EVEN(pipe, a, b)
> +#define _PLANE(plane, a, b) _PICK_EVEN(plane, a, b)
> +#define _TRANS(tran, a, b) _PICK_EVEN(tran, a, b)
> +#define _PORT(port, a, b) _PICK_EVEN(port, a, b)
> +#define _PLL(pll, a, b) _PICK_EVEN(pll, a, b)
> +
> +#define _MMIO_PIPE(pipe, a, b) _MMIO(_PIPE(pipe, a, b))
> +#define _MMIO_PLANE(plane, a, b) _MMIO(_PLANE(plane, a, b))
> +#define _MMIO_TRANS(tran, a, b) _MMIO(_TRANS(tran, a, b))
> +#define _MMIO_PORT(port, a, b) _MMIO(_PORT(port, a, b))
> +#define _MMIO_PLL(pll, a, b) _MMIO(_PLL(pll, a, b))
> +
> +#define _PHY3(phy, ...) _PICK(phy, __VA_ARGS__)
Hmm. Not sure why this is a vararg macro.
Anyways, patch seesm fine
Reviewed-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> +
> +#define _MMIO_PIPE3(pipe, a, b, c) _MMIO(_PICK(pipe, a, b, c))
> +#define _MMIO_PORT3(pipe, a, b, c) _MMIO(_PICK(pipe, a, b, c))
> +#define _MMIO_PHY3(phy, a, b, c) _MMIO(_PHY3(phy, a, b, c))
>
> #define __MASKED_FIELD(mask, value) ((mask) << 16 | (value))
> #define _MASKED_FIELD(mask, value) ({ \
> --
> 2.11.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel
More information about the Intel-gfx
mailing list