All of lore.kernel.org
 help / color / mirror / Atom feed
From: Francisco Jerez <currojerez-sGOZH3hwPm2sTnJN9+BGXg@public.gmane.org>
To: Marcin Slusarz <marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH] drm/nv10: disable perf hack on low memory cards
Date: Sun, 06 Nov 2011 21:54:01 +0100	[thread overview]
Message-ID: <878vntvuom.fsf@riseup.net> (raw)
In-Reply-To: <1320607930-21794-3-git-send-email-marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> (Marcin Slusarz's message of "Sun, 6 Nov 2011 20:32:05 +0100")


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

Marcin Slusarz <marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> On 16MB cards it's too easy to hit ENOMEM with 2D use when this
> perf hack is enabled.
>
AFAIK the "hack" still makes sense on such low memory cards.  I guess
the right way to fix this corner case would be to have fall-back
placement ranges in TTM the same way there's a list of allowed placement
types right now.

But, it's probably not worth the effort.  For now I've just pushed a
patch changing the BO size threshold that determines whether to set the
placement range or not.  That's likely to behave better than a hard
memory limit of this kind, both when you have a <32MB card with small
enough render buffers or a >32MB card with huge render buffers that
would otherwise hit the same bug.

> This should fix https://bugs.freedesktop.org/show_bug.cgi?id=42384
>
> Signed-off-by: Marcin Slusarz <marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Cc: Francisco Jerez <currojerez-sGOZH3hwPm2sTnJN9+BGXg@public.gmane.org>
> ---
>  drivers/gpu/drm/nouveau/nouveau_bo.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
> index 7226f41..a692648 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_bo.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
> @@ -148,6 +148,7 @@ set_placement_range(struct nouveau_bo *nvbo, uint32_t type)
>  
>  	if (dev_priv->card_type == NV_10 &&
>  	    nvbo->tile_mode && (type & TTM_PL_FLAG_VRAM) &&
> +	    dev_priv->vram_size >= 32 * 1024 * 1024 &&
>  	    nvbo->bo.mem.num_pages < vram_pages / 2) {
>  		/*
>  		 * Make sure that the color and depth buffers are handled

[-- Attachment #1.2: Type: application/pgp-signature, Size: 229 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:[~2011-11-06 20:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-06 19:32 [PATCH] drm/nv10: disable perf hack on low memory cards Marcin Slusarz
     [not found] ` <1320607930-21794-3-git-send-email-marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-11-06 20:54   ` Francisco Jerez [this message]

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=878vntvuom.fsf@riseup.net \
    --to=currojerez-sgozh3hwpm2stnjn9+bgxg@public.gmane.org \
    --cc=marcin.slusarz-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.