winsys/amdgpu: decay max_ib_size over time
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Sun, 8 May 2016 17:53:23 +0000 (12:53 -0500)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 1 Jun 2016 20:52:20 +0000 (22:52 +0200)
So that memory use will eventually decrease again after a temporary peak.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/winsys/amdgpu/drm/amdgpu_cs.c

index 6195de9bc3c06e5b70126659afd9a6bc865bf2fd..fefa5d6db535cb548f66406576d70d4a66be5bbc 100644 (file)
@@ -461,6 +461,8 @@ static bool amdgpu_get_new_ib(struct radeon_winsys *ws, struct amdgpu_cs *cs,
                               amdgpu_ib_max_submit_dwords(ib_type)));
    }
 
+   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;