Skip to contentSkip to conversation

drm/i915/bdw: Fix 4g GGTT insert entries regression

PATCH In review Ben Widawsky 4 participants 6 messages Mar 5, 2014 – Mar 6, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915/bdw: Fix 4g GGTT insert entries regression

The PDE needs to wrap after writing all the PTEs. Quite a small/silly bug to find in the massive change. It was introduced:
commit 307dc4f99f6d3a74a78b0e776838f35b2004f14d

Author: Ben Widawsky <[email protected]>
Date:   Thu Feb 20 11:51:21 2014 -0800

drm/i915/bdw: Reorganize PT allocations

I can't actually test this patch at the moment because my Broadwell is unresponsive. This should be squashed if possible.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75763

---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_gem_gtt.c +1 -1
index 5462037..2bde703 100644
@@ -335,7 +335,7 @@ static void gen8_ppgtt_insert_entries(struct i915_address_space *vm,
 		if (++pte == GEN8_PTES_PER_PAGE) {
 			kunmap_atomic(pt_vaddr);
 			pt_vaddr = NULL;
-			if (pde + 1 == GEN8_PDES_PER_PAGE) {
+			if (++pde == GEN8_PDES_PER_PAGE) {
 				pdpe++;
 				pde = 0;
 			}
Signature · 1 line
1.9.0
maintainer
#1 lore raw
Quoted 7 lines · Ben Widawsky

The PDE needs to wrap after writing all the PTEs. Quite a small/silly bug to find in the massive change. It was introduced:
commit 307dc4f99f6d3a74a78b0e776838f35b2004f14d

Author: Ben Widawsky <[email protected]>
Date:   Thu Feb 20 11:51:21 2014 -0800

drm/i915/bdw: Reorganize PT allocations

As noted in the bug, the commit merged to dinq is correct, and the commit referenced above apparently only lives in some temporary branch.

BR,
Jani.

Quoted 32 lines

I can't actually test this patch at the moment because my Broadwell is unresponsive. This should be squashed if possible.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75763

---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_gem_gtt.c +1 -1
index 5462037..2bde703 100644
@@ -335,7 +335,7 @@ static void gen8_ppgtt_insert_entries(struct i915_address_space *vm,
 		if (++pte == GEN8_PTES_PER_PAGE) {
 			kunmap_atomic(pt_vaddr);
 			pt_vaddr = NULL;
-			if (pde + 1 == GEN8_PDES_PER_PAGE) {
+			if (++pde == GEN8_PDES_PER_PAGE) {
 				pdpe++;
 				pde = 0;
 			}
Signature · 6 lines
1.9.0

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 1 line
Jani Nikula, Intel Open Source Technology Center
#2 lore raw
Quoted 7 lines · Jani Nikula
Quoted 6 lines · Ben Widawsky

The PDE needs to wrap after writing all the PTEs. Quite a small/silly bug to find in the massive change. It was introduced:
commit 307dc4f99f6d3a74a78b0e776838f35b2004f14d

Author: Ben Widawsky <[email protected]>
Date:   Thu Feb 20 11:51:21 2014 -0800
Quoted 8 lines
Quoted 1 line

drm/i915/bdw: Reorganize PT allocations

As noted in the bug, the commit merged to dinq is correct, and the commit referenced above apparently only lives in some temporary branch.

BR,
Jani.

My eyes are playing tricks on me. Sorry for the noise.

Quoted 36 lines
Quoted 33 lines

I can't actually test this patch at the moment because my Broadwell is unresponsive. This should be squashed if possible.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75763

---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_gem_gtt.c +1 -1
index 5462037..2bde703 100644
@@ -335,7 +335,7 @@ static void gen8_ppgtt_insert_entries(struct i915_address_space *vm,
 		if (++pte == GEN8_PTES_PER_PAGE) {
 			kunmap_atomic(pt_vaddr);
 			pt_vaddr = NULL;
-			if (pde + 1 == GEN8_PDES_PER_PAGE) {
+			if (++pde == GEN8_PDES_PER_PAGE) {
 				pdpe++;
 				pde = 0;
 			}
Signature · 6 lines
1.9.0

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 1 line
Jani Nikula, Intel Open Source Technology Center
Signature · 1 line
Ben Widawsky, Intel Open Source Technology Center
#3 lore raw
Quoted 10 lines · Ben Widawsky
Quoted 9 lines · Jani Nikula
Quoted 7 lines · Ben Widawsky

The PDE needs to wrap after writing all the PTEs. Quite a small/silly bug to find in the massive change. It was introduced:
commit 307dc4f99f6d3a74a78b0e776838f35b2004f14d

Author: Ben Widawsky <[email protected]>
Date:   Thu Feb 20 11:51:21 2014 -0800

drm/i915/bdw: Reorganize PT allocations

Quoted 9 lines
Quoted 6 lines

As noted in the bug, the commit merged to dinq is correct, and the commit referenced above apparently only lives in some temporary branch.

BR,
Jani.

My eyes are playing tricks on me. Sorry for the noise.

It's not my eyes. It's something else. WTF is going on?

bwidawsk@bolo_yeung ~/intel-gfx/drm-intel (drm-intel-nightly)$ tsocks git fetch upstream bwidawsk@bolo_yeung ~/intel-gfx/drm-intel (drm-intel-nightly)$ git reset --hard upstream/drm-intel-nightly HEAD is now at 97d10a0 drm-intel-nightly: 2014y-03m-05d-20h-31m-21s integration manifest bwidawsk@bolo_yeung ~/intel-gfx/drm-intel (drm-intel-nightly)$ sed -n '338p' drivers/gpu/drm/i915/i915_gem_gtt.c

			if (pde + 1 == GEN8_PDES_PER_PAGE) {
Quoted 39 lines
Quoted 36 lines
Quoted 33 lines

I can't actually test this patch at the moment because my Broadwell is unresponsive. This should be squashed if possible.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75763

---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_gem_gtt.c +1 -1
index 5462037..2bde703 100644
@@ -335,7 +335,7 @@ static void gen8_ppgtt_insert_entries(struct i915_address_space *vm,
 		if (++pte == GEN8_PTES_PER_PAGE) {
 			kunmap_atomic(pt_vaddr);
 			pt_vaddr = NULL;
-			if (pde + 1 == GEN8_PDES_PER_PAGE) {
+			if (++pde == GEN8_PDES_PER_PAGE) {
 				pdpe++;
 				pde = 0;
 			}
Signature · 6 lines
1.9.0

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 1 line
Jani Nikula, Intel Open Source Technology Center
Signature · 1 line
Ben Widawsky, Intel Open Source Technology Center
Signature · 1 line
Ben Widawsky, Intel Open Source Technology Center
#4 lore raw
Quoted 14 lines · Ben Widawsky
Quoted 13 lines · Ben Widawsky
Quoted 12 lines · Jani Nikula
Quoted 7 lines · Ben Widawsky

The PDE needs to wrap after writing all the PTEs. Quite a small/silly bug to find in the massive change. It was introduced:
commit 307dc4f99f6d3a74a78b0e776838f35b2004f14d

Author: Ben Widawsky <[email protected]>
Date:   Thu Feb 20 11:51:21 2014 -0800

drm/i915/bdw: Reorganize PT allocations

As noted in the bug, the commit merged to dinq is correct, and the commit referenced above apparently only lives in some temporary branch.

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

BR,
Jani.

My eyes are playing tricks on me. Sorry for the noise.

It's not my eyes. It's something else. WTF is going on?

My apologies, I seem to have been blind. Patch merged, will squash in. -Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
maintainer
#5 lore raw
Quoted 19 lines · Daniel Vetter
Quoted 18 lines · Ben Widawsky
Quoted 17 lines · Ben Widawsky
Quoted 15 lines · Jani Nikula
Quoted 7 lines · Ben Widawsky

The PDE needs to wrap after writing all the PTEs. Quite a small/silly bug to find in the massive change. It was introduced:
commit 307dc4f99f6d3a74a78b0e776838f35b2004f14d

Author: Ben Widawsky <[email protected]>
Date:   Thu Feb 20 11:51:21 2014 -0800

drm/i915/bdw: Reorganize PT allocations

As noted in the bug, the commit merged to dinq is correct, and the commit referenced above apparently only lives in some temporary branch.

BR,
Jani.

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

My eyes are playing tricks on me. Sorry for the noise.

It's not my eyes. It's something else. WTF is going on?

My apologies, I seem to have been blind. Patch merged, will squash in.

I didn't just trust Daniel, I actually looked at the code before sending the mail. And, well, *facepalm*. Apparently I mistook the ++pte that's there for the new one added here. Sorry Ben.

BR,
Jani.

Quoted 5 lines

-Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
Signature · 1 line
Jani Nikula, Intel Open Source Technology Center