Skip to contentSkip to conversation

drm/nouveau: Fix overlap while zeroing zcull regions

PATCH In review Pierre Moreau 2 participants 3 messages Jun 13, 2014 2 messages not in the archive

Subsystems (3)
lore
Share & tools
lore
#1 lore raw

PATCH 1/2 drm/nouveau: Fix overlap while zeroing zcull regions

In reply to a message not in the archive

The specified stride was not correct, resulting in erases overlapping and part of the zcull regions being not erased at all.

---
 drivers/gpu/drm/nouveau/core/engine/graph/nv50.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/nouveau/core/engine/graph/nv50.c +4 -4
index 2c7809e..a36adcd 100644
@@ -991,10 +991,10 @@ nv50_graph_init(struct nouveau_object *object)
 
 	/* zero out zcull regions */
 	for (i = 0; i < 8; i++) {
-		nv_wr32(priv, 0x402c20 + (i * 8), 0x00000000);
-		nv_wr32(priv, 0x402c24 + (i * 8), 0x00000000);
-		nv_wr32(priv, 0x402c28 + (i * 8), 0x00000000);
-		nv_wr32(priv, 0x402c2c + (i * 8), 0x00000000);
+		nv_wr32(priv, 0x402c20 + (i * 0x10), 0x00000000);
+		nv_wr32(priv, 0x402c24 + (i * 0x10), 0x00000000);
+		nv_wr32(priv, 0x402c28 + (i * 0x10), 0x00000000);
+		nv_wr32(priv, 0x402c2c + (i * 0x10), 0x00000000);
 	}
 	return 0;
 }
Signature · 1 line
2.0.0
#3 lore raw

PATCH 2/2 drm/nouveau: Remove an unneeded write while initialising PGRAPH

In reply to a message not in the archive

The blob does not seem to write at that place for my NVAC, though it does for my NV96, agreeing with what is done in the if/else structure below. I guess someone forgot to remove the line when the if/else was put in place.

---
 drivers/gpu/drm/nouveau/core/engine/graph/nv50.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/nouveau/core/engine/graph/nv50.c +0 -1
index a36adcd..ca1b886 100644
@@ -976,7 +976,6 @@ nv50_graph_init(struct nouveau_object *object)
 		break;
 	case 0xa0:
 	default:
-		nv_wr32(priv, 0x402cc0, 0x00000000);
 		if (nv_device(priv)->chipset == 0xa0 ||
 		    nv_device(priv)->chipset == 0xaa ||
 		    nv_device(priv)->chipset == 0xac) {
Signature · 1 line
2.0.0
#4 lore raw
In reply to a message not in the archive
Quoted 2 lines · Pierre Moreau

The specified stride was not correct, resulting in erases overlapping and part of the zcull regions being not erased at all.

Hey Pierre,

Thanks, I've merged both patches.

Quoted 32 lines
---
 drivers/gpu/drm/nouveau/core/engine/graph/nv50.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/nouveau/core/engine/graph/nv50.c +4 -5
index 2c7809e..a36adcd 100644
@@ -991,10 +991,10 @@ nv50_graph_init(struct nouveau_object *object)
 
        /* zero out zcull regions */
        for (i = 0; i < 8; i++) {
-               nv_wr32(priv, 0x402c20 + (i * 8), 0x00000000);
-               nv_wr32(priv, 0x402c24 + (i * 8), 0x00000000);
-               nv_wr32(priv, 0x402c28 + (i * 8), 0x00000000);
-               nv_wr32(priv, 0x402c2c + (i * 8), 0x00000000);
+               nv_wr32(priv, 0x402c20 + (i * 0x10), 0x00000000);
+               nv_wr32(priv, 0x402c24 + (i * 0x10), 0x00000000);
+               nv_wr32(priv, 0x402c28 + (i * 0x10), 0x00000000);
+               nv_wr32(priv, 0x402c2c + (i * 0x10), 0x00000000);
        }
        return 0;
 }
--

2.0.0

_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau