mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: split the nvgpu_sgt unit from nvgpu_mem
Split the nvgpu_sgt code out from the nvgpu_mem code. Although the two chunks of code are related the SGT code is distinct and as such should be its own unit. To do this a new source file has been added - nvgpu_sgt.c - which contains all the nvgpu_sgt common APIs. These are the facade APIs to abstract the actual details of how any given nvgpu_sgt is actually implemented. An abstract unit - nvgpu_sgt_os - was also defined. This unit exists solely for the nvgpu_sgt unit to call so that the OS specific nvgpu_sgt_os_create_from_mem() API can be moved from the common nvgpu_sgt unit. Note this also updates the name of what the OS specific units are expected to call. Common code may still use the generic nvgpu_sgt_create_from_mem() API. JIRA NVGPU-1391 Change-Id: I37f5b2bbf9f84c0fb6bc296c3e04ea13518bd4d0 Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1946012 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> GVS: Gerrit_Virtual_Submit 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
1195239d1c
commit
c49e9e4bcd
@@ -25,6 +25,7 @@
|
||||
#include <nvgpu/vidmem.h>
|
||||
#include <nvgpu/gk20a.h>
|
||||
#include <nvgpu/string.h>
|
||||
#include <nvgpu/nvgpu_sgt_os.h>
|
||||
|
||||
#include <nvgpu/linux/dma.h>
|
||||
|
||||
@@ -367,8 +368,8 @@ struct nvgpu_sgt *nvgpu_linux_sgt_create(struct gk20a *g, struct sg_table *sgt)
|
||||
return nvgpu_sgt;
|
||||
}
|
||||
|
||||
struct nvgpu_sgt *nvgpu_sgt_create_from_mem(struct gk20a *g,
|
||||
struct nvgpu_mem *mem)
|
||||
struct nvgpu_sgt *nvgpu_sgt_os_create_from_mem(struct gk20a *g,
|
||||
struct nvgpu_mem *mem)
|
||||
{
|
||||
return nvgpu_linux_sgt_create(g, mem->priv.sgt);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user