All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] A possible hotfix for aliasing PPGTT in kernel 4.11.x or 4.10.x
@ 2017-02-08 13:03 Zhi Wang
  2017-02-08 13:03 ` [PATCH] drm/i915: A hotfix for making aliasing PPGTT work Zhi Wang
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Zhi Wang @ 2017-02-08 13:03 UTC (permalink / raw)
  To: intel-gfx

Redhat guys have choose kernel stable 4.10 as their target. As you know,
currently the aliasing PPGTT mode required by GVT-g doesn't work now.

Thanks Chris who has already pushed the fixes, but it seems that the
kernel 4.11 merging window has already open and those fixes might be
merged in 4.12.x possibly which is too late for us. T_T

After some discussions with Zhiyuan and Zhenyu, we wonder that if it's
possible to send this hotfix patch to kernel 4.11 *fixes* to make
aliasing PPGTT work temporarily and after Chris' fixes merged in future,
we or he can revert or drop this patch then. Is this possible?

Or we can see if there is any option for us. Thank you guys!

Zhi Wang (1):
  drm/i915: A hotfix for making aliasing PPGTT work

 drivers/gpu/drm/i915/i915_gem_gtt.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

-- 
1.9.1

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH] drm/i915: A hotfix for making aliasing PPGTT work
  2017-02-08 13:03 [PATCH] A possible hotfix for aliasing PPGTT in kernel 4.11.x or 4.10.x Zhi Wang
@ 2017-02-08 13:03 ` Zhi Wang
  2017-02-09  7:57   ` Chris Wilson
  2017-02-09  8:10   ` Chris Wilson
  2017-02-08 13:22 ` [PATCH] A possible hotfix for aliasing PPGTT in kernel 4.11.x or 4.10.x Chris Wilson
  2017-02-09  7:54 ` ✓ Fi.CI.BAT: success for drm/i915: A hotfix for making aliasing PPGTT work Patchwork
  2 siblings, 2 replies; 10+ messages in thread
From: Zhi Wang @ 2017-02-08 13:03 UTC (permalink / raw)
  To: intel-gfx; +Cc: Zhiyuan Lv, Daniel Vetter

This patch makes PPGTT page table non-shrinkable when using aliasing PPGTT
mode. It's just a temporary solution for making aliasing PPGTT mode work.

Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Michal Winiarski <michal.winiarski@intel.com>
Cc: Michel Thierry <michel.thierry@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
Cc: Zhiyuan Lv <zhiyuan.lv@intel.com>
Signed-off-by: Zhi Wang <zhi.a.wang@intel.com>
---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index 22b3374..3af3b1c 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -754,10 +754,12 @@ static bool gen8_ppgtt_clear_pt(struct i915_address_space *vm,
 
 	GEM_BUG_ON(pte_end > GEN8_PTES);
 
-	bitmap_clear(pt->used_ptes, pte, num_entries);
+	if (USES_FULL_PPGTT(vm->i915)) {
+		bitmap_clear(pt->used_ptes, pte, num_entries);
 
-	if (bitmap_empty(pt->used_ptes, GEN8_PTES))
-		return true;
+		if (bitmap_empty(pt->used_ptes, GEN8_PTES))
+			return true;
+	}
 
 	pt_vaddr = kmap_px(pt);
 
-- 
1.9.1

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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] A possible hotfix for aliasing PPGTT in kernel 4.11.x or 4.10.x
  2017-02-08 13:03 [PATCH] A possible hotfix for aliasing PPGTT in kernel 4.11.x or 4.10.x Zhi Wang
  2017-02-08 13:03 ` [PATCH] drm/i915: A hotfix for making aliasing PPGTT work Zhi Wang
@ 2017-02-08 13:22 ` Chris Wilson
  2017-02-09  2:32   ` Zhi Wang
  2017-02-09  7:54 ` ✓ Fi.CI.BAT: success for drm/i915: A hotfix for making aliasing PPGTT work Patchwork
  2 siblings, 1 reply; 10+ messages in thread
From: Chris Wilson @ 2017-02-08 13:22 UTC (permalink / raw)
  To: Zhi Wang; +Cc: intel-gfx

On Wed, Feb 08, 2017 at 09:03:32PM +0800, Zhi Wang wrote:
> Redhat guys have choose kernel stable 4.10 as their target. As you know,
> currently the aliasing PPGTT mode required by GVT-g doesn't work now.
> 
> Thanks Chris who has already pushed the fixes, but it seems that the
> kernel 4.11 merging window has already open and those fixes might be
> merged in 4.12.x possibly which is too late for us. T_T
> 
> After some discussions with Zhiyuan and Zhenyu, we wonder that if it's
> possible to send this hotfix patch to kernel 4.11 *fixes* to make
> aliasing PPGTT work temporarily and after Chris' fixes merged in future,
> we or he can revert or drop this patch then. Is this possible?

I was under the impression that aliasing was *not* a supported mode of
operation.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] A possible hotfix for aliasing PPGTT in kernel 4.11.x or 4.10.x
  2017-02-08 13:22 ` [PATCH] A possible hotfix for aliasing PPGTT in kernel 4.11.x or 4.10.x Chris Wilson
@ 2017-02-09  2:32   ` Zhi Wang
  2017-02-09  7:51     ` Chris Wilson
  0 siblings, 1 reply; 10+ messages in thread
From: Zhi Wang @ 2017-02-09  2:32 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx, Tvrtko Ursulin, Michal Winiarski,
	Michel Thierry, Joonas Lahtinen, Daniel Vetter, Zhenyu Wang,
	Zhiyuan Lv

Thanks for the reply! Any inputs and ideas are welcome. :P

On 02/08/17 21:22, Chris Wilson wrote:
> On Wed, Feb 08, 2017 at 09:03:32PM +0800, Zhi Wang wrote:
>> Redhat guys have choose kernel stable 4.10 as their target. As you know,
>> currently the aliasing PPGTT mode required by GVT-g doesn't work now.
>>
>> Thanks Chris who has already pushed the fixes, but it seems that the
>> kernel 4.11 merging window has already open and those fixes might be
>> merged in 4.12.x possibly which is too late for us. T_T
>>
>> After some discussions with Zhiyuan and Zhenyu, we wonder that if it's
>> possible to send this hotfix patch to kernel 4.11 *fixes* to make
>> aliasing PPGTT work temporarily and after Chris' fixes merged in future,
>> we or he can revert or drop this patch then. Is this possible?
>
> I was under the impression that aliasing was *not* a supported mode of
> operation.
> -Chris
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] A possible hotfix for aliasing PPGTT in kernel 4.11.x or 4.10.x
  2017-02-09  2:32   ` Zhi Wang
@ 2017-02-09  7:51     ` Chris Wilson
  0 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2017-02-09  7:51 UTC (permalink / raw)
  To: Zhi Wang; +Cc: intel-gfx, Zhiyuan Lv, Daniel Vetter

On Thu, Feb 09, 2017 at 10:32:39AM +0800, Zhi Wang wrote:
> Thanks for the reply! Any inputs and ideas are welcome. :P

Get a test into CI to cover your uses...
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

* ✓ Fi.CI.BAT: success for drm/i915: A hotfix for making aliasing PPGTT work
  2017-02-08 13:03 [PATCH] A possible hotfix for aliasing PPGTT in kernel 4.11.x or 4.10.x Zhi Wang
  2017-02-08 13:03 ` [PATCH] drm/i915: A hotfix for making aliasing PPGTT work Zhi Wang
  2017-02-08 13:22 ` [PATCH] A possible hotfix for aliasing PPGTT in kernel 4.11.x or 4.10.x Chris Wilson
@ 2017-02-09  7:54 ` Patchwork
  2 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2017-02-09  7:54 UTC (permalink / raw)
  To: Zhi Wang; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: A hotfix for making aliasing PPGTT work
URL   : https://patchwork.freedesktop.org/series/19309/
State : success

== Summary ==

Series 19309v1 drm/i915: A hotfix for making aliasing PPGTT work
https://patchwork.freedesktop.org/api/1.0/series/19309/revisions/1/mbox/

Test gem_exec_fence:
        Subgroup await-hang-default:
                fail       -> PASS       (fi-skl-6770hq)

fi-bdw-5557u     total:252  pass:238  dwarn:0   dfail:0   fail:0   skip:14 
fi-bsw-n3050     total:252  pass:213  dwarn:0   dfail:0   fail:0   skip:39 
fi-bxt-j4205     total:252  pass:230  dwarn:0   dfail:0   fail:0   skip:22 
fi-bxt-t5700     total:83   pass:70   dwarn:0   dfail:0   fail:0   skip:12 
fi-byt-j1900     total:252  pass:225  dwarn:0   dfail:0   fail:0   skip:27 
fi-byt-n2820     total:252  pass:221  dwarn:0   dfail:0   fail:0   skip:31 
fi-hsw-4770      total:252  pass:233  dwarn:0   dfail:0   fail:0   skip:19 
fi-hsw-4770r     total:252  pass:233  dwarn:0   dfail:0   fail:0   skip:19 
fi-ilk-650       total:252  pass:199  dwarn:0   dfail:0   fail:0   skip:53 
fi-ivb-3520m     total:252  pass:231  dwarn:0   dfail:0   fail:0   skip:21 
fi-ivb-3770      total:252  pass:231  dwarn:0   dfail:0   fail:0   skip:21 
fi-kbl-7500u     total:252  pass:229  dwarn:0   dfail:0   fail:2   skip:21 
fi-skl-6260u     total:252  pass:239  dwarn:0   dfail:0   fail:0   skip:13 
fi-skl-6700hq    total:252  pass:232  dwarn:0   dfail:0   fail:0   skip:20 
fi-skl-6700k     total:252  pass:227  dwarn:4   dfail:0   fail:0   skip:21 
fi-skl-6770hq    total:252  pass:239  dwarn:0   dfail:0   fail:0   skip:13 
fi-snb-2520m     total:252  pass:221  dwarn:0   dfail:0   fail:0   skip:31 
fi-snb-2600      total:252  pass:220  dwarn:0   dfail:0   fail:0   skip:32 

2bcf98e5debf4fb22f2cbb7ee06e6ea351dfa659 drm-tip: 2017y-02m-08d-16h-32m-31s UTC integration manifest
388241c drm/i915: A hotfix for making aliasing PPGTT work

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3737/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] drm/i915: A hotfix for making aliasing PPGTT work
  2017-02-08 13:03 ` [PATCH] drm/i915: A hotfix for making aliasing PPGTT work Zhi Wang
@ 2017-02-09  7:57   ` Chris Wilson
  2017-02-09  8:27     ` Chris Wilson
  2017-02-09  8:10   ` Chris Wilson
  1 sibling, 1 reply; 10+ messages in thread
From: Chris Wilson @ 2017-02-09  7:57 UTC (permalink / raw)
  To: Zhi Wang; +Cc: intel-gfx, Zhiyuan Lv, Daniel Vetter

On Wed, Feb 08, 2017 at 09:03:33PM +0800, Zhi Wang wrote:
> This patch makes PPGTT page table non-shrinkable when using aliasing PPGTT
> mode. It's just a temporary solution for making aliasing PPGTT mode work.
> 
> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> Cc: Michal Winiarski <michal.winiarski@intel.com>
> Cc: Michel Thierry <michel.thierry@intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
> Cc: Zhiyuan Lv <zhiyuan.lv@intel.com>
> Signed-off-by: Zhi Wang <zhi.a.wang@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_gem_gtt.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index 22b3374..3af3b1c 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -754,10 +754,12 @@ static bool gen8_ppgtt_clear_pt(struct i915_address_space *vm,
>  
>  	GEM_BUG_ON(pte_end > GEN8_PTES);
>  
> -	bitmap_clear(pt->used_ptes, pte, num_entries);
> +	if (USES_FULL_PPGTT(vm->i915)) {
> +		bitmap_clear(pt->used_ptes, pte, num_entries);
>  
> -	if (bitmap_empty(pt->used_ptes, GEN8_PTES))
> -		return true;
> +		if (bitmap_empty(pt->used_ptes, GEN8_PTES))
> +			return true;

I would have personally used return USES_FULL_PPGTT(vm->i915) because
that's a smaller patch and doesn't disrupt the flow as much.

Respin and have a r-b if you can suggest an igt...
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] drm/i915: A hotfix for making aliasing PPGTT work
  2017-02-08 13:03 ` [PATCH] drm/i915: A hotfix for making aliasing PPGTT work Zhi Wang
  2017-02-09  7:57   ` Chris Wilson
@ 2017-02-09  8:10   ` Chris Wilson
  2017-02-09  8:46     ` Zhi Wang
  1 sibling, 1 reply; 10+ messages in thread
From: Chris Wilson @ 2017-02-09  8:10 UTC (permalink / raw)
  To: Zhi Wang; +Cc: intel-gfx, Zhiyuan Lv, Daniel Vetter

On Wed, Feb 08, 2017 at 09:03:33PM +0800, Zhi Wang wrote:
> This patch makes PPGTT page table non-shrinkable when using aliasing PPGTT
> mode. It's just a temporary solution for making aliasing PPGTT mode work.
> 
> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> Cc: Michal Winiarski <michal.winiarski@intel.com>
> Cc: Michel Thierry <michel.thierry@intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
> Cc: Zhiyuan Lv <zhiyuan.lv@intel.com>
> Signed-off-by: Zhi Wang <zhi.a.wang@intel.com>

This also needs a Fixes line so that we now which kernels need the
patch.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] drm/i915: A hotfix for making aliasing PPGTT work
  2017-02-09  7:57   ` Chris Wilson
@ 2017-02-09  8:27     ` Chris Wilson
  0 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2017-02-09  8:27 UTC (permalink / raw)
  To: Zhi Wang, intel-gfx, Tvrtko Ursulin, Michal Winiarski,
	Michel Thierry, Joonas Lahtinen, Daniel Vetter, Zhenyu Wang,
	Zhiyuan Lv

On Thu, Feb 09, 2017 at 07:57:33AM +0000, Chris Wilson wrote:
> On Wed, Feb 08, 2017 at 09:03:33PM +0800, Zhi Wang wrote:
> > This patch makes PPGTT page table non-shrinkable when using aliasing PPGTT
> > mode. It's just a temporary solution for making aliasing PPGTT mode work.
> > 
> > Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> > Cc: Michal Winiarski <michal.winiarski@intel.com>
> > Cc: Michel Thierry <michel.thierry@intel.com>
> > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Daniel Vetter <daniel.vetter@intel.com>
> > Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
> > Cc: Zhiyuan Lv <zhiyuan.lv@intel.com>
> > Signed-off-by: Zhi Wang <zhi.a.wang@intel.com>
> > ---
> >  drivers/gpu/drm/i915/i915_gem_gtt.c | 8 +++++---
> >  1 file changed, 5 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> > index 22b3374..3af3b1c 100644
> > --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> > +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> > @@ -754,10 +754,12 @@ static bool gen8_ppgtt_clear_pt(struct i915_address_space *vm,
> >  
> >  	GEM_BUG_ON(pte_end > GEN8_PTES);
> >  
> > -	bitmap_clear(pt->used_ptes, pte, num_entries);
> > +	if (USES_FULL_PPGTT(vm->i915)) {
> > +		bitmap_clear(pt->used_ptes, pte, num_entries);
> >  
> > -	if (bitmap_empty(pt->used_ptes, GEN8_PTES))
> > -		return true;
> > +		if (bitmap_empty(pt->used_ptes, GEN8_PTES))
> > +			return true;
> 
> I would have personally used return USES_FULL_PPGTT(vm->i915) because
> that's a smaller patch and doesn't disrupt the flow as much.

Disregard. Not thinking, I'll be back after coffee.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] drm/i915: A hotfix for making aliasing PPGTT work
  2017-02-09  8:10   ` Chris Wilson
@ 2017-02-09  8:46     ` Zhi Wang
  0 siblings, 0 replies; 10+ messages in thread
From: Zhi Wang @ 2017-02-09  8:46 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx, Tvrtko Ursulin, Michal Winiarski,
	Michel Thierry, Joonas Lahtinen, Daniel Vetter, Zhenyu Wang,
	Zhiyuan Lv

Thanks for the help!!! ^_^

On 02/09/17 16:10, Chris Wilson wrote:
> On Wed, Feb 08, 2017 at 09:03:33PM +0800, Zhi Wang wrote:
>> This patch makes PPGTT page table non-shrinkable when using aliasing PPGTT
>> mode. It's just a temporary solution for making aliasing PPGTT mode work.
>>
>> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
>> Cc: Michal Winiarski <michal.winiarski@intel.com>
>> Cc: Michel Thierry <michel.thierry@intel.com>
>> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>> Cc: Daniel Vetter <daniel.vetter@intel.com>
>> Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
>> Cc: Zhiyuan Lv <zhiyuan.lv@intel.com>
>> Signed-off-by: Zhi Wang <zhi.a.wang@intel.com>
>
> This also needs a Fixes line so that we now which kernels need the
> patch.
> -Chris
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-02-09  8:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-08 13:03 [PATCH] A possible hotfix for aliasing PPGTT in kernel 4.11.x or 4.10.x Zhi Wang
2017-02-08 13:03 ` [PATCH] drm/i915: A hotfix for making aliasing PPGTT work Zhi Wang
2017-02-09  7:57   ` Chris Wilson
2017-02-09  8:27     ` Chris Wilson
2017-02-09  8:10   ` Chris Wilson
2017-02-09  8:46     ` Zhi Wang
2017-02-08 13:22 ` [PATCH] A possible hotfix for aliasing PPGTT in kernel 4.11.x or 4.10.x Chris Wilson
2017-02-09  2:32   ` Zhi Wang
2017-02-09  7:51     ` Chris Wilson
2017-02-09  7:54 ` ✓ Fi.CI.BAT: success for drm/i915: A hotfix for making aliasing PPGTT work Patchwork

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.