radeon: fix allocation
authorMathias Fröhlich <Mathias.Froehlich@gmx.net>
Tue, 3 Nov 2009 16:41:26 +0000 (11:41 -0500)
committerAlex Deucher <alexdeucher@gmail.com>
Tue, 3 Nov 2009 16:41:26 +0000 (11:41 -0500)
commit6eafd1cf386d93bb9e34660227ca6f26aadfeb32
tree2cbd0093758ec8fdbc43d88832aabfbd0345c083
parentb0b96636dbf93445dd532b09b21fa4fc5ce6bdc7
radeon: fix allocation

The old code increments the command stream size by another kbyte, but does
not make sure that the requested packet size fits into the stream. The patch
ensures that the whole next packet fits there and rounds the allocated size to
a power of two.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
libdrm/radeon/radeon_cs_gem.c