Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 1/4] drm/i915: Verify workarounds immediately after application
Date: Tue, 16 Apr 2019 10:18:51 +0100	[thread overview]
Message-ID: <6e024b42-e0be-40d3-61dc-d8f23f9d497c@linux.intel.com> (raw)
In-Reply-To: <20190416081024.20536-1-chris@chris-wilson.co.uk>


On 16/04/2019 09:10, Chris Wilson wrote:
> Immediately after writing the workaround, verify that it stuck in the
> register.
> 
> References: https://bugs.freedesktop.org/show_bug.cgi?id=108954
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> ---
>   drivers/gpu/drm/i915/intel_workarounds.c | 32 +++++++++++++-----------
>   1 file changed, 18 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_workarounds.c b/drivers/gpu/drm/i915/intel_workarounds.c
> index ccaf63679435..1c54b5030807 100644
> --- a/drivers/gpu/drm/i915/intel_workarounds.c
> +++ b/drivers/gpu/drm/i915/intel_workarounds.c
> @@ -913,6 +913,20 @@ wal_get_fw_for_rmw(struct intel_uncore *uncore, const struct i915_wa_list *wal)
>   	return fw;
>   }
>   
> +static bool
> +wa_verify(const struct i915_wa *wa, u32 cur, const char *name, const char *from)
> +{
> +	if ((cur ^ wa->val) & wa->mask) {
> +		DRM_ERROR("%s workaround lost on %s! (%x=%x/%x, expected %x, mask=%x)\n",
> +			  name, from, i915_mmio_reg_offset(wa->reg), cur,
> +			  cur & wa->mask, wa->val, wa->mask);
> +
> +		return false;
> +	}
> +
> +	return true;
> +}
> +
>   static void
>   wa_list_apply(struct intel_uncore *uncore, const struct i915_wa_list *wal)
>   {
> @@ -931,6 +945,10 @@ wa_list_apply(struct intel_uncore *uncore, const struct i915_wa_list *wal)
>   
>   	for (i = 0, wa = wal->list; i < wal->count; i++, wa++) {
>   		intel_uncore_rmw_fw(uncore, wa->reg, wa->mask, wa->val);
> +		if (IS_ENABLED(CONFIG_DRM_I915_DEBUG_GEM))
> +			wa_verify(wa,
> +				  intel_uncore_read_fw(uncore, wa->reg),
> +				  wal->name, "applictation");

application

>   	}
>   
>   	intel_uncore_forcewake_put__locked(uncore, fw);
> @@ -942,20 +960,6 @@ void intel_gt_apply_workarounds(struct drm_i915_private *i915)
>   	wa_list_apply(&i915->uncore, &i915->gt_wa_list);
>   }
>   
> -static bool
> -wa_verify(const struct i915_wa *wa, u32 cur, const char *name, const char *from)
> -{
> -	if ((cur ^ wa->val) & wa->mask) {
> -		DRM_ERROR("%s workaround lost on %s! (%x=%x/%x, expected %x, mask=%x)\n",
> -			  name, from, i915_mmio_reg_offset(wa->reg), cur,
> -			  cur & wa->mask, wa->val, wa->mask);
> -
> -		return false;
> -	}
> -
> -	return true;
> -}
> -
>   static bool wa_list_verify(struct intel_uncore *uncore,
>   			   const struct i915_wa_list *wal,
>   			   const char *from)
> 

With the typo fixed:

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2019-04-16  9:18 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-16  8:10 [PATCH v2 1/4] drm/i915: Verify workarounds immediately after application Chris Wilson
2019-04-16  8:10 ` [PATCH v2 2/4] drm/i915: Verify the engine workarounds stick on application Chris Wilson
2019-04-16  9:43   ` Tvrtko Ursulin
2019-04-16  9:57     ` Chris Wilson
2019-04-16 10:36       ` Tvrtko Ursulin
2019-04-16 10:49         ` Chris Wilson
2019-04-16  8:10 ` [PATCH v2 3/4] drm/i915: Make workaround verification *optional* Chris Wilson
2019-04-16  9:48   ` Tvrtko Ursulin
2019-04-16 11:24     ` Chris Wilson
2019-04-16  8:10 ` [PATCH v2 4/4] drm/i915/selftests: Verify whitelist of context registers Chris Wilson
2019-04-16  9:12   ` [PATCH] " Chris Wilson
2019-04-16 14:50     ` Tvrtko Ursulin
2019-04-24 10:00       ` Chris Wilson
2019-04-24 11:03         ` Chris Wilson
2019-04-24 11:10           ` Tvrtko Ursulin
2019-04-16 21:28   ` [PATCH v2 4/4] " kbuild test robot
2019-04-16  9:18 ` Tvrtko Ursulin [this message]
2019-04-16 11:10 ` ✓ Fi.CI.BAT: success for series starting with [v2,1/4] drm/i915: Verify workarounds immediately after application (rev2) Patchwork
2019-04-16 15:07 ` ✓ 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=6e024b42-e0be-40d3-61dc-d8f23f9d497c@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /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