summaryrefslogtreecommitdiff
path: root/libdrm
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-07-03 21:13:22 +1000
committerDave Airlie <airlied@redhat.com>2009-07-03 21:13:22 +1000
commitaf90222c4570ca07c6983f60ebe46c35bc980495 (patch)
tree2b44579433e452bb25d340c0367111398873a420 /libdrm
parentfbac5891b91c795de61f4d7cbc1a6799474364ad (diff)
radeon: fix realloc of packets.
This should use ndw not cdw, using cdw leads to realloc alignment going wrong
Diffstat (limited to 'libdrm')
-rw-r--r--libdrm/radeon/radeon_cs_gem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libdrm/radeon/radeon_cs_gem.c b/libdrm/radeon/radeon_cs_gem.c
index 82ef16cb..edba5173 100644
--- a/libdrm/radeon/radeon_cs_gem.c
+++ b/libdrm/radeon/radeon_cs_gem.c
@@ -227,7 +227,7 @@ static int cs_gem_begin(struct radeon_cs *cs,
uint32_t tmp, *ptr;
int num = (ndw > 0x3FF) ? ndw : 0x3FF;
- tmp = (cs->cdw + 1 + num) & (~num);
+ tmp = (cs->ndw + 1 + num) & (~num);
ptr = (uint32_t*)realloc(cs->packets, 4 * tmp);
if (ptr == NULL) {
return -ENOMEM;