diff options
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a_allocator.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a_allocator.c b/drivers/gpu/nvgpu/gk20a/gk20a_allocator.c index 2b351492..fd721709 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a_allocator.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a_allocator.c | |||
@@ -90,6 +90,11 @@ static void balloc_compute_max_order(struct gk20a_allocator *a) | |||
90 | { | 90 | { |
91 | u64 true_max_order = ilog2(a->blks); | 91 | u64 true_max_order = ilog2(a->blks); |
92 | 92 | ||
93 | if (a->max_order == 0) { | ||
94 | a->max_order = true_max_order; | ||
95 | return; | ||
96 | } | ||
97 | |||
93 | if (a->max_order > true_max_order) | 98 | if (a->max_order > true_max_order) |
94 | a->max_order = true_max_order; | 99 | a->max_order = true_max_order; |
95 | if (a->max_order > GPU_BALLOC_MAX_ORDER) | 100 | if (a->max_order > GPU_BALLOC_MAX_ORDER) |