All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/nv10: Keep the lower bits of PGRAPH_CTX_USER during context switches.
@ 2009-11-06 15:11 Francisco Jerez
       [not found] ` <1257520314-16605-1-git-send-email-currojerez-sGOZH3hwPm2sTnJN9+BGXg@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Francisco Jerez @ 2009-11-06 15:11 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Before this patch they were being reset to zero on every context
switch instead of leaving the saved value, causing some context
switching weirdness (the most serious symptom was the memory manager
corrupting the BOs it migrated because of a malfunctioning M2MF).

Signed-off-by: Francisco Jerez <currojerez-sGOZH3hwPm2sTnJN9+BGXg@public.gmane.org>
---
 drivers/gpu/drm/nouveau/nv10_graph.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nv10_graph.c b/drivers/gpu/drm/nouveau/nv10_graph.c
index cf5c9c4..6bf6804 100644
--- a/drivers/gpu/drm/nouveau/nv10_graph.c
+++ b/drivers/gpu/drm/nouveau/nv10_graph.c
@@ -673,7 +673,8 @@ int nv10_graph_load_context(struct nouveau_channel *chan)
 	nv10_graph_load_pipe(chan);
 
 	nv_wr32(dev, NV10_PGRAPH_CTX_CONTROL, 0x10010100);
-	nv_wr32(dev, NV10_PGRAPH_CTX_USER, chan->id << 24);
+	tmp = nv_rd32(dev, NV10_PGRAPH_CTX_USER);
+	nv_wr32(dev, NV10_PGRAPH_CTX_USER, (tmp & 0xffffff) | chan->id << 24);
 	tmp = nv_rd32(dev, NV10_PGRAPH_FFINTFC_ST2);
 	nv_wr32(dev, NV10_PGRAPH_FFINTFC_ST2, tmp & 0xcfffffff);
 	return 0;
-- 
1.6.4.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-11-08 22:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-06 15:11 [PATCH 1/2] drm/nv10: Keep the lower bits of PGRAPH_CTX_USER during context switches Francisco Jerez
     [not found] ` <1257520314-16605-1-git-send-email-currojerez-sGOZH3hwPm2sTnJN9+BGXg@public.gmane.org>
2009-11-06 15:11   ` [PATCH 2/2] drm/nv04-nv10: Don't jump back to our PUT offset on PUSHBUF_CALL Francisco Jerez
     [not found]     ` <1257520314-16605-2-git-send-email-currojerez-sGOZH3hwPm2sTnJN9+BGXg@public.gmane.org>
2009-11-08 22:20       ` Ben Skeggs
2009-11-08 22:19   ` [PATCH 1/2] drm/nv10: Keep the lower bits of PGRAPH_CTX_USER during context switches Ben Skeggs

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.