mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: simplify gmmu map calls
Introduce nvgpu_gmmu_map_partial() to map a specific size of a buffer represented by nvgpu_mem, or what nvgpu_gmmu_map() used to do. Delete the size parameter from nvgpu_gmmu_map() such that it now maps the entire buffer. The separate size parameter is a historical artifact from when nvgpu_mem did not exist yet; the typical use is to map the entire buffer. Mapping at a certain address with nvgpu_gmmu_map_fixed() still takes the size parameter. The returned address still has to be stored somewhere, typically to mem.gpu_va by the caller so that the matching unmap variant finds the right address. Change-Id: I7d67a0b15d741c6bcee1aecff1678e3216cc28d2 Signed-off-by: Konsta Hölttä <kholtta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2601788 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
6d38ae76ce
commit
1b1d183b9c
@@ -530,7 +530,7 @@ static int nvgpu_channel_alloc_usermode_buffers(struct nvgpu_channel *c,
|
||||
}
|
||||
|
||||
c->usermode_gpfifo.gpu_va = nvgpu_gmmu_map(c->vm, &c->usermode_gpfifo,
|
||||
c->usermode_gpfifo.size, 0, gk20a_mem_flag_read_only,
|
||||
0, gk20a_mem_flag_read_only,
|
||||
false, c->usermode_gpfifo.aperture);
|
||||
|
||||
if (c->usermode_gpfifo.gpu_va == 0) {
|
||||
|
||||
Reference in New Issue
Block a user