linux/drivers/media/pci/intel/ipu6/ipu6-dma.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2013--2024 Intel Corporation
 */

#include <linux/cacheflush.h>
#include <linux/dma-mapping.h>
#include <linux/iova.h>
#include <linux/list.h>
#include <linux/mm.h>
#include <linux/vmalloc.h>
#include <linux/scatterlist.h>
#include <linux/slab.h>
#include <linux/types.h>

#include "ipu6.h"
#include "ipu6-bus.h"
#include "ipu6-dma.h"
#include "ipu6-mmu.h"

struct vm_info {};

static struct vm_info *get_vm_info(struct ipu6_mmu *mmu, dma_addr_t iova)
{}

static void __dma_clear_buffer(struct page *page, size_t size,
			       unsigned long attrs)
{}

static struct page **__dma_alloc_buffer(struct device *dev, size_t size,
					gfp_t gfp, unsigned long attrs)
{}

static void __dma_free_buffer(struct device *dev, struct page **pages,
			      size_t size, unsigned long attrs)
{}

static void ipu6_dma_sync_single_for_cpu(struct device *dev,
					 dma_addr_t dma_handle,
					 size_t size,
					 enum dma_data_direction dir)
{}

static void ipu6_dma_sync_sg_for_cpu(struct device *dev,
				     struct scatterlist *sglist,
				     int nents, enum dma_data_direction dir)
{}

static void *ipu6_dma_alloc(struct device *dev, size_t size,
			    dma_addr_t *dma_handle, gfp_t gfp,
			    unsigned long attrs)
{}

static void ipu6_dma_free(struct device *dev, size_t size, void *vaddr,
			  dma_addr_t dma_handle,
			  unsigned long attrs)
{}

static int ipu6_dma_mmap(struct device *dev, struct vm_area_struct *vma,
			 void *addr, dma_addr_t iova, size_t size,
			 unsigned long attrs)
{}

static void ipu6_dma_unmap_sg(struct device *dev,
			      struct scatterlist *sglist,
			      int nents, enum dma_data_direction dir,
			      unsigned long attrs)
{}

static int ipu6_dma_map_sg(struct device *dev, struct scatterlist *sglist,
			   int nents, enum dma_data_direction dir,
			   unsigned long attrs)
{}

/*
 * Create scatter-list for the already allocated DMA buffer
 */
static int ipu6_dma_get_sgtable(struct device *dev, struct sg_table *sgt,
				void *cpu_addr, dma_addr_t handle, size_t size,
				unsigned long attrs)
{}

const struct dma_map_ops ipu6_dma_ops =;