drm/nv84+: fix fence context seqno's
Subsystems (3)
PATCH 1/1 drm/nv84+: fix fence context seqno's
This fixes a regression introduced by "drm/nouveau: rework to new fence interface" (commit 29ba89b2371d466).
The fence sequence should not be reset after creation, the old value is used instead. On destruction the final value is written, to prevent another source of accidental wraparound in case of a channel being destroyed after a hang, and unblocking any other channel that may wait on the about-to-be-deleted channel to signal.
I'm nothing if not optimistic about any hope of recovery from that. ;-)
---
drivers/gpu/drm/nouveau/nv84_fence.c +1 -2
@@ -120,6 +120,7 @@ nv84_fence_context_del(struct nouveau_channel *chan)nouveau_bo_vma_del (bo, &fctx->dispc_vma[i]); } +nouveau_bo_wr32 (priv->bo, chan->chid *16 /4 , fctx->base.sequence);nouveau_bo_vma_del (priv->bo, &fctx->vma_gart);nouveau_bo_vma_del (priv->bo, &fctx->vma);nouveau_fence_context_del (&fctx->base);
@@ -159,8 +160,6 @@ nv84_fence_context_new(struct nouveau_channel *chan) ret =nouveau_bo_vma_add (bo, cli->vm, &fctx->dispc_vma[i]); } -nouveau_bo_wr32 (priv->bo, chan->chid *16 /4 ,0x00000000 ); -if (ret)nv84_fence_context_del (chan);return ret;
A message that is not in the archive (sent off-list or not yet received): [email protected]
Ted Percival
Tested-byQuoted 27 lines · Maarten Lankhorst
This fixes a regression introduced by "drm/nouveau: rework to new fence interface" (commit
29ba89b2371d466).The fence sequence should not be reset after creation, the old value is used instead. On destruction the final value is written, to prevent another source of accidental wraparound in case of a channel being destroyed after a hang, and unblocking any other channel that may wait on the about-to-be-deleted channel to signal.
I'm nothing if not optimistic about any hope of recovery from that. ;-)
Reported-by Ted Percival <[email protected]>Signed-off-by Maarten Lankhorst <[email protected]>---
drivers/gpu/drm/nouveau/nv84_fence.c +1
-0@@ -120,6 +120,7 @@ nv84_fence_context_del(struct nouveau_channel *chan)nouveau_bo_vma_del (bo, &fctx->dispc_vma[i]); } +nouveau_bo_wr32 (priv->bo, chan->chid *16 /4 , fctx->base.sequence);nouveau_bo_vma_del (priv->bo, &fctx->vma_gart);nouveau_bo_vma_del (priv->bo, &fctx->vma);nouveau_fence_context_del (&fctx->base);
drivers/gpu/drm/nouveau/nv84_fence.c nv84_fence_context_new(struct nouveau_channel *chan) · line 165
Quoted 8 lines
drivers/gpu/drm/nouveau/nv84_fence.c +0
-2@@ -159,8 +160,6 @@ nv84_fence_context_new(struct nouveau_channel *chan) ret =nouveau_bo_vma_add (bo, cli->vm, &fctx->dispc_vma[i]); } -nouveau_bo_wr32 (priv->bo, chan->chid *16 /4 ,0x00000000 ); -if (ret)nv84_fence_context_del (chan);return ret;
This works, thanks :-)
A message that is not in the archive (sent off-list or not yet received): [email protected]
Ben Skeggs
Acked-byQuoted 9 lines · Ted Percival
Quoted 8 lines · Maarten Lankhorst
This fixes a regression introduced by "drm/nouveau: rework to new fence interface" (commit
29ba89b2371d466).The fence sequence should not be reset after creation, the old value is used instead. On destruction the final value is written, to prevent another source of accidental wraparound in case of a channel being destroyed after a hang, and unblocking any other channel that may wait on the about-to-be-deleted channel to signal.
Quoted 4 lines
Quoted 4 lines
I'm nothing if not optimistic about any hope of recovery from that. ;-)
Reported-by Ted Percival <[email protected]>Signed-off-by Maarten Lankhorst <[email protected]>
I'm still seeing issues with suspend, even with this patch, and the one you pastebinned recently.
Quoted 31 lines
Quoted 15 lines
---
drivers/gpu/drm/nouveau/nv84_fence.c +1
-0@@ -120,6 +120,7 @@ nv84_fence_context_del(struct nouveau_channel *chan)nouveau_bo_vma_del (bo, &fctx->dispc_vma[i]); } +nouveau_bo_wr32 (priv->bo, chan->chid *16 /4 , fctx->base.sequence);nouveau_bo_vma_del (priv->bo, &fctx->vma_gart);nouveau_bo_vma_del (priv->bo, &fctx->vma);nouveau_fence_context_del (&fctx->base);drivers/gpu/drm/nouveau/nv84_fence.c nv84_fence_context_new(struct nouveau_channel *chan) · line 165
Quoted 8 lines
drivers/gpu/drm/nouveau/nv84_fence.c +0
-2@@ -159,8 +160,6 @@ nv84_fence_context_new(struct nouveau_channel *chan) ret =nouveau_bo_vma_add (bo, cli->vm, &fctx->dispc_vma[i]); } -nouveau_bo_wr32 (priv->bo, chan->chid *16 /4 ,0x00000000 ); -if (ret)nv84_fence_context_del (chan);return ret;This works, thanks :-)
Tested-by Ted Percival <[email protected]>_______________________________________________
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): CACAvsv4gmpN62-FZifbwcFb=dTr7mMtu7K5Ga793i6rUohs=tg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Op 23-09-14 om 07:35 schreef Ben Skeggs:
Quoted 10 lines · Ted Percival
Quoted 9 lines · Maarten Lankhorst
Quoted 8 lines
This fixes a regression introduced by "drm/nouveau: rework to new fence interface" (commit
29ba89b2371d466).The fence sequence should not be reset after creation, the old value is used instead. On destruction the final value is written, to prevent another source of accidental wraparound in case of a channel being destroyed after a hang, and unblocking any other channel that may wait on the about-to-be-deleted channel to signal.
Quoted 9 lines
Quoted 4 lines
Quoted 4 lines
I'm nothing if not optimistic about any hope of recovery from that. ;-)
Reported-by Ted Percival <[email protected]>Signed-off-by Maarten Lankhorst <[email protected]>Acked-by Ben Skeggs <[email protected]>I'm still seeing issues with suspend, even with this patch, and the one you pastebinned recently.
Annoying, and I'm out of ideas. The pastebinned patch is posted to dri-devel as:
[PATCH 2/8] drm/nouveau: specify if interruptible wait is desired in nouveau_fence_sync.
Could you bisect to where the suspend issues started? With this patch applied after "drm/nouveau: rework to new fence interface", and the other patch applied after "drm/nouveau: use shared fences for readable objects"
~Maarten
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 8 lines · Maarten Lankhorst
Op 23-09-14 om 07:35 schreef Ben Skeggs:
Quoted 7 lines
Quoted 3 lines · Maarten Lankhorst
Quoted 2 lines
This fixes a regression introduced by "drm/nouveau: rework to new fence interface" (commit
29ba89b2371d466).I'm still seeing issues with suspend, even with this patch, and the one you pastebinned recently.
Quoted 6 lines
Annoying, and I'm out of ideas. The pastebinned patch is posted to dri-devel as:
[PATCH 2/8] drm/nouveau: specify if interruptible wait is desired innouveau_fence_sync.Could you bisect to where the suspend issues started? With this patch applied after "drm/nouveau: rework to new fence interface", and the other patch applied after "drm/nouveau: use shared fences for readable objects"
I started bisecting to track down the suspend issue, but X won't start at all with today's dri-next tree @ d743ecf36063 ("drm/doc: Fixup drm_irq kerneldoc includes") plus the two patches, so I'll have to get that out of the way first.