* [PATCH libdrm] radeon_cs_setup_bo: Fix accounting if caller specified write and read domains.
@ 2012-02-08 9:55 Michel Dänzer
2012-02-08 13:55 ` Alex Deucher
0 siblings, 1 reply; 2+ messages in thread
From: Michel Dänzer @ 2012-02-08 9:55 UTC (permalink / raw)
To: dri-devel
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH libdrm] radeon_cs_setup_bo: Fix accounting if caller specified write and read domains.
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
0 siblings, 0 replies; 2+ messages in thread
From: Alex Deucher @ 2012-02-08 13:55 UTC (permalink / raw)
To: Michel Dänzer; +Cc: dri-devel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-02-08 13:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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.