All of lore.kernel.org
 help / color / mirror / Atom feed
From: Francisco Jerez <currojerez-sGOZH3hwPm2sTnJN9+BGXg@public.gmane.org>
To: Maarten Maathuis <madman2003-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH] nouveau: make sure initial kalloc for user bo ends up in the right place
Date: Mon, 01 Mar 2010 22:26:24 +0100	[thread overview]
Message-ID: <87fx4jka2n.fsf@riseup.net> (raw)
In-Reply-To: <1267468776-6652-1-git-send-email-madman2003-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> (Maarten Maathuis's message of "Mon, 1 Mar 2010 19:39:36 +0100")


[-- Attachment #1.1.1: Type: text/plain, Size: 1166 bytes --]

Maarten Maathuis <madman2003-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> - 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;

Looks good to me:
Acked-by: Francisco Jerez <currojerez-sGOZH3hwPm2sTnJN9+BGXg@public.gmane.org>

[-- Attachment #1.2: Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 181 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
http://lists.freedesktop.org/mailman/listinfo/nouveau

  parent reply	other threads:[~2010-03-01 21:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
     [not found]     ` <87fx4jka2n.fsf-sGOZH3hwPm2sTnJN9+BGXg@public.gmane.org>
2010-03-02 22:27       ` Maarten Maathuis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fx4jka2n.fsf@riseup.net \
    --to=currojerez-sgozh3hwpm2stnjn9+bgxg@public.gmane.org \
    --cc=madman2003-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.