mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 01:50:07 +03:00
gpu: nvgpu: add support for removing comptags and cbc from safety build
Safety build does not support compression. This patch adds support to compile out compression related changes - comptags, cbc. JIRA NVGPU-3532 Change-Id: I20e4ca7df46ceec175b903a6a62dff141140e787 Signed-off-by: Sagar Kamble <skamble@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2125473 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
840972c1cc
commit
556ddaf9a3
@@ -133,7 +133,9 @@ static int init_test_env(struct unit_module *m, struct gk20a *g)
|
||||
nvgpu_set_enabled(g, NVGPU_MM_UNIFIED_MEMORY, true);
|
||||
nvgpu_set_enabled(g, NVGPU_HAS_SYNCPOINTS, true);
|
||||
|
||||
#ifdef CONFIG_NVGPU_COMPRESSION
|
||||
g->ops.fb.compression_page_size = gp10b_fb_compression_page_size;
|
||||
#endif
|
||||
g->ops.fb.tlb_invalidate = gm20b_fb_tlb_invalidate;
|
||||
|
||||
g->ops.mm.gmmu.get_default_big_page_size =
|
||||
@@ -148,6 +150,8 @@ static int init_test_env(struct unit_module *m, struct gk20a *g)
|
||||
return UNIT_SUCCESS;
|
||||
}
|
||||
|
||||
#define NV_KIND_INVALID -1
|
||||
|
||||
/*
|
||||
* Try mapping a buffer into the GPU virtual address space:
|
||||
* - Allocate a new CPU buffer
|
||||
@@ -175,6 +179,7 @@ static int map_buffer(struct unit_module *m,
|
||||
struct nvgpu_mem mem = {0};
|
||||
struct nvgpu_sgt *sgt = NULL;
|
||||
bool fixed_gpu_va = (gpu_va != 0);
|
||||
s16 compr_kind;
|
||||
u32 pte[2];
|
||||
|
||||
if (vm == NULL) {
|
||||
@@ -229,6 +234,12 @@ static int map_buffer(struct unit_module *m,
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NVGPU_COMPRESSION
|
||||
compr_kind = 0;
|
||||
#else
|
||||
compr_kind = NV_KIND_INVALID;
|
||||
#endif
|
||||
|
||||
ret = nvgpu_vm_map(vm,
|
||||
&os_buf,
|
||||
sgt,
|
||||
@@ -237,7 +248,7 @@ static int map_buffer(struct unit_module *m,
|
||||
0,
|
||||
gk20a_mem_flag_none,
|
||||
NVGPU_VM_MAP_CACHEABLE,
|
||||
0,
|
||||
compr_kind,
|
||||
0,
|
||||
batch,
|
||||
APERTURE_SYSMEM,
|
||||
|
||||
Reference in New Issue
Block a user