mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: Separate vidmem alloc from Linux code
Split the core vidmem allocation from the Linux component of vidmem allocation. The core vidmem allocation allocates the nvgpu_mem struct that defines the vidmem buffer in the core MM code. The Linux code now allocates some Linux specific stuff (dma_buf, etc) and also allocates the core vidmem buf. JIRA NVGPU-30 JIRA NVGPU-138 Change-Id: I88e87e0abd5ec714610eacc6eac17e148bcee3ce Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1540708 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
88d5f6b415
commit
59e4089278
@@ -26,6 +26,9 @@
|
||||
#include <nvgpu/bug.h>
|
||||
#include <nvgpu/bus.h>
|
||||
#include <nvgpu/vidmem.h>
|
||||
#include <nvgpu/log.h>
|
||||
|
||||
#include <nvgpu/linux/vidmem.h>
|
||||
|
||||
#include "ioctl_ctrl.h"
|
||||
#include "ioctl_tsg.h"
|
||||
@@ -33,9 +36,8 @@
|
||||
#include "gk20a/gk20a.h"
|
||||
#include "gk20a/platform_gk20a.h"
|
||||
#include "gk20a/fence_gk20a.h"
|
||||
#include "os_linux.h"
|
||||
|
||||
#include <nvgpu/log.h>
|
||||
#include "os_linux.h"
|
||||
|
||||
#define HZ_TO_MHZ(a) ((a > 0xF414F9CD7ULL) ? 0xffff : (a >> 32) ? \
|
||||
(u32) ((a * 0x10C8ULL) >> 32) : (u16) ((u32) a/MHZ))
|
||||
@@ -693,7 +695,7 @@ static int nvgpu_gpu_alloc_vidmem(struct gk20a *g,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
fd = nvgpu_vidmem_buf_alloc(g, args->in.size);
|
||||
fd = nvgpu_vidmem_export_linux(g, args->in.size);
|
||||
if (fd < 0)
|
||||
return fd;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user