All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>,
	intel-gfx@lists.freedesktop.org
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Subject: Re: [PATCH 9/9] drm/i915: take a reference to uncore in the engine and use it
Date: Mon, 25 Mar 2019 22:21:18 +0000	[thread overview]
Message-ID: <155355247795.15930.11145484223766306280@skylake-alporthouse-com> (raw)
In-Reply-To: <20190325214940.23632-10-daniele.ceraolospurio@intel.com>

Quoting Daniele Ceraolo Spurio (2019-03-25 21:49:40)
> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h
> index a02c92dac5da..e58d6f04177b 100644
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.h
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.h
> @@ -29,23 +29,44 @@ struct drm_printer;
>  #define CACHELINE_BYTES 64
>  #define CACHELINE_DWORDS (CACHELINE_BYTES / sizeof(u32))
>  
> -#define I915_READ_TAIL(engine) I915_READ(RING_TAIL((engine)->mmio_base))
> -#define I915_WRITE_TAIL(engine, val) I915_WRITE(RING_TAIL((engine)->mmio_base), val)
> +/*
> + * The register defines to be used with the following macros need to accept a
> + * base param, e.g:
> + *
> + * REG_FOO(base) _MMIO((base) + <relative offset>)
> + * ENGINE_READ(engine, REG_FOO);
> + *
> + * register arrays are to be defined and accessed as follows:
> + *
> + * REG_BAR(base, i) _MMIO((base) + <relative offset> + (i) * <shift>)
> + * ENGINE_READ_IDX(engine, REG_BAR, i)
> + */
> +
> +#define __ENGINE_REG_OP(op__, engine__, ...) \
> +       intel_uncore_##op__((engine__)->uncore, __VA_ARGS__)
> +
> +#define __ENGINE_READ_OP(op__, engine__, reg__) \
> +       __ENGINE_REG_OP(op__, (engine__), reg__((engine__)->mmio_base))

I'm warming to ENGINE_READ/WRITE. I must admit I was hoping to lose the
macros and all the shouting.

I was just stopping by here to say, now would be the perfect opportunity
to split this out into intel_engine_reg.h ?
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-03-25 22:21 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-25 21:49 [PATCH 0/9] more uncore rework Daniele Ceraolo Spurio
2019-03-25 21:49 ` [PATCH 1/9] drm/i915: rename raw reg access functions Daniele Ceraolo Spurio
2019-03-25 22:41   ` Paulo Zanoni
2019-03-25 22:57     ` Chris Wilson
2019-03-26  4:18   ` kbuild test robot
2019-03-26  4:37   ` kbuild test robot
2019-03-25 21:49 ` [PATCH 2/9] drm/i915: add HAS_FORCEWAKE flag to uncore Daniele Ceraolo Spurio
2019-03-26  0:13   ` Paulo Zanoni
2019-03-26 12:47   ` Michal Wajdeczko
2019-03-26 21:48     ` Chris Wilson
2019-03-25 21:49 ` [PATCH 3/9] drm/i915: add uncore flags for unclaimed mmio Daniele Ceraolo Spurio
2019-03-26  0:19   ` Paulo Zanoni
2019-03-25 21:49 ` [PATCH 4/9] drm/i915: take a ref to the rpm in the uncore structure Daniele Ceraolo Spurio
2019-03-25 21:49 ` [PATCH 5/9] drm/i915: switch uncore mmio funcs to use intel_uncore Daniele Ceraolo Spurio
2019-03-25 21:49 ` [PATCH 6/9] drm/i915: switch intel_uncore_forcewake_for_reg to intel_uncore Daniele Ceraolo Spurio
2019-03-26  9:20   ` kbuild test robot
2019-03-25 21:49 ` [PATCH 7/9] drm/i915: intel_wait_for_register_fw to uncore Daniele Ceraolo Spurio
2019-03-25 22:09   ` Chris Wilson
2019-03-26 15:12   ` kbuild test robot
2019-03-25 21:49 ` [PATCH 8/9] drm/i915: switch intel_wait_for_register " Daniele Ceraolo Spurio
2019-03-26 19:17   ` kbuild test robot
2019-03-25 21:49 ` [PATCH 9/9] drm/i915: take a reference to uncore in the engine and use it Daniele Ceraolo Spurio
2019-03-25 22:21   ` Chris Wilson [this message]
2019-03-26 12:01 ` ✗ Fi.CI.CHECKPATCH: warning for more uncore rework Patchwork
2019-03-26 12:06 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-03-26 12:29 ` ✓ Fi.CI.BAT: success " Patchwork
2019-03-26 16:46 ` ✓ 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=155355247795.15930.11145484223766306280@skylake-alporthouse-com \
    --to=chris@chris-wilson.co.uk \
    --cc=daniele.ceraolospurio@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=paulo.r.zanoni@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.