drm/nv50: wait for pgraph to idle before unloading the context
Subsystems (3)
PATCH 3/3 drm/nv50: wait for pgraph to idle before unloading the context
- This should fix the problem with gpu hangs people have had when closing channels.
--- drivers/gpu/drm/nouveau/nv50_graph.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/gpu/drm/nouveau/nv50_graph.c +1 -0
@@ -282,6 +282,7 @@ nv50_graph_unload_context(struct drm_device *dev)return 0 ; inst &=NV50_PGRAPH_CTXCTL_CUR_INSTANCE ; +nouveau_wait_for_idle (dev);nv_wr32 (dev,0x400500 , fifo & ~1 );nv_wr32 (dev,0x400784 , inst);nv_wr32 (dev,0x400824 ,nv_rd32 (dev,0x400824 ) |0x20 );
Signature · 1 line
1.6.6
A message that is not in the archive (sent off-list or not yet received): 1263241133-13499-1-git-send-email-madman2003-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
This patch alone, so ignore the 3/3. I think this fixes the channel unload hang issues in a less obscure way. Feedback appreciated as usual.
Quoted 24 lines · Maarten Maathuis
- This should fix the problem with gpu hangs people have had when closing channels.
Signed-off-by Maarten Maathuis <[email protected]>---
drivers/gpu/drm/nouveau/nv50_graph.c | 1 +1 files changed, 1 insertions(+), 0 deletions(-)drivers/gpu/drm/nouveau/nv50_graph.c +1
-1@@ -282,6 +282,7 @@ nv50_graph_unload_context(struct drm_device *dev) return 0; inst &= NV50_PGRAPH_CTXCTL_CUR_INSTANCE; + nouveau_wait_for_idle(dev); nv_wr32(dev, 0x400500, fifo & ~1); nv_wr32(dev, 0x400784, inst); nv_wr32(dev, 0x400824, nv_rd32(dev, 0x400824) | 0x20); --1.6.6
A message that is not in the archive (sent off-list or not yet received): 6d4bc9fc1001111220q2025bb8h862577a208831a00-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
This patch *is* alone, sorry for the typo.
Quoted 30 lines · Maarten Maathuis
This patch alone, so ignore the 3/3. I think this fixes the channel unload hang issues in a less obscure way. Feedback appreciated as usual.
Quoted 24 lines · Maarten Maathuis
- This should fix the problem with gpu hangs people have had when closing channels.
Signed-off-by Maarten Maathuis <[email protected]>---
drivers/gpu/drm/nouveau/nv50_graph.c | 1 +1 files changed, 1 insertions(+), 0 deletions(-)drivers/gpu/drm/nouveau/nv50_graph.c +1
-1@@ -282,6 +282,7 @@ nv50_graph_unload_context(struct drm_device *dev) return 0; inst &= NV50_PGRAPH_CTXCTL_CUR_INSTANCE; + nouveau_wait_for_idle(dev); nv_wr32(dev, 0x400500, fifo & ~1); nv_wr32(dev, 0x400784, inst); nv_wr32(dev, 0x400824, nv_rd32(dev, 0x400824) | 0x20); --1.6.6
A message that is not in the archive (sent off-list or not yet received): 6d4bc9fc1001111222t256fe973x64bb8fddd7bc8440-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
A few comments are in order, i noticed that this additional wait_for_idle does cause delays sometimes (obviously). and it seems like an excellent way to do a DOS attack on your gpu. fbcon is visibly lagging sometimes and even unusable (gpu is not locked up, X works fine started from ssh). This seems like something to consider when choosing the preferred solution.
Quoted 34 lines · Maarten Maathuis
This patch *is* alone, sorry for the typo.
Quoted 30 lines · Maarten Maathuis
This patch alone, so ignore the 3/3. I think this fixes the channel unload hang issues in a less obscure way. Feedback appreciated as usual.
Quoted 24 lines · Maarten Maathuis
- This should fix the problem with gpu hangs people have had when closing channels.
Signed-off-by Maarten Maathuis <[email protected]>---
drivers/gpu/drm/nouveau/nv50_graph.c | 1 +1 files changed, 1 insertions(+), 0 deletions(-)drivers/gpu/drm/nouveau/nv50_graph.c +1
-1@@ -282,6 +282,7 @@ nv50_graph_unload_context(struct drm_device *dev) return 0; inst &= NV50_PGRAPH_CTXCTL_CUR_INSTANCE; + nouveau_wait_for_idle(dev); nv_wr32(dev, 0x400500, fifo & ~1); nv_wr32(dev, 0x400784, inst); nv_wr32(dev, 0x400824, nv_rd32(dev, 0x400824) | 0x20); --1.6.6
A message that is not in the archive (sent off-list or not yet received): 6d4bc9fc1001111312q35bbaae4t2e537bd93abb0b89-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 6 lines · Maarten Maathuis
A few comments are in order, i noticed that this additional
wait_for_idledoes cause delays sometimes (obviously). and it seems like an excellent way to do a DOS attack on your gpu. fbcon is visibly lagging sometimes and even unusable (gpu is not locked up, X works fine started from ssh). This seems like something to consider when choosing the preferred solution.
Yeah, I think the wait_for_idle() is fine. I'm actually interested it solved the problem completely for you, as I mentioned to you (maybe?), I still seen an *occasional* hang when I tried it. But, it's still a huge improvement over now.
Ben.
Quoted 40 lines · Maarten Maathuis
Quoted 34 lines
This patch *is* alone, sorry for the typo.
Quoted 30 lines · Maarten Maathuis
This patch alone, so ignore the 3/3. I think this fixes the channel unload hang issues in a less obscure way. Feedback appreciated as usual.
Quoted 24 lines · Maarten Maathuis
- This should fix the problem with gpu hangs people have had when closing channels.
Signed-off-by Maarten Maathuis <[email protected]>--- drivers/gpu/drm/nouveau/nv50_graph.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)drivers/gpu/drm/nouveau/nv50_graph.c +1
-1@@ -282,6 +282,7 @@ nv50_graph_unload_context(struct drm_device *dev)return 0 ; inst &=NV50_PGRAPH_CTXCTL_CUR_INSTANCE ; +nouveau_wait_for_idle (dev);nv_wr32 (dev,0x400500 , fifo & ~1 );nv_wr32 (dev,0x400784 , inst);nv_wr32 (dev,0x400824 ,nv_rd32 (dev,0x400824 ) |0x20 ); --1.6.6
_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau
I can't say for sure it's the full solution, i can make nv50 gallium lock up in an odd (and different) way than before. And during bitscan runs i did see some "PGRAPH fail to idle status 0x101" and even one or "AIII, inactive channel 128" (from the top of my head).
Maarten.
Quoted 56 lines · Ben Skeggs
Quoted 6 lines · Maarten Maathuis
A few comments are in order, i noticed that this additional
wait_for_idledoes cause delays sometimes (obviously). and it seems like an excellent way to do a DOS attack on your gpu. fbcon is visibly lagging sometimes and even unusable (gpu is not locked up, X works fine started from ssh). This seems like something to consider when choosing the preferred solution.Yeah, I think the
wait_for_idle()is fine. I'm actually interested it solved the problem completely for you, as I mentioned to you (maybe?), I still seen an *occasional* hang when I tried it. But, it's still a huge improvement over now.Ben.
Quoted 40 lines · Maarten Maathuis
Quoted 34 lines
This patch *is* alone, sorry for the typo.
Quoted 30 lines · Maarten Maathuis
This patch alone, so ignore the 3/3. I think this fixes the channel unload hang issues in a less obscure way. Feedback appreciated as usual.
Quoted 24 lines · Maarten Maathuis
- This should fix the problem with gpu hangs people have had when closing channels.
Signed-off-by Maarten Maathuis <[email protected]>---
drivers/gpu/drm/nouveau/nv50_graph.c | 1 +1 files changed, 1 insertions(+), 0 deletions(-)drivers/gpu/drm/nouveau/nv50_graph.c +1
-1@@ -282,6 +282,7 @@ nv50_graph_unload_context(struct drm_device *dev) return 0; inst &= NV50_PGRAPH_CTXCTL_CUR_INSTANCE; + nouveau_wait_for_idle(dev); nv_wr32(dev, 0x400500, fifo & ~1); nv_wr32(dev, 0x400784, inst); nv_wr32(dev, 0x400824, nv_rd32(dev, 0x400824) | 0x20); --1.6.6
_______________________________________________
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): 6d4bc9fc1001111421i51c05092kce657e94efc84d6a-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 4 lines · Maarten Maathuis
I can't say for sure it's the full solution, i can make nv50 gallium lock up in an odd (and different) way than before. And during bitscan runs i did see some "PGRAPH fail to idle status
0x101" and even one or "AIII, inactive channel 128" (from the top of my head).
Yeah, there's still issues but it's a lot better with it anyway.
Pushed.
Ben.
Quoted 60 lines
Maarten.
Quoted 56 lines · Ben Skeggs
Quoted 6 lines · Maarten Maathuis
A few comments are in order, i noticed that this additional
wait_for_idledoes cause delays sometimes (obviously). and it seems like an excellent way to do a DOS attack on your gpu. fbcon is visibly lagging sometimes and even unusable (gpu is not locked up, X works fine started from ssh). This seems like something to consider when choosing the preferred solution.Yeah, I think the
wait_for_idle()is fine. I'm actually interested it solved the problem completely for you, as I mentioned to you (maybe?), I still seen an *occasional* hang when I tried it. But, it's still a huge improvement over now.Ben.
Quoted 40 lines · Maarten Maathuis
Quoted 34 lines
This patch *is* alone, sorry for the typo.
Quoted 30 lines · Maarten Maathuis
This patch alone, so ignore the 3/3. I think this fixes the channel unload hang issues in a less obscure way. Feedback appreciated as usual.
Quoted 24 lines · Maarten Maathuis
- This should fix the problem with gpu hangs people have had when closing channels.
Signed-off-by Maarten Maathuis <[email protected]>--- drivers/gpu/drm/nouveau/nv50_graph.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)drivers/gpu/drm/nouveau/nv50_graph.c +1
-1@@ -282,6 +282,7 @@ nv50_graph_unload_context(struct drm_device *dev)return 0 ; inst &=NV50_PGRAPH_CTXCTL_CUR_INSTANCE ; +nouveau_wait_for_idle (dev);nv_wr32 (dev,0x400500 , fifo & ~1 );nv_wr32 (dev,0x400784 , inst);nv_wr32 (dev,0x400824 ,nv_rd32 (dev,0x400824 ) |0x20 ); --1.6.6
_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau