Skip to contentSkip to conversation

graph/nvc0: Fix engine pointer retrieval

PATCH In review Alexandre Courbot 2 participants 2 messages Feb 17, 2015 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 graph/nvc0: Fix engine pointer retrieval

From: Lauri Peltonen <[email protected]>

Other methods in this file suggest this is the correct way to retrieve the engine pointer.

---
 drm/nouveau/nvkm/engine/gr/gf100.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drm/nouveau/nvkm/engine/gr/gf100.c +1 -1
index b751d0dc4bf3..34b6d4baea16 100644
@@ -241,7 +241,7 @@ static int
 gf100_gr_set_shader_exceptions(struct nvkm_object *object, u32 mthd,
 			       void *pdata, u32 size)
 {
-	struct gf100_gr_priv *priv = (void *)nv_engine(object);
+	struct gf100_gr_priv *priv = (void *)object->engine;
 	if (size >= sizeof(u32)) {
 		u32 data = *(u32 *)pdata ? 0xffffffff : 0x00000000;
 		nv_wr32(priv, 0x419e44, data);
Signature · 6 lines
2.3.0

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

A message that is not in the archive (sent off-list or not yet received): 1424156142-32574-1-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org

#2 lore raw
Quoted 4 lines · Alexandre Courbot

From: Lauri Peltonen <[email protected]>

Other methods in this file suggest this is the correct way to retrieve the engine pointer.

Yes, oops. I've been working to find a way to make all this stuff less dodgy and error-prone, while still keeping the amount of boiler-plate to a minimum. It's not an easy task, and I've dropped several approaches already. I think I'm onto a decent one, finally, but it's a lot of work and tricky to do in a bisectable way. Hopefully I'll have something mergable soon.

Thanks for the patch :)

Ben.

Quoted 23 lines
---
 drm/nouveau/nvkm/engine/gr/gf100.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drm/nouveau/nvkm/engine/gr/gf100.c +1 -2
index b751d0dc4bf3..34b6d4baea16 100644
@@ -241,7 +241,7 @@ static int
 gf100_gr_set_shader_exceptions(struct nvkm_object *object, u32 mthd,
                               void *pdata, u32 size)
 {
-       struct gf100_gr_priv *priv = (void *)nv_engine(object);
+       struct gf100_gr_priv *priv = (void *)object->engine;
        if (size >= sizeof(u32)) {
                u32 data = *(u32 *)pdata ? 0xffffffff : 0x00000000;
                nv_wr32(priv, 0x419e44, data);
--

2.3.0

Quoted 4 lines

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

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