Skip to contentSkip to conversation

drm/nouveau: Fix mthd data submission

PATCH New Kelly Doran 1 participant 1 message Dec 20, 2013

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

PATCH 1/1 drm/nouveau: Fix mthd data submission

If the initial data element is 0, it will never be written, even though the value from the previous method may be there.

---
 drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c +1 -1
index 434bb4b..5c8a63d 100644
@@ -334,7 +334,7 @@ nvc0_graph_mthd(struct nvc0_graph_priv *priv, struct nvc0_graph_mthd *mthds)
 	while ((mthd = &mthds[i++]) && (init = mthd->init)) {
 		u32  addr = 0x80000000 | mthd->oclass;
 		for (data = 0; init->count; init++) {
-			if (data != init->data) {
+			if (init == mthd->init || data != init->data) {
 				nv_wr32(priv, 0x40448c, init->data);
 				data = init->data;
 			}
Signature · 1 line
1.8.4.2