[Mesa-dev] [PATCH 18/18] winsys/amdgpu: decay max_ib_size over time

Nicolai Hähnle nhaehnle at gmail.com
Mon May 9 23:21:36 UTC 2016


From: Nicolai Hähnle <nicolai.haehnle at amd.com>

So that memory use will eventually decrease again after a temporary peak.
---
 src/gallium/winsys/amdgpu/drm/amdgpu_cs.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
index 74384e6..6fdaa9c 100644
--- a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
+++ b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
@@ -430,6 +430,8 @@ static bool amdgpu_get_new_ib(struct radeon_winsys *ws, struct amdgpu_cs *cs,
    if (!amdgpu_cs_has_chaining(cs->ring_type))
       ib_size = MAX2(ib_size, 4 << MIN2(19, util_last_bit(ib->max_ib_size)));
 
+   ib->max_ib_size = ib->max_ib_size - ib->max_ib_size / 32;
+
    ib->base.prev_dw = 0;
    ib->base.num_prev = 0;
    ib->base.current.cdw = 0;
-- 
2.7.4



More information about the mesa-dev mailing list