Skip to contentSkip to conversation

drm/i915: A hotfix for making aliasing PPGTT work

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

Subsystems (2)
lore
Share & tools
lore

Zhi Wang

author
#0 lore raw

PATCH v3 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.

v3:
- Fixes the format of "Fixes line".

v2:
- Add fixes tag. (Chris and Daniel)

Fixes 2ce5179fe826 ("drm/i915/gtt: Free unused lower-level page tables")
Cc Jani Nikula <[email protected]>
Cc Daniel Vetter <[email protected]>
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]>
Cc <[email protected]> # v4.10-rc1+
---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_gem_gtt.c +4 -2
index 22b3374..3233f12 100644
@@ -756,8 +756,10 @@ static bool gen8_ppgtt_clear_pt(struct i915_address_space *vm,
 
 	bitmap_clear(pt->used_ptes, pte, num_entries);
 
-	if (bitmap_empty(pt->used_ptes, GEN8_PTES))
-		return true;
+	if (USES_FULL_PPGTT(vm->i915)) {
+		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
maintainer
#1 lore raw
Quoted 9 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.

v3:
- Fixes the format of "Fixes line".

v2:
- Add fixes tag. (Chris and Daniel)

Quoted 15 lines
Fixes 2ce5179fe826 ("drm/i915/gtt: Free unused lower-level page tables")
Cc Jani Nikula <[email protected]>
Cc Daniel Vetter <[email protected]>
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]>
Cc <[email protected]> # v4.10-rc1+

This won't make it to v4.10, as I've sent the pull request already and I anticipate release this Sunday. Whoever applies this needs to add

BR,
Jani.

Quoted 21 lines
---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_gem_gtt.c +4 -2
index 22b3374..3233f12 100644
@@ -756,8 +756,10 @@ static bool gen8_ppgtt_clear_pt(struct i915_address_space *vm,
 
 	bitmap_clear(pt->used_ptes, pte, num_entries);
 
-	if (bitmap_empty(pt->used_ptes, GEN8_PTES))
-		return true;
+	if (USES_FULL_PPGTT(vm->i915)) {
+		if (bitmap_empty(pt->used_ptes, GEN8_PTES))
+			return true;
+	}
 
 	pt_vaddr = kmap_px(pt);
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw
Quoted 26 lines · Jani Nikula
Quoted 9 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.

v3:
- Fixes the format of "Fixes line".

v2:
- Add fixes tag. (Chris and Daniel)

Quoted 15 lines
Fixes 2ce5179fe826 ("drm/i915/gtt: Free unused lower-level page tables")
Cc Jani Nikula <[email protected]>
Cc Daniel Vetter <[email protected]>
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]>
Cc <[email protected]> # v4.10-rc1+
Quoted 4 lines

This won't make it to v4.10, as I've sent the pull request already and I anticipate release this Sunday. Whoever applies this needs to add

Already did.
-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
In reply to Jani Nikula

Thanks Jani! :P

-----Original Message-----
From: Jani Nikula [mailto:[email protected]]
Sent: Thursday, February 9, 2017 8:23 PM
To: Wang, Zhi A <[email protected]>; [email protected]
Cc: Wang, Zhi A <[email protected]>; Daniel Vetter <[email protected]>; Tvrtko Ursulin <[email protected]>; Winiarski, Michal <[email protected]>; Thierry, Michel <[email protected]>; Joonas Lahtinen <[email protected]>; Chris Wilson <[email protected]>; Vetter, Daniel <[email protected]>; Zhenyu Wang <[email protected]>; Lv, Zhiyuan <[email protected]>; [email protected]
Subject: Re: [PATCH v3] 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.

v3:
- Fixes the format of "Fixes line".

v2:
- Add fixes tag. (Chris and Daniel)

Fixes 2ce5179fe826 ("drm/i915/gtt: Free unused lower-level page

tables")

Cc Jani Nikula <[email protected]>
Cc Daniel Vetter <[email protected]>
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 5 lines

Link:
http://patchwork.freedesktop.org/patch/msgid/1486559013-25251-2-git-se
[email protected]

This won't make it to v4.10, as I've sent the pull request already and I anticipate release this Sunday. Whoever applies this needs to add

BR,
Jani.

Quoted 13 lines
---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_gem_gtt.c +0 -0
index 22b3374..3233f12 100644
@@ -756,8 +756,10 @@ 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 · line 765

Quoted 10 lines
drivers/gpu/drm/i915/i915_gem_gtt.c +4 -2
 	bitmap_clear(pt->used_ptes, pte, num_entries);
 
-	if (bitmap_empty(pt->used_ptes, GEN8_PTES))
-		return true;
+	if (USES_FULL_PPGTT(vm->i915)) {
+		if (bitmap_empty(pt->used_ptes, GEN8_PTES))
+			return true;
+	}
 
 	pt_vaddr = kmap_px(pt);

--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx