diff options
author | Aparna Das <aparnad@nvidia.com> | 2018-07-25 20:43:32 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-08-09 21:45:42 -0400 |
commit | 9c13b30a465ed94f1e3547dc439462c3ea496eb8 (patch) | |
tree | bcb6b30d3bbee222b1824c4b91bf233391e908fe /drivers/gpu/nvgpu/common/posix | |
parent | 0a0ad7e67560cfc18874795532ee1eba3b865e59 (diff) |
gpu: nvgpu: make cbc alloc os specific
CBC base needs to be aligned to 64KB. On Linux this is
achieved making compbit backing size multiple of 64KB.
However QNX nvmap alloc function does not allocate
memory aligned to requested size and needs to overallocate
to satisfy alignment requirement. Make cbc alloc function OS
specific to be able to modify QNX code.
Also align cbc base address to 64KB before writing to CBC BASE
register.
Bug 200426427
Change-Id: Ic867501403f2e2a4ba41ad5a8ed6f9c5c8ffa3f4
Signed-off-by: Aparna Das <aparnad@nvidia.com>
(cherry picked from commit 3f1e1133a46ebfc9763c649d7b839d069cae5a36)
Reviewed-on: https://git-master.nvidia.com/r/1786046
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/posix')
-rw-r--r-- | drivers/gpu/nvgpu/common/posix/stubs.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/posix/stubs.c b/drivers/gpu/nvgpu/common/posix/stubs.c index 0fa80bff..1e50930a 100644 --- a/drivers/gpu/nvgpu/common/posix/stubs.c +++ b/drivers/gpu/nvgpu/common/posix/stubs.c | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <nvgpu/ecc.h> | 28 | #include <nvgpu/ecc.h> |
29 | #include <nvgpu/ltc.h> | ||
29 | 30 | ||
30 | #include "gk20a/dbg_gpu_gk20a.h" | 31 | #include "gk20a/dbg_gpu_gk20a.h" |
31 | 32 | ||
@@ -41,3 +42,8 @@ int nvgpu_ecc_sysfs_init(struct gk20a *g) | |||
41 | void nvgpu_ecc_sysfs_remove(struct gk20a *g) | 42 | void nvgpu_ecc_sysfs_remove(struct gk20a *g) |
42 | { | 43 | { |
43 | } | 44 | } |
45 | |||
46 | int nvgpu_ltc_alloc_cbc(struct gk20a *g, size_t compbit_backing_size) | ||
47 | { | ||
48 | return 0; | ||
49 | } | ||