From db7095ce5180552d1a70fdea779e5987d55cce7b Mon Sep 17 00:00:00 2001 From: Konsta Holtta Date: Tue, 1 Dec 2015 11:55:27 +0200 Subject: gpu: nvgpu: bitmap allocator for comptags Restore comptags to be bitmap-allocated, like they were before we had the buddy allocator. The new buddy allocator introduced by e99aa2485f8992eabe3556f3ebcb57bdc8ad91ff (originally 6ab2e0c49cb79ca68d2f83f1d4610783d2eaa79b) is fine for the big VAs, but unsuitable for the small compbit store. This commit reverts partially the combination of the above commit and also one after it, 86fc7ec9a05999bea8de320840b962db3ee11410, that fixed a bug which is not present when using a bitmap. With a bitmap allocator, pruning the extra allocation necessary for user-mapped mode is possible, so that is also restored. The original generic bitmap allocator is not restored; instead, a comptag-only allocator is introduced. Bug 200145635 Change-Id: I87f3a911826a801124cfd21e44857dfab1c3f378 Signed-off-by: Konsta Holtta Reviewed-on: http://git-master/r/837180 (cherry picked from commit 5a504aeb54f3e89e6561932971158a397157b3f2) Reviewed-on: http://git-master/r/839742 Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom --- drivers/gpu/nvgpu/gm20b/ltc_gm20b.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/gpu/nvgpu/gm20b/ltc_gm20b.c') diff --git a/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c b/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c index 9c250a7d..5b6bff7f 100644 --- a/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c @@ -25,7 +25,6 @@ #include "gk20a/ltc_common.c" #include "gk20a/gk20a.h" -#include "gk20a/gk20a_allocator.h" static int gm20b_ltc_init_comptags(struct gk20a *g, struct gr_gk20a *gr) @@ -90,8 +89,9 @@ static int gm20b_ltc_init_comptags(struct gk20a *g, struct gr_gk20a *gr) if (err) return err; - __gk20a_allocator_init(&gr->comp_tags, NULL, "comptag", - 1, max_comptag_lines - 1, 1, 10, 0); + err = gk20a_comptag_allocator_init(&gr->comp_tags, max_comptag_lines); + if (err) + return err; gr->comptags_per_cacheline = comptags_per_cacheline; gr->slices_per_ltc = slices_per_ltc; -- cgit v1.2.2