Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 3/4] drm/i915: reorder and reindent the register choosing helper wrappers
Date: Wed, 31 Oct 2018 15:02:45 +0200	[thread overview]
Message-ID: <20181031130245.GL9144@intel.com> (raw)
In-Reply-To: <20181031110453.12722-3-jani.nikula@intel.com>

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@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@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@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-10-31 13:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-31 11:04 [PATCH 1/4] drm/i915: remove palette_offsets from device info in favor of _PICK() Jani Nikula
2018-10-31 11:04 ` [PATCH 2/4] drm/i915: define _MMIO_PLANE() in terms of _PLANE() not _MMIO_PIPE() Jani Nikula
2018-10-31 13:00   ` Ville Syrjälä
2018-10-31 11:04 ` [PATCH 3/4] drm/i915: reorder and reindent the register choosing helper wrappers Jani Nikula
2018-10-31 13:02   ` Ville Syrjälä [this message]
2018-10-31 11:04 ` [PATCH 4/4] drm/i915: also group device info array helper macros with others Jani Nikula
2018-10-31 13:05   ` Ville Syrjälä
2018-10-31 12:57 ` ✓ Fi.CI.BAT: success for series starting with [1/4] drm/i915: remove palette_offsets from device info in favor of _PICK() Patchwork
2018-10-31 12:59 ` [PATCH 1/4] " Ville Syrjälä
2018-11-01 17:09 ` ✓ Fi.CI.BAT: success for series starting with [1/4] " Patchwork
2018-11-01 19:04 ` ✓ Fi.CI.IGT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181031130245.GL9144@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox