Skip to contentSkip to conversation

A possible hotfix for aliasing PPGTT in kernel 4.11.x or 4.10.x

PATCH In review Zhi Wang 3 participants 10 messages Feb 8, 2017 – Feb 9, 2017

Subsystems (2)
lore
Share & tools
lore

Zhi Wang

author
#0 lore raw

PATCH 1/1 A possible hotfix for aliasing PPGTT in kernel 4.11.x or 4.10.x

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(-)
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
author
#1 lore raw

PATCH 1/1 drm/i915: A hotfix for making aliasing PPGTT work

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 <[email protected]>
Cc Michal Winiarski <[email protected]>
Cc Michel Thierry <[email protected]>
Cc Joonas Lahtinen <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Zhenyu Wang <[email protected]>
Cc Zhiyuan Lv <[email protected]>
---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/i915_gem_gtt.c +5 -3
index 22b3374..3af3b1c 100644
@@ -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);
 
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw

Re: [PATCH] drm/i915: A hotfix for making aliasing PPGTT work

Quoted 22 lines · Zhi Wang

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 <[email protected]>
Cc Michal Winiarski <[email protected]>
Cc Michel Thierry <[email protected]>
Cc Joonas Lahtinen <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Zhenyu Wang <[email protected]>
Cc Zhiyuan Lv <[email protected]>
---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/i915_gem_gtt.c +0 -0
index 22b3374..3af3b1c 100644
@@ -754,10 +754,12 @@ static bool gen8_ppgtt_clear_pt(struct i915_address_space *vm,
 

drivers/gpu/drm/i915/i915_gem_gtt.c static bool gen8_ppgtt_clear_pt(struct i915_address_space *vm, · line 761

Quoted 10 lines
drivers/gpu/drm/i915/i915_gem_gtt.c +4 -3
 	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

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw

Re: [PATCH] drm/i915: A hotfix for making aliasing PPGTT work

Quoted 29 lines · Chris Wilson
Quoted 28 lines · Zhi Wang

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 <[email protected]>
Cc Michal Winiarski <[email protected]>
Cc Michel Thierry <[email protected]>
Cc Joonas Lahtinen <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Zhenyu Wang <[email protected]>
Cc Zhiyuan Lv <[email protected]>
---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/i915_gem_gtt.c +2 -1
index 22b3374..3af3b1c 100644
@@ -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);
 
Quoted 7 lines

drivers/gpu/drm/i915/i915_gem_gtt.c static bool gen8_ppgtt_clear_pt(struct i915_address_space *vm, · line 761

Quoted 4 lines
drivers/gpu/drm/i915/i915_gem_gtt.c +2 -2
-	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

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#4 lore raw

Re: [PATCH] drm/i915: A hotfix for making aliasing PPGTT work

In reply to Zhi Wang
Quoted 12 lines · Zhi Wang

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 <[email protected]>
Cc Michal Winiarski <[email protected]>
Cc Michel Thierry <[email protected]>
Cc Joonas Lahtinen <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Zhenyu Wang <[email protected]>
Cc Zhiyuan Lv <[email protected]>

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

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
author
#5 lore raw

Re: [PATCH] drm/i915: A hotfix for making aliasing PPGTT work

Thanks for the help!!! ^_^

Quoted 14 lines · Chris Wilson
Quoted 12 lines · Zhi Wang

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 <[email protected]>
Cc Michal Winiarski <[email protected]>
Cc Michel Thierry <[email protected]>
Cc Joonas Lahtinen <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Zhenyu Wang <[email protected]>
Cc Zhiyuan Lv <[email protected]>
Quoted 4 lines

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

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#6 lore raw
In reply to Zhi Wang
Quoted 11 lines · Zhi Wang

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

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
author
#7 lore raw

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

Quoted 8 lines · Chris Wilson
Quoted 7 lines · Zhi Wang

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

Quoted 9 lines
Quoted 4 lines

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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#8 lore raw
Quoted 1 line · Zhi Wang

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

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

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#9 lore raw

✓ Fi.CI.BAT: success for drm/i915: A hotfix for making aliasing PPGTT work

In reply to Zhi Wang
== Series Details ==

== 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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx