aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2009-09-11 12:02:03 -0400
committerDave Airlie <airlied@linux.ie>2009-09-11 18:05:05 -0400
commit1be340563cf40210487afe332c0d7c9a523dba5f (patch)
treee9fc1df88b51a70e191cc5bd632a2abe560b1fbf /drivers/gpu
parent7747b713049e63aa64bcac679535ddfff92b312d (diff)
drm/radeon/kms/r600: fix blit dword count for non r6xx
rv6xx emits two extra dwords in the render target setup. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/radeon/r600_blit_kms.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/r600_blit_kms.c b/drivers/gpu/drm/radeon/r600_blit_kms.c
index bbb0d615ac1c..1ebfd5a6dfec 100644
--- a/drivers/gpu/drm/radeon/r600_blit_kms.c
+++ b/drivers/gpu/drm/radeon/r600_blit_kms.c
@@ -550,6 +550,12 @@ int r600_blit_prepare_copy(struct radeon_device *rdev, int size_bytes)
550 int r; 550 int r;
551 int ring_size; 551 int ring_size;
552 int max_size; 552 int max_size;
553 /* loops of emits 64 + fence emit possible */
554 int dwords_per_loop = 76;
555
556 /* set_render_target emits 2 extra dwords on rv6xx */
557 if (rdev->family > CHIP_R600 && rdev->family < CHIP_RV770)
558 dwords_per_loop += 2;
553 559
554 /* 8 bpp vs 32 bpp for xfer unit */ 560 /* 8 bpp vs 32 bpp for xfer unit */
555 if (size_bytes & 3) 561 if (size_bytes & 3)
@@ -560,8 +566,7 @@ int r600_blit_prepare_copy(struct radeon_device *rdev, int size_bytes)
560 r = r600_vb_ib_get(rdev); 566 r = r600_vb_ib_get(rdev);
561 WARN_ON(r); 567 WARN_ON(r);
562 568
563 /* loops of emits 64 + fence emit possible */ 569 ring_size = ((size_bytes + max_size) / max_size) * dwords_per_loop;
564 ring_size = ((size_bytes + max_size) / max_size) * 78;
565 /* set default + shaders */ 570 /* set default + shaders */
566 ring_size += 40; /* shaders + def state */ 571 ring_size += 40; /* shaders + def state */
567 ring_size += 3; /* fence emit for VB IB */ 572 ring_size += 3; /* fence emit for VB IB */