public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 17/21] drm/i915: Consolidate some open coded mmio rmw
Date: Thu, 6 Jun 2019 06:46:47 -0700	[thread overview]
Message-ID: <20190606134647.GE3452@intel.com> (raw)
In-Reply-To: <20190606093639.9372-18-tvrtko.ursulin@linux.intel.com>

On Thu, Jun 06, 2019 at 10:36:35AM +0100, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> 
> Replace some gen6/7 open coded rmw with intel_uncore_rmw.
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

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

> ---
>  drivers/gpu/drm/i915/i915_gem_gtt.c | 42 +++++++++++++----------------
>  1 file changed, 18 insertions(+), 24 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index b2c2dc99bf8a..fe9cd4ea9671 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -1697,13 +1697,10 @@ static void gen7_ppgtt_enable(struct intel_uncore *uncore)
>  {
>  	struct drm_i915_private *i915 = uncore_to_i915(uncore);
>  	struct intel_engine_cs *engine;
> -	u32 ecochk, ecobits;
>  	enum intel_engine_id id;
> +	u32 ecochk;
>  
> -	ecobits = intel_uncore_read(uncore, GAC_ECO_BITS);
> -	intel_uncore_write(uncore,
> -			   GAC_ECO_BITS,
> -			   ecobits | ECOBITS_PPGTT_CACHE64B);
> +	intel_uncore_rmw(uncore, GAC_ECO_BITS, 0, ECOBITS_PPGTT_CACHE64B);
>  
>  	ecochk = intel_uncore_read(uncore, GAM_ECOCHK);
>  	if (IS_HASWELL(i915)) {
> @@ -1724,22 +1721,20 @@ static void gen7_ppgtt_enable(struct intel_uncore *uncore)
>  
>  static void gen6_ppgtt_enable(struct intel_uncore *uncore)
>  {
> -	u32 ecochk, gab_ctl, ecobits;
> +	intel_uncore_rmw(uncore,
> +			 GAC_ECO_BITS,
> +			 0,
> +			 ECOBITS_SNB_BIT | ECOBITS_PPGTT_CACHE64B);
>  
> -	ecobits = intel_uncore_read(uncore, GAC_ECO_BITS);
> -	intel_uncore_write(uncore,
> -			   GAC_ECO_BITS,
> -			   ecobits | ECOBITS_SNB_BIT | ECOBITS_PPGTT_CACHE64B);
> +	intel_uncore_rmw(uncore,
> +			 GAB_CTL,
> +			 0,
> +			 GAB_CTL_CONT_AFTER_PAGEFAULT);
>  
> -	gab_ctl = intel_uncore_read(uncore, GAB_CTL);
> -	intel_uncore_write(uncore,
> -			   GAB_CTL,
> -			   gab_ctl | GAB_CTL_CONT_AFTER_PAGEFAULT);
> -
> -	ecochk = intel_uncore_read(uncore, GAM_ECOCHK);
> -	intel_uncore_write(uncore,
> -			   GAM_ECOCHK,
> -			   ecochk | ECOCHK_SNB_BIT | ECOCHK_PPGTT_CACHE64B);
> +	intel_uncore_rmw(uncore,
> +			 GAM_ECOCHK,
> +			 0,
> +			 ECOCHK_SNB_BIT | ECOCHK_PPGTT_CACHE64B);
>  
>  	if (HAS_PPGTT(uncore_to_i915(uncore))) /* may be disabled for VT-d */
>  		intel_uncore_write(uncore,
> @@ -2234,11 +2229,10 @@ static void gtt_write_workarounds(struct intel_uncore *uncore)
>  	 */
>  	if (HAS_PAGE_SIZES(i915, I915_GTT_PAGE_SIZE_64K) &&
>  	    INTEL_GEN(i915) <= 10)
> -		intel_uncore_write(uncore,
> -				   GEN8_GAMW_ECO_DEV_RW_IA,
> -				   intel_uncore_read(uncore,
> -						     GEN8_GAMW_ECO_DEV_RW_IA) |
> -				   GAMW_ECO_ENABLE_64K_IPS_FIELD);
> +		intel_uncore_rmw(uncore,
> +				 GEN8_GAMW_ECO_DEV_RW_IA,
> +				 0,
> +				 GAMW_ECO_ENABLE_64K_IPS_FIELD);
>  }
>  
>  int i915_ppgtt_init_hw(struct intel_uncore *uncore)
> -- 
> 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:[~2019-06-06 13:46 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-06  9:36 [PATCH 00/21] Implicit dev_priv removal Tvrtko Ursulin
2019-06-06  9:36 ` [PATCH 01/21] drm/i915: Reset only affected engines when handling error capture Tvrtko Ursulin
2019-06-06  9:44   ` Chris Wilson
2019-06-06  9:49     ` Tvrtko Ursulin
2019-06-06  9:36 ` [PATCH 02/21] drm/i915: Tidy engine mask types in hangcheck Tvrtko Ursulin
2019-06-06  9:45   ` Chris Wilson
2019-06-06  9:36 ` [PATCH 03/21] drm/i915: Make Gen6/7 RING_FAULT_REG access engine centric Tvrtko Ursulin
2019-06-06  9:47   ` Chris Wilson
2019-06-06  9:36 ` [PATCH 04/21] drm/i915: Extract engine fault reset to a helper Tvrtko Ursulin
2019-06-06  9:48   ` Chris Wilson
2019-06-06  9:36 ` [PATCH 05/21] drm/i915: Make i915_clear_error_registers take uncore Tvrtko Ursulin
2019-06-06  9:50   ` Chris Wilson
2019-06-06  9:51     ` Chris Wilson
2019-06-06 10:29     ` Tvrtko Ursulin
2019-06-06  9:36 ` [PATCH 06/21] drm/i915: Convert some more bits to use engine mmio accessors Tvrtko Ursulin
2019-06-06  9:53   ` Chris Wilson
2019-06-06  9:36 ` [PATCH 07/21] drm/i915: Make read_subslice_reg take uncore Tvrtko Ursulin
2019-06-06  9:54   ` Chris Wilson
2019-06-06  9:36 ` [PATCH 08/21] drm/i915: Tidy intel_execlists_submission_init Tvrtko Ursulin
2019-06-06  9:55   ` Chris Wilson
2019-06-06  9:36 ` [PATCH 09/21] drm/i915: Make i915_check_and_clear_faults take uncore Tvrtko Ursulin
2019-06-06  9:57   ` Chris Wilson
2019-06-06 10:31     ` Tvrtko Ursulin
2019-06-06  9:36 ` [PATCH 10/21] drm/i915: Move scheduler caps init to i915_gem_init Tvrtko Ursulin
2019-06-06  9:59   ` Chris Wilson
2019-06-06  9:36 ` [PATCH 11/21] drm/i915: Remove impossible path from i915_gem_init_swizzling Tvrtko Ursulin
2019-06-06 10:01   ` Chris Wilson
2019-06-06 10:23     ` Tvrtko Ursulin
2019-06-06  9:36 ` [PATCH 12/21] drm/i915: Convert i915_gem_init_swizzling to uncore Tvrtko Ursulin
2019-06-06  9:36 ` [PATCH 13/21] drm/i915: Convert init_unused_rings " Tvrtko Ursulin
2019-06-06  9:36 ` [PATCH 14/21] drm/i915: Convert gt workarounds " Tvrtko Ursulin
2019-06-06  9:36 ` [PATCH 15/21] drm/i915: Convert intel_mocs_init_l3cc_table " Tvrtko Ursulin
2019-06-06  9:36 ` [PATCH 16/21] drm/i915: Convert i915_ppgtt_init_hw " Tvrtko Ursulin
2019-06-06  9:36 ` [PATCH 17/21] drm/i915: Consolidate some open coded mmio rmw Tvrtko Ursulin
2019-06-06 13:46   ` Rodrigo Vivi [this message]
2019-06-06  9:36 ` [PATCH 18/21] drm/i915: Convert i915_gem_init_hw to uncore Tvrtko Ursulin
2019-06-06  9:36 ` [PATCH 19/21] drm/i915: Convert intel_vgt_(de)balloon " Tvrtko Ursulin
2019-06-06  9:36 ` [PATCH 20/21] drm/i915: Make GuC GGTT reservation work on ggtt Tvrtko Ursulin
2019-06-06 11:58   ` Michal Wajdeczko
2019-06-06 12:23     ` Tvrtko Ursulin
2019-06-06 13:21       ` Michal Wajdeczko
2019-06-06 13:44   ` Rodrigo Vivi
2019-06-06  9:36 ` [PATCH 21/21] drm/i915: Unexport i915_gem_init/fini_aliasing_ppgtt Tvrtko Ursulin
2019-06-06 13:39   ` Rodrigo Vivi
2019-06-06 10:05 ` [PATCH 00/21] Implicit dev_priv removal Chris Wilson
2019-06-06 10:35   ` Tvrtko Ursulin
2019-06-06 10:10 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2019-06-06 10:19 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-06-06 12:42 ` ✓ Fi.CI.BAT: success " Patchwork
2019-06-08 15:11 ` ✗ 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=20190606134647.GE3452@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=Intel-gfx@lists.freedesktop.org \
    --cc=tvrtko.ursulin@linux.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