All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/selftests: Detect unknown swizzling correctly
Date: Thu, 5 Jul 2018 21:35:48 +0300	[thread overview]
Message-ID: <20180705183548.GF5565@intel.com> (raw)
In-Reply-To: <20180705171523.18462-1-chris@chris-wilson.co.uk>

On Thu, Jul 05, 2018 at 06:15:23PM +0100, Chris Wilson wrote:
> i915_gem_detect_bit_6_swizzle() tries to hide unknown swizzling from
> userspace (and ourselves) leaving us with the only clue inside
> i915->quirks & QUIRK_PIN_SWIZZLED_PAGES. If we see this bit set, it
> means that we really have no clue as to what the swizzle pattern is
> being used in any one page and so cannot compute what the reference
> value should be in our tiling selftests. We have to skip the test.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107133
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

i915_gem_detect_bit_6_swizzle() indeed seems to lie.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/selftests/i915_gem_object.c | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_object.c b/drivers/gpu/drm/i915/selftests/i915_gem_object.c
> index 77dd7a510ea6..885153268968 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_gem_object.c
> +++ b/drivers/gpu/drm/i915/selftests/i915_gem_object.c
> @@ -347,6 +347,14 @@ static int igt_partial_tiling(void *arg)
>  		unsigned int pitch;
>  		struct tile tile;
>  
> +		if (i915->quirks & QUIRK_PIN_SWIZZLED_PAGES)
> +			/*
> +			 * The swizzling pattern is actually unknown as it
> +			 * varies based on physical address of each page.
> +			 * See i915_gem_detect_bit_6_swizzle().
> +			 */
> +			break;
> +
>  		tile.tiling = tiling;
>  		switch (tiling) {
>  		case I915_TILING_X:
> @@ -357,8 +365,8 @@ static int igt_partial_tiling(void *arg)
>  			break;
>  		}
>  
> -		if (tile.swizzle == I915_BIT_6_SWIZZLE_UNKNOWN ||
> -		    tile.swizzle == I915_BIT_6_SWIZZLE_9_10_17)
> +		GEM_BUG_ON(tile.swizzle == I915_BIT_6_SWIZZLE_UNKNOWN);
> +		if (tile.swizzle == I915_BIT_6_SWIZZLE_9_10_17)
>  			continue;
>  
>  		if (INTEL_GEN(i915) <= 2) {
> -- 
> 2.18.0
> 
> _______________________________________________
> 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

  reply	other threads:[~2018-07-05 18:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-05 17:15 [PATCH] drm/i915/selftests: Detect unknown swizzling correctly Chris Wilson
2018-07-05 18:35 ` Ville Syrjälä [this message]
2018-07-05 22:00 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-07-06 11:56 ` ✓ 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=20180705183548.GF5565@intel.com \
    --to=ville.syrjala@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 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.