From: "Michel Dänzer" <michel@daenzer.net>
To: dri-devel@lists.freedesktop.org
Subject: [PATCH libdrm] radeon_cs_setup_bo: Fix accounting if caller specified write and read domains.
Date: Wed, 8 Feb 2012 10:55:41 +0100 [thread overview]
Message-ID: <1328694941-23389-1-git-send-email-michel@daenzer.net> (raw)
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>
---
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
next reply other threads:[~2012-02-08 9:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-08 9:55 Michel Dänzer [this message]
2012-02-08 13:55 ` [PATCH libdrm] radeon_cs_setup_bo: Fix accounting if caller specified write and read domains Alex Deucher
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=1328694941-23389-1-git-send-email-michel@daenzer.net \
--to=michel@daenzer.net \
--cc=dri-devel@lists.freedesktop.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.