All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Tejas Upadhyay <tejaskumarx.surendrakumar.upadhyay@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915/gen11: use ffs for minconfig slice/subslice
Date: Fri, 11 Jun 2021 21:06:07 +0300	[thread overview]
Message-ID: <YMOmDyjjhbiIIuZ5@intel.com> (raw)
In-Reply-To: <20210611143409.827727-1-tejaskumarx.surendrakumar.upadhyay@intel.com>

On Fri, Jun 11, 2021 at 08:04:09PM +0530, Tejas Upadhyay wrote:
> w/a on gen11 platforms not working as expected and causing
> more harm on the RC6 flow. Because of subslice steering
> disturbance w/a read is failing. By using ffs we can default
> steering of slice/sublice to minconfig hence w/a will pass
> and any warns will go away.
> 
> Fixes: fb899dd8ea9c ("drm/i915: Apply Wa_1406680159:icl,ehl as an engine workaround")
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> Cc: Matt Roper <matthew.d.roper@intel.com>
> Signed-off-by: Tejas Upadhyay <tejaskumarx.surendrakumar.upadhyay@intel.com>
> ---
>  drivers/gpu/drm/i915/gt/intel_workarounds.c | 14 +++++++++++---
>  drivers/gpu/drm/i915/intel_pm.c             | 10 +++++++---
>  2 files changed, 18 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c
> index b62d1e31a645..68b14141088a 100644
> --- a/drivers/gpu/drm/i915/gt/intel_workarounds.c
> +++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c
> @@ -991,13 +991,21 @@ wa_init_mcr(struct drm_i915_private *i915, struct i915_wa_list *wal)
>  		l3_en = ~0;
>  	}
>  
> -	slice = fls(sseu->slice_mask) - 1;
> -	subslice = fls(l3_en & intel_sseu_get_subslices(sseu, slice));
> +	if (GRAPHICS_VER(i915) == 11) {
> +		slice = ffs(sseu->slice_mask) - 1;
> +		subslice = ffs(l3_en & intel_sseu_get_subslices(sseu, slice));
> +	} else {
> +		slice = fls(sseu->slice_mask) - 1;
> +		subslice = fls(l3_en & intel_sseu_get_subslices(sseu, slice));
> +	}
>  	if (!subslice) {
>  		drm_warn(&i915->drm,
>  			 "No common index found between subslice mask %x and L3 bank mask %x!\n",
>  			 intel_sseu_get_subslices(sseu, slice), l3_en);
> -		subslice = fls(l3_en);
> +		if (GRAPHICS_VER(i915) == 11)
> +			subslice = ffs(l3_en);
> +		else
> +			subslice = fls(l3_en);
>  		drm_WARN_ON(&i915->drm, !subslice);
>  	}
>  	subslice--;
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 45fefa0ed160..d1352ec3546a 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -4049,9 +4049,13 @@ skl_ddb_entry_for_slices(struct drm_i915_private *dev_priv, u8 slice_mask,
>  		ddb->end = 0;
>  		return;
>  	}
> -
> -	ddb->start = (ffs(slice_mask) - 1) * slice_size;
> -	ddb->end = fls(slice_mask) * slice_size;
> +	if (GRAPHICS_VER(dev_priv) == 11) {
> +		ddb->start = (fls(slice_mask) - 1) * slice_size;
> +		ddb->end = ffs(slice_mask) * slice_size;
> +	} else {
> +		ddb->start = (ffs(slice_mask) - 1) * slice_size;
> +		ddb->end = fls(slice_mask) * slice_size;
> +	}

This code has nothing to do with GT slices.

>  
>  	WARN_ON(ddb->start >= ddb->end);
>  	WARN_ON(ddb->end > INTEL_INFO(dev_priv)->dbuf.size);
> -- 
> 2.31.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2021-06-11 18:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-11 14:34 [Intel-gfx] [PATCH] drm/i915/gen11: use ffs for minconfig slice/subslice Tejas Upadhyay
2021-06-11 17:06 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2021-06-11 18:06 ` Ville Syrjälä [this message]
2021-06-12  9:55   ` [Intel-gfx] [PATCH] " Surendrakumar Upadhyay, TejaskumarX
2021-06-14 16:33     ` Matt Roper
2021-06-11 18:38 ` [Intel-gfx] ✗ Fi.CI.IGT: failure for " 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=YMOmDyjjhbiIIuZ5@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=tejaskumarx.surendrakumar.upadhyay@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.