From: Dave Airlie Date: Fri, 3 Jul 2009 11:13:22 +0000 (+1000) Subject: radeon: fix realloc of packets. X-Git-Tag: libdrm-2.4.12~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=af90222c4570ca07c6983f60ebe46c35bc980495;p=platform%2Fupstream%2Flibdrm.git radeon: fix realloc of packets. This should use ndw not cdw, using cdw leads to realloc alignment going wrong --- diff --git a/libdrm/radeon/radeon_cs_gem.c b/libdrm/radeon/radeon_cs_gem.c index 82ef16c..edba517 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;