summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/r600_blit_kms.c
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2010-02-25 04:23:31 +0000
committerDave Airlie <airlied@redhat.com>2010-03-01 15:56:41 +1000
commitd964fc54ed06cea45dfd10832ed3d34f3ddb661b (patch)
treeb4a9d37ba06c2c9ca4c2aef457922a23ddf55399 /drivers/gpu/drm/radeon/r600_blit_kms.c
parent32b3c2abaf8c61c80a8b02071c73f05252122ffe (diff)
downloadop-kernel-dev-d964fc54ed06cea45dfd10832ed3d34f3ddb661b.zip
op-kernel-dev-d964fc54ed06cea45dfd10832ed3d34f3ddb661b.tar.gz
drm/radeon: use ALIGN instead of open coding it
Cc: Jerome Glisse <jglisse@redhat.com> Cc: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Corbin Simpson <MostAwesomeDude@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/r600_blit_kms.c')
-rw-r--r--drivers/gpu/drm/radeon/r600_blit_kms.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/r600_blit_kms.c b/drivers/gpu/drm/radeon/r600_blit_kms.c
index de8bbbc..f6c6c77 100644
--- a/drivers/gpu/drm/radeon/r600_blit_kms.c
+++ b/drivers/gpu/drm/radeon/r600_blit_kms.c
@@ -25,7 +25,7 @@ set_render_target(struct radeon_device *rdev, int format,
u32 cb_color_info;
int pitch, slice;
- h = (h + 7) & ~7;
+ h = ALIGN(h, 8);
if (h < 8)
h = 8;
@@ -396,7 +396,7 @@ set_default_state(struct radeon_device *rdev)
NUM_ES_STACK_ENTRIES(num_es_stack_entries));
/* emit an IB pointing at default state */
- dwords = (rdev->r600_blit.state_len + 0xf) & ~0xf;
+ dwords = ALIGN(rdev->r600_blit.state_len, 0x10);
gpu_addr = rdev->r600_blit.shader_gpu_addr + rdev->r600_blit.state_offset;
radeon_ring_write(rdev, PACKET3(PACKET3_INDIRECT_BUFFER, 2));
radeon_ring_write(rdev, gpu_addr & 0xFFFFFFFC);
OpenPOWER on IntegriCloud