All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher@gmail.com>
To: "Michel Dänzer" <michel@daenzer.net>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH libdrm] radeon_cs_setup_bo: Fix accounting if caller specified write and read domains.
Date: Wed, 8 Feb 2012 08:55:41 -0500	[thread overview]
Message-ID: <CADnq5_PkH_=5Bkd0NdCokoTaiZ9LU2tdZ1h=xZSWNmn9F+yjng@mail.gmail.com> (raw)
In-Reply-To: <1328694941-23389-1-git-send-email-michel@daenzer.net>

2012/2/8 Michel Dänzer <michel@daenzer.net>:
> From: Michel Dänzer <michel.daenzer@amd.com>
>
> Only account for the write domain in that case.
>
> Should fix https://bugs.freedesktop.org/show_bug.cgi?id=43893 .
>
> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  radeon/radeon_cs_space.c |   15 +++++++++------
>  1 files changed, 9 insertions(+), 6 deletions(-)
>
> diff --git a/radeon/radeon_cs_space.c b/radeon/radeon_cs_space.c
> index 208e1bb..be047a7 100644
> --- a/radeon/radeon_cs_space.c
> +++ b/radeon/radeon_cs_space.c
> @@ -65,13 +65,16 @@ static inline int radeon_cs_setup_bo(struct radeon_cs_space_check *sc, struct ra
>     }
>
>     if (bo->space_accounted == 0) {
> -        if (write_domain == RADEON_GEM_DOMAIN_VRAM)
> -            sizes->op_vram_write += bo->size;
> -        else if (write_domain == RADEON_GEM_DOMAIN_GTT)
> -            sizes->op_gart_write += bo->size;
> -        else
> +        if (write_domain) {
> +            if (write_domain == RADEON_GEM_DOMAIN_VRAM)
> +                sizes->op_vram_write += bo->size;
> +            else if (write_domain == RADEON_GEM_DOMAIN_GTT)
> +                sizes->op_gart_write += bo->size;
> +            sc->new_accounted = write_domain;
> +        } else {
>             sizes->op_read += bo->size;
> -        sc->new_accounted = (read_domains << 16) | write_domain;
> +            sc->new_accounted = read_domains << 16;
> +        }
>     } else {
>         uint16_t old_read, old_write;
>
> --
> 1.7.9
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

      reply	other threads:[~2012-02-08 13:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-08  9:55 [PATCH libdrm] radeon_cs_setup_bo: Fix accounting if caller specified write and read domains Michel Dänzer
2012-02-08 13:55 ` Alex Deucher [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='CADnq5_PkH_=5Bkd0NdCokoTaiZ9LU2tdZ1h=xZSWNmn9F+yjng@mail.gmail.com' \
    --to=alexdeucher@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=michel@daenzer.net \
    /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.