diff options
author | Dave Airlie <airlied@linux.ie> | 2009-06-03 23:08:13 +0200 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-06-04 01:14:28 +0200 |
commit | 9863871bd1bbf218b921af5e0bc48ca4f6ea9f12 (patch) | |
tree | 5e6c5a64fd48d4030fe10da7d541ecf93f6f3cf3 /drivers/gpu/drm/radeon/radeon_cp.c | |
parent | drm: fix irq naming for kms drivers. (diff) | |
download | linux-9863871bd1bbf218b921af5e0bc48ca4f6ea9f12.tar.xz linux-9863871bd1bbf218b921af5e0bc48ca4f6ea9f12.zip |
drm/radeon: fix ring free alignment calculations
fd.o bz#21849
We were aligning to +16 dwords, instead of to the next 16dword
boundary in the ring. Fix the calculation to go to the next 16dword
boundary when space checking.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_cp.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_cp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_cp.c b/drivers/gpu/drm/radeon/radeon_cp.c index 77a7a4d84650..aff90bb96488 100644 --- a/drivers/gpu/drm/radeon/radeon_cp.c +++ b/drivers/gpu/drm/radeon/radeon_cp.c @@ -2185,9 +2185,9 @@ void radeon_commit_ring(drm_radeon_private_t *dev_priv) /* check if the ring is padded out to 16-dword alignment */ - tail_aligned = dev_priv->ring.tail & 0xf; + tail_aligned = dev_priv->ring.tail & (RADEON_RING_ALIGN-1); if (tail_aligned) { - int num_p2 = 16 - tail_aligned; + int num_p2 = RADEON_RING_ALIGN - tail_aligned; ring = dev_priv->ring.start; /* pad with some CP_PACKET2 */ |