projects
/
profile
/
ivi
/
libdrm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
af90222
)
radeon: fix cs buffer realloc padding
author
Jerome Glisse
<jglisse@redhat.com>
Fri, 3 Jul 2009 13:03:03 +0000
(15:03 +0200)
committer
Jerome Glisse
<jglisse@redhat.com>
Fri, 3 Jul 2009 13:03:03 +0000
(15:03 +0200)
We always realloc at least 0x1000 dwords (page on most system)
when growing the cs buffer this is to avoid having to realloc
at each cs_begin.
libdrm/radeon/radeon_cs_gem.c
patch
|
blob
|
history
diff --git
a/libdrm/radeon/radeon_cs_gem.c
b/libdrm/radeon/radeon_cs_gem.c
index
edba517
..
e06f222
100644
(file)
--- a/
libdrm/radeon/radeon_cs_gem.c
+++ b/
libdrm/radeon/radeon_cs_gem.c
@@
-225,9
+225,8
@@
static int cs_gem_begin(struct radeon_cs *cs,
if (cs->cdw + ndw > cs->ndw) {
uint32_t tmp, *ptr;
- int num = (ndw > 0x3FF) ? ndw : 0x3FF;
- tmp = (cs->ndw + 1 +
num) & (~num
);
+ tmp = (cs->ndw + 1 +
0x3FF) & (~0x3FF
);
ptr = (uint32_t*)realloc(cs->packets, 4 * tmp);
if (ptr == NULL) {
return -ENOMEM;