From 8e611fb654e3f13258cd481cfd33d35d8d0fb8bb Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Tue, 7 Nov 2017 11:01:26 -0800 Subject: gpu: nvgpu: Hard code map_buffer_batch_limit Add a hard coded #define for map_buffer_batch_limit and use that insted of querying from GPU characteristics. Also add an nvgpu_is_enabled() flag for disabling batch mapping, and set map_buffer_batch_limit to zero if batch mapping is disabled. JIRA NVGPU-388 Change-Id: Ic91feea638d0f47c5c22321886cfc75e97259dc3 Signed-off-by: Terje Bergstrom Reviewed-on: https://git-master.nvidia.com/r/1593690 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/gk20a.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index 2d7266ce..1d594d29 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c @@ -397,6 +397,7 @@ int gk20a_init_gpu_characteristics(struct gk20a *g) __nvgpu_set_enabled(g, NVGPU_SUPPORT_PARTIAL_MAPPINGS, true); __nvgpu_set_enabled(g, NVGPU_SUPPORT_MAP_DIRECT_KIND_CTRL, true); + __nvgpu_set_enabled(g, NVGPU_SUPPORT_MAP_BUFFER_BATCH, true); if (IS_ENABLED(CONFIG_SYNC)) __nvgpu_set_enabled(g, NVGPU_SUPPORT_SYNC_FENCE_FDS, true); @@ -464,8 +465,6 @@ int gk20a_init_gpu_characteristics(struct gk20a *g) gpu->cbc_cache_line_size = g->gr.cacheline_size; gpu->cbc_comptags_per_line = g->gr.comptags_per_cacheline; - gpu->map_buffer_batch_limit = 256; - if (g->ops.clk.get_maxrate) gpu->max_freq = g->ops.clk.get_maxrate(&g->clk); -- cgit v1.2.2