Skip to contentSkip to conversation

fifo/gk104: fix engine status register offset

PATCH In review Vince Hsu 2 participants 2 messages Nov 16, 2015 1 message not in the archive

lore
Share & tools
lore

Vince Hsu

author
#0 lore raw

PATCH 1/1 fifo/gk104: fix engine status register offset

The offset should be 8 on Kepler and later.

---
 drm/nouveau/nvkm/engine/fifo/gk104.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Hi,

According to the header[1] the offset for engine status register is 8.

[1] https://github.com/kfractal/nouveau/blob/hwref/drm/nouveau/include/nvkm/hwref/gk104/fifo.h

Thanks,
Vince

drm/nouveau/nvkm/engine/fifo/gk104.c +1 -1
index 8d5db6d5a558..4fcd147d43c8 100644
@@ -196,7 +196,7 @@ gk104_fifo_intr_sched_ctxsw(struct gk104_fifo *fifo)
 
 	spin_lock_irqsave(&fifo->base.lock, flags);
 	for (engn = 0; engn < ARRAY_SIZE(fifo->engine); engn++) {
-		u32 stat = nvkm_rd32(device, 0x002640 + (engn * 0x04));
+		u32 stat = nvkm_rd32(device, 0x002640 + (engn * 0x08));
 		u32 busy = (stat & 0x80000000);
 		u32 next = (stat & 0x07ff0000) >> 16;
 		u32 chsw = (stat & 0x00008000);
Signature · 6 lines
2.1.4

_______________________________________________
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): 1447659510-24696-1-git-send-email-vinceh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org

Reviewed-by
#2 lore raw
Quoted 21 lines · Vince Hsu

The offset should be 8 on Kepler and later.

---
 drm/nouveau/nvkm/engine/fifo/gk104.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Hi,

According to the header[1] the offset for engine status register is 8.

[1] https://github.com/kfractal/nouveau/blob/hwref/drm/nouveau/include/nvkm/hwref/gk104/fifo.h

Thanks,
Vince

drm/nouveau/nvkm/engine/fifo/gk104.c +0 -0
index 8d5db6d5a558..4fcd147d43c8 100644

drm/nouveau/nvkm/engine/fifo/gk104.c gk104_fifo_intr_sched_ctxsw(struct gk104_fifo *fifo) · line 199

Quoted 5 lines
drm/nouveau/nvkm/engine/fifo/gk104.c +1 -1
@@ -196,7 +196,7 @@ gk104_fifo_intr_sched_ctxsw(struct gk104_fifo *fifo)
 
        spin_lock_irqsave(&fifo->base.lock, flags);
        for (engn = 0; engn < ARRAY_SIZE(fifo->engine); engn++) {
-               u32 stat = nvkm_rd32(device, 0x002640 + (engn * 0x04));
+               u32 stat = nvkm_rd32(device, 0x002640 + (engn * 0x08));

Confirmed on my side as well.

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