video: tegra: nvmap: Add header file for nvmap_dmabuf unit

Refactor nvmap dmabuf code by creating header file for functions
exposed by the unit and make internal functions static.

JIRA TMM-5625

Change-Id: Ic5e99506a3362937dc5d1eb3bd05047c9ffdac6a
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3203525
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Pritesh Raithatha
2024-08-30 10:55:01 +00:00
committed by Jon Hunter
parent b55db09752
commit db0a9ab702
8 changed files with 36 additions and 21 deletions

View File

@@ -33,6 +33,7 @@
#include "nvmap_priv.h"
#include "nvmap_ioctl.h"
#include "nvmap_alloc.h"
#include "nvmap_dmabuf.h"
#define NVMAP_DMABUF_ATTACH nvmap_dmabuf_attach
@@ -362,7 +363,7 @@ static int __nvmap_dmabuf_begin_cpu_access(struct dma_buf *dmabuf,
#define NVMAP_DMABUF_BEGIN_CPU_ACCESS __nvmap_dmabuf_begin_cpu_access
#define NVMAP_DMABUF_END_CPU_ACCESS __nvmap_dmabuf_end_cpu_access
int __nvmap_map(struct nvmap_handle *h, struct vm_area_struct *vma)
static int __nvmap_map(struct nvmap_handle *h, struct vm_area_struct *vma)
{
struct nvmap_vma_priv *priv;
@@ -554,7 +555,7 @@ err_nomem:
return ERR_PTR(err);
}
int __nvmap_dmabuf_fd(struct nvmap_client *client,
static int __nvmap_dmabuf_fd(struct nvmap_client *client,
struct dma_buf *dmabuf, int flags)
{
int ret;