drm/radeon: Take IH ring into account for test size calculation.
Subsystems (2)
PATCH 1/1 drm/radeon: Take IH ring into account for test size calculation.
From: Michel Dänzer <[email protected]>
--- drivers/gpu/drm/radeon/radeon_test.c | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-)
drivers/gpu/drm/radeon/radeon_test.c +7 -3
@@ -40,10 +40,14 @@ void radeon_test_moves(struct radeon_device *rdev) size =1024 *1024 ;/* Number of tests = -* (Total GTT - IB pool - writeback page - ring buffer) / test size +* (Total GTT - IB pool - writeback page - ring buffers) / test size */ - n = ((u32)(rdev->mc.gtt_size -RADEON_IB_POOL_SIZE *64 *1024 -RADEON_GPU_PAGE_SIZE - - rdev->cp.ring_size)) / size; + n = rdev->mc.gtt_size -RADEON_IB_POOL_SIZE *64 *1024 - rdev->cp.ring_size; +if (rdev->wb.wb_obj) + n -=RADEON_GPU_PAGE_SIZE ; +if (rdev->ih.ring_obj) + n -= rdev->ih.ring_size; + n /= size; gtt_obj =kzalloc (n *sizeof (*gtt_obj),GFP_KERNEL );if (!gtt_obj) {
Signature · 7 lines
1.7.5.4 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
2011/8/19 Michel Dänzer <[email protected]>:
Quoted 3 lines
From: Michel Dänzer <[email protected]>
Signed-off-by Michel Dänzer <[email protected]>
Should probably also take into account the additional CP rings we allocate on cayman.
Quoted 35 lines
---
drivers/gpu/drm/radeon/radeon_test.c | 10 +++++++---1 files changed, 7 insertions(+), 3 deletions(-)drivers/gpu/drm/radeon/radeon_test.c +7
-4@@ -40,10 +40,14 @@ void radeon_test_moves(struct radeon_device *rdev) size = 1024 * 1024; /* Number of tests = - * (Total GTT - IB pool - writeback page - ring buffer) / test size + * (Total GTT - IB pool - writeback page - ring buffers) / test size */ - n = ((u32)(rdev->mc.gtt_size - RADEON_IB_POOL_SIZE*64*1024 - RADEON_GPU_PAGE_SIZE - - rdev->cp.ring_size)) / size; + n = rdev->mc.gtt_size - RADEON_IB_POOL_SIZE*64*1024 - rdev->cp.ring_size; + if (rdev->wb.wb_obj) + n -= RADEON_GPU_PAGE_SIZE; + if (rdev->ih.ring_obj) + n -= rdev->ih.ring_size; + n /= size; gtt_obj = kzalloc(n * sizeof(*gtt_obj), GFP_KERNEL); if (!gtt_obj) { --1.7.5.4
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 7 lines · Alex Deucher
2011/8/19 Michel Dänzer <[email protected]>:
Quoted 3 lines
From: Michel Dänzer <[email protected]>
Signed-off-by Michel Dänzer <[email protected]>Should probably also take into account the additional CP rings we allocate on cayman.
Thanks for the heads up.
As we'd probably keep missing new additions like that, I'll post a followup patch to just silently abort on BO allocation/pinning failure instead.
Signature · 6 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Debian, X and DRI developer _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel