Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 2/9] drm/i915: remove last traces of I915_READ_FW() and I915_WRITE_FW()
Date: Thu, 12 Nov 2020 15:19:46 -0500	[thread overview]
Message-ID: <20201112201946.GC1198919@intel.com> (raw)
In-Reply-To: <207faf5383f0ec1c37199d827b32e426111a95e2.1605181350.git.jani.nikula@intel.com>

On Thu, Nov 12, 2020 at 01:44:35PM +0200, Jani Nikula wrote:
> Good riddance! Remove the macros and their remaining references in
> comments.
> 
> intel_uncore_read_fw() and intel_uncore_write_fw() should be used
> instead.
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> ---
>  drivers/gpu/drm/i915/i915_drv.h     | 29 -----------------------------
>  drivers/gpu/drm/i915/intel_uncore.c |  2 +-
>  drivers/gpu/drm/i915/intel_uncore.h |  2 +-
>  3 files changed, 2 insertions(+), 31 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 15be8debae54..fecb5899cbac 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -1978,35 +1978,6 @@ int i915_reg_read_ioctl(struct drm_device *dev, void *data,
>  
>  #define POSTING_READ(reg__)	__I915_REG_OP(posting_read, dev_priv, (reg__))
>  
> -/* These are untraced mmio-accessors that are only valid to be used inside
> - * critical sections, such as inside IRQ handlers, where forcewake is explicitly
> - * controlled.
> - *
> - * Think twice, and think again, before using these.
> - *
> - * As an example, these accessors can possibly be used between:
> - *
> - * spin_lock_irq(&dev_priv->uncore.lock);
> - * intel_uncore_forcewake_get__locked();
> - *
> - * and
> - *
> - * intel_uncore_forcewake_put__locked();
> - * spin_unlock_irq(&dev_priv->uncore.lock);
> - *
> - *
> - * Note: some registers may not need forcewake held, so
> - * intel_uncore_forcewake_{get,put} can be omitted, see
> - * intel_uncore_forcewake_for_reg().
> - *
> - * Certain architectures will die if the same cacheline is concurrently accessed
> - * by different clients (e.g. on Ivybridge). Access to registers should
> - * therefore generally be serialised, by either the dev_priv->uncore.lock or
> - * a more localised lock guarding all access to that bank of registers.
> - */
> -#define I915_READ_FW(reg__) __I915_REG_OP(read_fw, dev_priv, (reg__))
> -#define I915_WRITE_FW(reg__, val__) __I915_REG_OP(write_fw, dev_priv, (reg__), (val__))
> -
>  /* i915_mm.c */
>  int remap_io_mapping(struct vm_area_struct *vma,
>  		     unsigned long addr, unsigned long pfn, unsigned long size,
> diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
> index 1c14a07eba7d..ef40edfff412 100644
> --- a/drivers/gpu/drm/i915/intel_uncore.c
> +++ b/drivers/gpu/drm/i915/intel_uncore.c
> @@ -2070,7 +2070,7 @@ int i915_reg_read_ioctl(struct drm_device *dev,
>   * This routine waits until the target register @reg contains the expected
>   * @value after applying the @mask, i.e. it waits until ::
>   *
> - *     (I915_READ_FW(reg) & mask) == value
> + *     (intel_uncore_read_fw(uncore, reg) & mask) == value
>   *
>   * Otherwise, the wait will timeout after @slow_timeout_ms milliseconds.
>   * For atomic context @slow_timeout_ms must be zero and @fast_timeout_us
> diff --git a/drivers/gpu/drm/i915/intel_uncore.h b/drivers/gpu/drm/i915/intel_uncore.h
> index bd2467284295..5dcb7f4183b2 100644
> --- a/drivers/gpu/drm/i915/intel_uncore.h
> +++ b/drivers/gpu/drm/i915/intel_uncore.h
> @@ -216,7 +216,7 @@ void intel_uncore_forcewake_flush(struct intel_uncore *uncore,
>  
>  /*
>   * Like above but the caller must manage the uncore.lock itself.
> - * Must be used with I915_READ_FW and friends.
> + * Must be used with intel_uncore_read_fw() and friends.
>   */
>  void intel_uncore_forcewake_get__locked(struct intel_uncore *uncore,
>  					enum forcewake_domains domains);
> -- 
> 2.20.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2020-11-12 20:18 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-12 11:44 [Intel-gfx] [PATCH 0/9] drm/i915: nuke remaining legacy reg helpers (I915_READ/WRITE etc.) Jani Nikula
2020-11-12 11:44 ` [Intel-gfx] [PATCH 1/9] drm/i915: remove last users of I915_READ_FW() Jani Nikula
2020-11-12 20:17   ` Rodrigo Vivi
2020-11-12 20:24   ` Chris Wilson
2020-11-12 11:44 ` [Intel-gfx] [PATCH 2/9] drm/i915: remove last traces of I915_READ_FW() and I915_WRITE_FW() Jani Nikula
2020-11-12 20:19   ` Rodrigo Vivi [this message]
2020-11-12 20:26   ` Chris Wilson
2020-11-12 11:44 ` [Intel-gfx] [PATCH 3/9] drm/i915/cdclk: prefer intel_de_write() over I915_WRITE() Jani Nikula
2020-11-12 20:20   ` Rodrigo Vivi
2020-11-12 11:44 ` [Intel-gfx] [PATCH 4/9] drm/i915/debugfs: replace I915_READ()+I915_WRITE() with intel_uncore_rmw() Jani Nikula
2020-11-12 20:21   ` Rodrigo Vivi
2020-11-12 20:28   ` Chris Wilson
2020-11-12 11:44 ` [Intel-gfx] [PATCH 5/9] drm/i915/debugfs: replace I915_READ() with intel_uncore_read() Jani Nikula
2020-11-12 20:23   ` Rodrigo Vivi
2020-11-12 11:44 ` [Intel-gfx] [PATCH 6/9] drm/i915/suspend: replace I915_READ()/WRITE() with intel_de_read()/write() Jani Nikula
2020-11-12 20:27   ` Rodrigo Vivi
2020-11-12 11:44 ` [Intel-gfx] [PATCH 7/9] drm/i915/pm: replace I915_READ()/WRITE() with intel_uncore_read()/write() Jani Nikula
2020-11-12 21:00   ` Rodrigo Vivi
2020-11-13  7:47     ` Jani Nikula
2020-11-14 20:34       ` Rodrigo Vivi
2020-11-12 11:44 ` [Intel-gfx] [PATCH 8/9] drm/i915/irq: " Jani Nikula
2020-11-12 11:44 ` [Intel-gfx] [PATCH 9/9] drm/i915: remove last traces of I915_READ(), I915_WRITE() and POSTING_READ() Jani Nikula
2020-11-12 21:02   ` Rodrigo Vivi
2020-11-12 12:35 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: nuke remaining legacy reg helpers (I915_READ/WRITE etc.) Patchwork
2020-11-12 13:06 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-11-12 14:51 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " 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=20201112201946.GC1198919@intel.com \
    --to=rodrigo.vivi@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