* [PATCH] drm/radeon: Take IH ring into account for test size calculation.
@ 2011-08-19 15:24 Michel Dänzer
2011-08-19 18:59 ` Alex Deucher
0 siblings, 1 reply; 3+ messages in thread
From: Michel Dänzer @ 2011-08-19 15:24 UTC (permalink / raw)
To: dri-devel
From: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
---
drivers/gpu/drm/radeon/radeon_test.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_test.c b/drivers/gpu/drm/radeon/radeon_test.c
index dee4a0c..1ebd0fe 100644
--- a/drivers/gpu/drm/radeon/radeon_test.c
+++ b/drivers/gpu/drm/radeon/radeon_test.c
@@ -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
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/radeon: Take IH ring into account for test size calculation.
2011-08-19 15:24 [PATCH] drm/radeon: Take IH ring into account for test size calculation Michel Dänzer
@ 2011-08-19 18:59 ` Alex Deucher
2011-08-23 9:49 ` Michel Dänzer
0 siblings, 1 reply; 3+ messages in thread
From: Alex Deucher @ 2011-08-19 18:59 UTC (permalink / raw)
To: Michel Dänzer; +Cc: dri-devel
2011/8/19 Michel Dänzer <michel@daenzer.net>:
> From: Michel Dänzer <michel.daenzer@amd.com>
>
> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Should probably also take into account the additional CP rings we
allocate on cayman.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
> ---
> drivers/gpu/drm/radeon/radeon_test.c | 10 +++++++---
> 1 files changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_test.c b/drivers/gpu/drm/radeon/radeon_test.c
> index dee4a0c..1ebd0fe 100644
> --- a/drivers/gpu/drm/radeon/radeon_test.c
> +++ b/drivers/gpu/drm/radeon/radeon_test.c
> @@ -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
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/radeon: Take IH ring into account for test size calculation.
2011-08-19 18:59 ` Alex Deucher
@ 2011-08-23 9:49 ` Michel Dänzer
0 siblings, 0 replies; 3+ messages in thread
From: Michel Dänzer @ 2011-08-23 9:49 UTC (permalink / raw)
To: Alex Deucher; +Cc: dri-devel
On Fre, 2011-08-19 at 14:59 -0400, Alex Deucher wrote:
> 2011/8/19 Michel Dänzer <michel@daenzer.net>:
> > From: Michel Dänzer <michel.daenzer@amd.com>
> >
> > Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
>
> 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.
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Debian, X and DRI developer
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-08-23 9:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-19 15:24 [PATCH] drm/radeon: Take IH ring into account for test size calculation Michel Dänzer
2011-08-19 18:59 ` Alex Deucher
2011-08-23 9:49 ` Michel Dänzer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox