All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michal Wajdeczko" <michal.wajdeczko@intel.com>
To: intel-gfx@lists.freedesktop.org,
	Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Subject: Re: [PATCH v2 2/2] drm/i915: Introduce intel_reg_types.h
Date: Tue, 20 Aug 2019 17:42:10 +0200	[thread overview]
Message-ID: <op.z6tu8kdjxaggs7@mwajdecz-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <20190820020147.5667-2-daniele.ceraolospurio@intel.com>

On Tue, 20 Aug 2019 04:01:47 +0200, Daniele Ceraolo Spurio  
<daniele.ceraolospurio@intel.com> wrote:


> diff --git a/drivers/gpu/drm/i915/intel_reg_types.h  
> b/drivers/gpu/drm/i915/intel_reg_types.h
> new file mode 100644
> index 000000000000..87bce80dd5ed
> --- /dev/null
> +++ b/drivers/gpu/drm/i915/intel_reg_types.h


> +
> +typedef struct {
> +	u32 reg;
> +} i915_reg_t;
> +
> +#define _MMIO(r) ((const i915_reg_t){ .reg = (r) })
> +
> +#define INVALID_MMIO_REG _MMIO(0)
> +
> +static inline u32 i915_mmio_reg_offset(i915_reg_t reg)
> +{
> +	return reg.reg;
> +}
> +
> +static inline bool i915_mmio_reg_equal(i915_reg_t a, i915_reg_t b)
> +{
> +	return i915_mmio_reg_offset(a) == i915_mmio_reg_offset(b);
> +}
> +
> +static inline bool i915_mmio_reg_valid(i915_reg_t reg)
> +{
> +	return !i915_mmio_reg_equal(reg, INVALID_MMIO_REG);
> +}
> +

hmm, there is now disconnection between prefixes in:

	'intel'_reg_types.h
and
	'i915'_reg_t
	'i915'_mmio_reg_xxx()

that is why I was suggesting to keep:

	'i915'_reg.h (or at your preference 'i915'_reg_types.h)
with
	'i915'_reg_t
	'i915'_mmio_reg_xxx()

and use intel_reg* files for actual hw definitions.

if we don't plan to rename i915_reg_t into intel_mmio_reg_t
then maybe better to stay with i915_reg_types.h ?

Michal

ps. i915/intel prefix rules are killing me too ;)
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2019-08-20 15:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-20  2:01 [PATCH v2 1/2] drm/i915: Dynamically allocate s0ix struct for VLV Daniele Ceraolo Spurio
2019-08-20  2:01 ` [PATCH v2 2/2] drm/i915: Introduce intel_reg_types.h Daniele Ceraolo Spurio
2019-08-20 11:16   ` Chris Wilson
2019-08-20 14:26     ` Chris Wilson
2019-08-20 15:42   ` Michal Wajdeczko [this message]
2019-08-20 18:00     ` Daniele Ceraolo Spurio
2019-08-22 21:16       ` Daniele Ceraolo Spurio
2019-08-23 12:10         ` Jani Nikula
2019-08-23 12:36           ` Jani Nikula
2019-08-23 14:55             ` Daniele Ceraolo Spurio
2019-08-23 16:13               ` Michal Wajdeczko
2019-08-20  2:23 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [v2,1/2] drm/i915: Dynamically allocate s0ix struct for VLV Patchwork
2019-08-20  2:44 ` ✓ Fi.CI.BAT: success " Patchwork
2019-08-20 11:14 ` [PATCH v2 1/2] " Chris Wilson
2019-08-20 12:43 ` ✓ Fi.CI.IGT: success for series starting with [v2,1/2] " 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=op.z6tu8kdjxaggs7@mwajdecz-mobl1.ger.corp.intel.com \
    --to=michal.wajdeczko@intel.com \
    --cc=daniele.ceraolospurio@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.