summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a
diff options
context:
space:
mode:
authorNicolin Chen <nicolinc@nvidia.com>2018-08-30 17:52:16 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-09-04 19:17:04 -0400
commit9e4bbd2c9b4d5d9712921a7db058061e4f8cd389 (patch)
treec1c569d83a99429fc71559a516f6ddab74a3c011 /drivers/gpu/nvgpu/gk20a
parentbd47d00ce736a421a3b4376ad996fdc877ccf0ca (diff)
gpu: nvgpu: Add configurable comptag_mem_deduct sysfs node per device
Adding a comptag_mem_deduct in the platform_gk20a has certain problems: 1) It's not really convenient for platform users to configure it. 2) All products using the same GPU have to share the same configuration. So this patch moves this comptag_mem_deduct from struct platform_gk20a to struct gr_gk20a (per device). And it adds an sysfs node for products or platform users to easily configure from user space. Note: The comptag memory will not be allocated until the GPU driver goes through the final poweron routine. So the user space has a small window to configure this sysfs node. Bug 2327574 Bug 2284925 Change-Id: Ie7d00b082704e422645c0ea254b59e22f9fc3b7f Signed-off-by: Nicolin Chen <nicolinc@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1810334 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.h b/drivers/gpu/nvgpu/gk20a/gr_gk20a.h
index 303e1f53..44b6de8d 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.h
@@ -373,6 +373,12 @@ struct gr_gk20a {
373 u32 gfxp_wfi_timeout_count; 373 u32 gfxp_wfi_timeout_count;
374 u32 gfxp_wfi_timeout_unit; 374 u32 gfxp_wfi_timeout_unit;
375 375
376 /*
377 * The deductible memory size for max_comptag_mem (in MBytes)
378 * Usually close to memory size that running system is taking
379 */
380 u32 comptag_mem_deduct;
381
376 struct gr_ctx_buffer_desc global_ctx_buffer[NR_GLOBAL_CTX_BUF]; 382 struct gr_ctx_buffer_desc global_ctx_buffer[NR_GLOBAL_CTX_BUF];
377 383
378 struct nvgpu_mem mmu_wr_mem; 384 struct nvgpu_mem mmu_wr_mem;