* Re: [PATCH] drm/i915: Declare the swizzling unknown for L-shaped configurations
2015-06-28 8:19 [PATCH] drm/i915: Declare the swizzling unknown for L-shaped configurations Chris Wilson
@ 2015-06-28 12:52 ` Chris Wilson
2015-06-29 12:25 ` Jani Nikula
2015-06-29 7:07 ` Daniel Vetter
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Chris Wilson @ 2015-06-28 12:52 UTC (permalink / raw)
To: intel-gfx; +Cc: Daniel Vetter, stable
On Sun, Jun 28, 2015 at 09:19:26AM +0100, Chris Wilson wrote:
> The old style of memory interleaving swizzled upto the end of the
> first even bank of memory, and then used the remainder as unswizzled on
> the unpaired bank - i.e. swizzling is not constant for all memory. This
> causes problems when we try to migrate memory and so the kernel prevents
> migration at all when we detect L-shaped inconsistent swizzling.
> However, this issue also extends to userspace who try to manually detile
> into memory as the swizzling for an individual page is unknown (it
> depends on its physical address only known to the kernel), userspace
> cannot correctly swizzle.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91105
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: stable@vger.kernel.org
> ---
> drivers/gpu/drm/i915/i915_gem_tiling.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_tiling.c b/drivers/gpu/drm/i915/i915_gem_tiling.c
> index d16585f788ea..ff96ae9b77bc 100644
> --- a/drivers/gpu/drm/i915/i915_gem_tiling.c
> +++ b/drivers/gpu/drm/i915/i915_gem_tiling.c
> @@ -447,7 +447,10 @@ i915_gem_get_tiling(struct drm_device *dev, void *data,
> }
>
> /* Hide bit 17 from the user -- see comment in i915_gem_set_tiling */
> - args->phys_swizzle_mode = args->swizzle_mode;
> + if (dev_priv->quirks & QUIRK_PIN_SWIZZLED_PAGES)
> + args->phys_swizzle_mode = I915_BIT_6_SWIZZLE_UNKNOWN;
> + else
> + args->phys_swizzle_mode = args->swizzle_mode;
It may be better to store the dev_priv->mm.bit_6_swizzle_[xy] as UNKNOWN
for L-shaped memory. I think that would be more correct.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915: Declare the swizzling unknown for L-shaped configurations
2015-06-28 12:52 ` Chris Wilson
@ 2015-06-29 12:25 ` Jani Nikula
0 siblings, 0 replies; 9+ messages in thread
From: Jani Nikula @ 2015-06-29 12:25 UTC (permalink / raw)
To: Chris Wilson, intel-gfx; +Cc: Daniel Vetter, stable
On Sun, 28 Jun 2015, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> On Sun, Jun 28, 2015 at 09:19:26AM +0100, Chris Wilson wrote:
>> The old style of memory interleaving swizzled upto the end of the
>> first even bank of memory, and then used the remainder as unswizzled on
>> the unpaired bank - i.e. swizzling is not constant for all memory. This
>> causes problems when we try to migrate memory and so the kernel prevents
>> migration at all when we detect L-shaped inconsistent swizzling.
>> However, this issue also extends to userspace who try to manually detile
>> into memory as the swizzling for an individual page is unknown (it
>> depends on its physical address only known to the kernel), userspace
>> cannot correctly swizzle.
>>
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91105
>> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
>> Cc: stable@vger.kernel.org
>> ---
>> drivers/gpu/drm/i915/i915_gem_tiling.c | 5 ++++-
>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_gem_tiling.c b/drivers/gpu/drm/i915/i915_gem_tiling.c
>> index d16585f788ea..ff96ae9b77bc 100644
>> --- a/drivers/gpu/drm/i915/i915_gem_tiling.c
>> +++ b/drivers/gpu/drm/i915/i915_gem_tiling.c
>> @@ -447,7 +447,10 @@ i915_gem_get_tiling(struct drm_device *dev, void *data,
>> }
>>
>> /* Hide bit 17 from the user -- see comment in i915_gem_set_tiling */
>> - args->phys_swizzle_mode = args->swizzle_mode;
>> + if (dev_priv->quirks & QUIRK_PIN_SWIZZLED_PAGES)
>> + args->phys_swizzle_mode = I915_BIT_6_SWIZZLE_UNKNOWN;
>> + else
>> + args->phys_swizzle_mode = args->swizzle_mode;
>
> It may be better to store the dev_priv->mm.bit_6_swizzle_[xy] as UNKNOWN
> for L-shaped memory. I think that would be more correct.
Are you planning on sending an updated patch, or shall I merge this one?
BR,
Jani.
> -Chris
>
> --
> Chris Wilson, Intel Open Source Technology Centre
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Jani Nikula, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/i915: Declare the swizzling unknown for L-shaped configurations
@ 2015-06-29 12:25 ` Jani Nikula
0 siblings, 0 replies; 9+ messages in thread
From: Jani Nikula @ 2015-06-29 12:25 UTC (permalink / raw)
To: Chris Wilson, intel-gfx; +Cc: Daniel Vetter, stable
On Sun, 28 Jun 2015, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> On Sun, Jun 28, 2015 at 09:19:26AM +0100, Chris Wilson wrote:
>> The old style of memory interleaving swizzled upto the end of the
>> first even bank of memory, and then used the remainder as unswizzled on
>> the unpaired bank - i.e. swizzling is not constant for all memory. This
>> causes problems when we try to migrate memory and so the kernel prevents
>> migration at all when we detect L-shaped inconsistent swizzling.
>> However, this issue also extends to userspace who try to manually detile
>> into memory as the swizzling for an individual page is unknown (it
>> depends on its physical address only known to the kernel), userspace
>> cannot correctly swizzle.
>>
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91105
>> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
>> Cc: stable@vger.kernel.org
>> ---
>> drivers/gpu/drm/i915/i915_gem_tiling.c | 5 ++++-
>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_gem_tiling.c b/drivers/gpu/drm/i915/i915_gem_tiling.c
>> index d16585f788ea..ff96ae9b77bc 100644
>> --- a/drivers/gpu/drm/i915/i915_gem_tiling.c
>> +++ b/drivers/gpu/drm/i915/i915_gem_tiling.c
>> @@ -447,7 +447,10 @@ i915_gem_get_tiling(struct drm_device *dev, void *data,
>> }
>>
>> /* Hide bit 17 from the user -- see comment in i915_gem_set_tiling */
>> - args->phys_swizzle_mode = args->swizzle_mode;
>> + if (dev_priv->quirks & QUIRK_PIN_SWIZZLED_PAGES)
>> + args->phys_swizzle_mode = I915_BIT_6_SWIZZLE_UNKNOWN;
>> + else
>> + args->phys_swizzle_mode = args->swizzle_mode;
>
> It may be better to store the dev_priv->mm.bit_6_swizzle_[xy] as UNKNOWN
> for L-shaped memory. I think that would be more correct.
Are you planning on sending an updated patch, or shall I merge this one?
BR,
Jani.
> -Chris
>
> --
> Chris Wilson, Intel Open Source Technology Centre
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/i915: Declare the swizzling unknown for L-shaped configurations
2015-06-28 8:19 [PATCH] drm/i915: Declare the swizzling unknown for L-shaped configurations Chris Wilson
@ 2015-06-29 7:07 ` Daniel Vetter
2015-06-29 7:07 ` Daniel Vetter
` (2 subsequent siblings)
3 siblings, 0 replies; 9+ messages in thread
From: Daniel Vetter @ 2015-06-29 7:07 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx, Daniel Vetter, stable
On Sun, Jun 28, 2015 at 09:19:26AM +0100, Chris Wilson wrote:
> The old style of memory interleaving swizzled upto the end of the
> first even bank of memory, and then used the remainder as unswizzled on
> the unpaired bank - i.e. swizzling is not constant for all memory. This
> causes problems when we try to migrate memory and so the kernel prevents
> migration at all when we detect L-shaped inconsistent swizzling.
> However, this issue also extends to userspace who try to manually detile
> into memory as the swizzling for an individual page is unknown (it
> depends on its physical address only known to the kernel), userspace
> cannot correctly swizzle.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91105
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: stable@vger.kernel.org
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> drivers/gpu/drm/i915/i915_gem_tiling.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_tiling.c b/drivers/gpu/drm/i915/i915_gem_tiling.c
> index d16585f788ea..ff96ae9b77bc 100644
> --- a/drivers/gpu/drm/i915/i915_gem_tiling.c
> +++ b/drivers/gpu/drm/i915/i915_gem_tiling.c
> @@ -447,7 +447,10 @@ i915_gem_get_tiling(struct drm_device *dev, void *data,
> }
>
> /* Hide bit 17 from the user -- see comment in i915_gem_set_tiling */
> - args->phys_swizzle_mode = args->swizzle_mode;
> + if (dev_priv->quirks & QUIRK_PIN_SWIZZLED_PAGES)
> + args->phys_swizzle_mode = I915_BIT_6_SWIZZLE_UNKNOWN;
> + else
> + args->phys_swizzle_mode = args->swizzle_mode;
> if (args->swizzle_mode == I915_BIT_6_SWIZZLE_9_17)
> args->swizzle_mode = I915_BIT_6_SWIZZLE_9;
> if (args->swizzle_mode == I915_BIT_6_SWIZZLE_9_10_17)
> --
> 2.1.4
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/i915: Declare the swizzling unknown for L-shaped configurations
@ 2015-06-29 7:07 ` Daniel Vetter
0 siblings, 0 replies; 9+ messages in thread
From: Daniel Vetter @ 2015-06-29 7:07 UTC (permalink / raw)
To: Chris Wilson; +Cc: Daniel Vetter, intel-gfx, stable
On Sun, Jun 28, 2015 at 09:19:26AM +0100, Chris Wilson wrote:
> The old style of memory interleaving swizzled upto the end of the
> first even bank of memory, and then used the remainder as unswizzled on
> the unpaired bank - i.e. swizzling is not constant for all memory. This
> causes problems when we try to migrate memory and so the kernel prevents
> migration at all when we detect L-shaped inconsistent swizzling.
> However, this issue also extends to userspace who try to manually detile
> into memory as the swizzling for an individual page is unknown (it
> depends on its physical address only known to the kernel), userspace
> cannot correctly swizzle.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91105
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: stable@vger.kernel.org
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> drivers/gpu/drm/i915/i915_gem_tiling.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_tiling.c b/drivers/gpu/drm/i915/i915_gem_tiling.c
> index d16585f788ea..ff96ae9b77bc 100644
> --- a/drivers/gpu/drm/i915/i915_gem_tiling.c
> +++ b/drivers/gpu/drm/i915/i915_gem_tiling.c
> @@ -447,7 +447,10 @@ i915_gem_get_tiling(struct drm_device *dev, void *data,
> }
>
> /* Hide bit 17 from the user -- see comment in i915_gem_set_tiling */
> - args->phys_swizzle_mode = args->swizzle_mode;
> + if (dev_priv->quirks & QUIRK_PIN_SWIZZLED_PAGES)
> + args->phys_swizzle_mode = I915_BIT_6_SWIZZLE_UNKNOWN;
> + else
> + args->phys_swizzle_mode = args->swizzle_mode;
> if (args->swizzle_mode == I915_BIT_6_SWIZZLE_9_17)
> args->swizzle_mode = I915_BIT_6_SWIZZLE_9;
> if (args->swizzle_mode == I915_BIT_6_SWIZZLE_9_10_17)
> --
> 2.1.4
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/i915: Declare the swizzling unknown for L-shaped configurations
2015-06-28 8:19 [PATCH] drm/i915: Declare the swizzling unknown for L-shaped configurations Chris Wilson
2015-06-28 12:52 ` Chris Wilson
2015-06-29 7:07 ` Daniel Vetter
@ 2015-06-29 13:46 ` shuang.he
2015-07-30 7:05 ` Chris Wilson
3 siblings, 0 replies; 9+ messages in thread
From: shuang.he @ 2015-06-29 13:46 UTC (permalink / raw)
To: shuang.he, lei.a.liu, intel-gfx, chris
Tested-By: Intel Graphics QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com)
Task id: 6654
-------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied
ILK 302/302 302/302
SNB 312/316 312/316
IVB 343/343 343/343
BYT -3 287/287 284/287
-------------------------------------Detailed-------------------------------------
Platform Test drm-intel-nightly Series Applied
*BYT igt@gem_partial_pwrite_pread@reads PASS(1) FAIL(1)
*BYT igt@gem_partial_pwrite_pread@reads-display PASS(1) FAIL(1)
*BYT igt@gem_tiled_partial_pwrite_pread@reads PASS(1) FAIL(1)
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/i915: Declare the swizzling unknown for L-shaped configurations
2015-06-28 8:19 [PATCH] drm/i915: Declare the swizzling unknown for L-shaped configurations Chris Wilson
` (2 preceding siblings ...)
2015-06-29 13:46 ` shuang.he
@ 2015-07-30 7:05 ` Chris Wilson
2015-07-30 14:52 ` Daniel Vetter
3 siblings, 1 reply; 9+ messages in thread
From: Chris Wilson @ 2015-07-30 7:05 UTC (permalink / raw)
To: intel-gfx; +Cc: Daniel Vetter, stable
On Sun, Jun 28, 2015 at 09:19:26AM +0100, Chris Wilson wrote:
> The old style of memory interleaving swizzled upto the end of the
> first even bank of memory, and then used the remainder as unswizzled on
> the unpaired bank - i.e. swizzling is not constant for all memory. This
> causes problems when we try to migrate memory and so the kernel prevents
> migration at all when we detect L-shaped inconsistent swizzling.
> However, this issue also extends to userspace who try to manually detile
> into memory as the swizzling for an individual page is unknown (it
> depends on its physical address only known to the kernel), userspace
> cannot correctly swizzle.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91105
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: stable@vger.kernel.org
Daniel since you dropped v2 and had already reviewed this version, it
would have been useful had you done the swap...
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/i915: Declare the swizzling unknown for L-shaped configurations
2015-07-30 7:05 ` Chris Wilson
@ 2015-07-30 14:52 ` Daniel Vetter
0 siblings, 0 replies; 9+ messages in thread
From: Daniel Vetter @ 2015-07-30 14:52 UTC (permalink / raw)
To: Chris Wilson, intel-gfx, Daniel Vetter, stable
On Thu, Jul 30, 2015 at 08:05:07AM +0100, Chris Wilson wrote:
> On Sun, Jun 28, 2015 at 09:19:26AM +0100, Chris Wilson wrote:
> > The old style of memory interleaving swizzled upto the end of the
> > first even bank of memory, and then used the remainder as unswizzled on
> > the unpaired bank - i.e. swizzling is not constant for all memory. This
> > causes problems when we try to migrate memory and so the kernel prevents
> > migration at all when we detect L-shaped inconsistent swizzling.
> > However, this issue also extends to userspace who try to manually detile
> > into memory as the swizzling for an individual page is unknown (it
> > depends on its physical address only known to the kernel), userspace
> > cannot correctly swizzle.
> >
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91105
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> > Cc: stable@vger.kernel.org
>
> Daniel since you dropped v2 and had already reviewed this version, it
> would have been useful had you done the swap...
Simply forgot, sorry. I added a note about the earlier attempt and also
one to explain that cc: stable is for fixing up wc mmaps.
Picked up for -fixes, thanks for the patch.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 9+ messages in thread