All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nouveau: make sure initial kalloc for user bo ends up in the right place
@ 2010-03-01 18:39 Maarten Maathuis
       [not found] ` <1267468776-6652-1-git-send-email-madman2003-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Maarten Maathuis @ 2010-03-01 18:39 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

- Currently reloc'ing a user bo to gart will first cause an allocation in vram,
which is then cpu written to, then the bo gets moved to gart.

Signed-off-by: Maarten Maathuis <madman2003-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 nouveau/nouveau_reloc.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/nouveau/nouveau_reloc.c b/nouveau/nouveau_reloc.c
index 301482b..332dfa0 100644
--- a/nouveau/nouveau_reloc.c
+++ b/nouveau/nouveau_reloc.c
@@ -73,6 +73,12 @@ nouveau_reloc_emit(struct nouveau_channel *chan, struct nouveau_bo *reloc_bo,
 		return -EINVAL;
 	}
 
+	/* We're about to reloc a user buffer, better make sure we don't cause
+	 * a double migration.
+	 */
+	if (!(nvbo->flags & (NOUVEAU_BO_GART | NOUVEAU_BO_VRAM)))
+		nvbo->flags |= (flags & (NOUVEAU_BO_GART | NOUVEAU_BO_VRAM));
+
 	rpbbo = nouveau_bo_emit_buffer(chan, reloc_bo);
 	if (!rpbbo)
 		return -ENOMEM;
-- 
1.7.0

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

end of thread, other threads:[~2010-03-02 22:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-01 18:39 [PATCH] nouveau: make sure initial kalloc for user bo ends up in the right place Maarten Maathuis
     [not found] ` <1267468776-6652-1-git-send-email-madman2003-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-03-01 21:26   ` Francisco Jerez
     [not found]     ` <87fx4jka2n.fsf-sGOZH3hwPm2sTnJN9+BGXg@public.gmane.org>
2010-03-02 22:27       ` Maarten Maathuis

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.