All of 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 9/9] drm/i915: remove last traces of I915_READ(), I915_WRITE() and POSTING_READ()
Date: Thu, 12 Nov 2020 16:02:55 -0500	[thread overview]
Message-ID: <20201112210255.GI1198919@intel.com> (raw)
In-Reply-To: <1406131e49c6f0d74e00b4ac362cc138b3208f8b.1605181350.git.jani.nikula@intel.com>

On Thu, Nov 12, 2020 at 01:44:42PM +0200, Jani Nikula wrote:
> Good riddance! Remove the macros and their remaining references in
> comments.
> 
> The following functions should be used instead, depending on the use
> case:
> 
> - intel_uncore_read(), intel_uncore_write(), intel_uncore_posting_read()
> 
> - intel_de_read(), intel_de_write(), intel_de_posting_read()
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

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

> ---
>  drivers/gpu/drm/i915/display/intel_dvo.c | 4 ----
>  drivers/gpu/drm/i915/i915_drv.h          | 8 --------
>  drivers/gpu/drm/i915/i915_reg.h          | 6 ++++--
>  drivers/gpu/drm/i915/intel_sideband.c    | 4 ++--
>  drivers/gpu/drm/i915/intel_uncore.c      | 2 +-
>  drivers/gpu/drm/i915/intel_uncore.h      | 4 ++--
>  6 files changed, 9 insertions(+), 19 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dvo.c b/drivers/gpu/drm/i915/display/intel_dvo.c
> index 237dbb1ba0ee..090cd76266c6 100644
> --- a/drivers/gpu/drm/i915/display/intel_dvo.c
> +++ b/drivers/gpu/drm/i915/display/intel_dvo.c
> @@ -301,12 +301,8 @@ static void intel_dvo_pre_enable(struct intel_atomic_state *state,
>  	if (adjusted_mode->flags & DRM_MODE_FLAG_PVSYNC)
>  		dvo_val |= DVO_VSYNC_ACTIVE_HIGH;
>  
> -	/*I915_WRITE(DVOB_SRCDIM,
> -	  (adjusted_mode->crtc_hdisplay << DVO_SRCDIM_HORIZONTAL_SHIFT) |
> -	  (adjusted_mode->crtc_vdisplay << DVO_SRCDIM_VERTICAL_SHIFT));*/
>  	intel_de_write(dev_priv, dvo_srcdim_reg,
>  		       (adjusted_mode->crtc_hdisplay << DVO_SRCDIM_HORIZONTAL_SHIFT) | (adjusted_mode->crtc_vdisplay << DVO_SRCDIM_VERTICAL_SHIFT));
> -	/*I915_WRITE(DVOB, dvo_val);*/
>  	intel_de_write(dev_priv, dvo_reg, dvo_val);
>  }
>  
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index fecb5899cbac..42f60b112436 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -1970,14 +1970,6 @@ mkwrite_device_info(struct drm_i915_private *dev_priv)
>  int i915_reg_read_ioctl(struct drm_device *dev, void *data,
>  			struct drm_file *file);
>  
> -#define __I915_REG_OP(op__, dev_priv__, ...) \
> -	intel_uncore_##op__(&(dev_priv__)->uncore, __VA_ARGS__)
> -
> -#define I915_READ(reg__)	 __I915_REG_OP(read, dev_priv, (reg__))
> -#define I915_WRITE(reg__, val__) __I915_REG_OP(write, dev_priv, (reg__), (val__))
> -
> -#define POSTING_READ(reg__)	__I915_REG_OP(posting_read, dev_priv, (reg__))
> -
>  /* 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/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index 7ea70b7ffcc6..568633448202 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -10849,8 +10849,10 @@ enum skl_power_gate {
>  #define  CNL_DRAM_RANK_3			(0x2 << 9)
>  #define  CNL_DRAM_RANK_4			(0x3 << 9)
>  
> -/* Please see hsw_read_dcomp() and hsw_write_dcomp() before using this register,
> - * since on HSW we can't write to it using I915_WRITE. */
> +/*
> + * Please see hsw_read_dcomp() and hsw_write_dcomp() before using this register,
> + * since on HSW we can't write to it using intel_uncore_write.
> + */
>  #define D_COMP_HSW			_MMIO(MCHBAR_MIRROR_BASE_SNB + 0x5F0C)
>  #define D_COMP_BDW			_MMIO(0x138144)
>  #define  D_COMP_RCOMP_IN_PROGRESS	(1 << 9)
> diff --git a/drivers/gpu/drm/i915/intel_sideband.c b/drivers/gpu/drm/i915/intel_sideband.c
> index 02ebf5a04a9b..0ec0cf191955 100644
> --- a/drivers/gpu/drm/i915/intel_sideband.c
> +++ b/drivers/gpu/drm/i915/intel_sideband.c
> @@ -404,8 +404,8 @@ static int __sandybridge_pcode_rw(struct drm_i915_private *i915,
>  	lockdep_assert_held(&i915->sb_lock);
>  
>  	/*
> -	 * GEN6_PCODE_* are outside of the forcewake domain, we can
> -	 * use te fw I915_READ variants to reduce the amount of work
> +	 * GEN6_PCODE_* are outside of the forcewake domain, we can use
> +	 * intel_uncore_read/write_fw variants to reduce the amount of work
>  	 * required when reading/writing.
>  	 */
>  
> diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
> index ef40edfff412..9ac501bcfdad 100644
> --- a/drivers/gpu/drm/i915/intel_uncore.c
> +++ b/drivers/gpu/drm/i915/intel_uncore.c
> @@ -2126,7 +2126,7 @@ int __intel_wait_for_register_fw(struct intel_uncore *uncore,
>   * This routine waits until the target register @reg contains the expected
>   * @value after applying the @mask, i.e. it waits until ::
>   *
> - *     (I915_READ(reg) & mask) == value
> + *     (intel_uncore_read(uncore, reg) & mask) == value
>   *
>   * Otherwise, the wait will timeout after @timeout_ms milliseconds.
>   *
> diff --git a/drivers/gpu/drm/i915/intel_uncore.h b/drivers/gpu/drm/i915/intel_uncore.h
> index 5dcb7f4183b2..59f0da8f1fbb 100644
> --- a/drivers/gpu/drm/i915/intel_uncore.h
> +++ b/drivers/gpu/drm/i915/intel_uncore.h
> @@ -318,8 +318,8 @@ __uncore_write(write_notrace, 32, l, false)
>   * will be implemented using 2 32-bit writes in an arbitrary order with
>   * an arbitrary delay between them. This can cause the hardware to
>   * act upon the intermediate value, possibly leading to corruption and
> - * machine death. For this reason we do not support I915_WRITE64, or
> - * uncore->funcs.mmio_writeq.
> + * machine death. For this reason we do not support intel_uncore_write64,
> + * or uncore->funcs.mmio_writeq.
>   *
>   * When reading a 64-bit value as two 32-bit values, the delay may cause
>   * the two reads to mismatch, e.g. a timestamp overflowing. Also note that
> -- 
> 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 21:01 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
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 [this message]
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=20201112210255.GI1198919@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 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.