android_kernel_samsung_sm8650/include/linux/qti-smmu-proxy-callbacks.h
Chris Goldsworthy 5d4c28b872 dma-heap: qcom: Add mapping callbacks for the SMMU proxy driver
Add callbacks for the SMMU proxy driver in the map and unmap
functions, so that clients can map their DMA-BUFs in the SMMU proxy
driver using dma_buf_map_attachment().  Clients use the
DMA_ATTR_QTI_SMMU_PROXY_MAP to have their buffer passed to the proxy
driver.

Change-Id: I4a6702da99fdbb915e8bd273c057950aa22b2efb
Signed-off-by: Chris Goldsworthy <quic_cgoldswo@quicinc.com>
2023-01-19 15:37:30 -08:00

24 lines
737 B
C

/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#ifndef __SMMU_PROXY_CALLBACKS_H_
#define __SMMU_PROXY_CALLBACKS_H_
typedef int (*smmu_proxy_map_sgtable)(struct device *client_dev, struct sg_table *table,
struct dma_buf *dmabuf);
typedef void (*smmu_proxy_unmap_sgtable)(struct device *client_dev, struct sg_table *table,
struct dma_buf *dmabuf);
struct smmu_proxy_callbacks {
smmu_proxy_map_sgtable map_sgtable;
smmu_proxy_unmap_sgtable unmap_sgtable;
};
int qti_smmu_proxy_register_callbacks(smmu_proxy_map_sgtable map_sgtable_fn_ptr,
smmu_proxy_unmap_sgtable unmap_sgtable_fn_ptr);
#endif /* __SMMU_PROXY_CALLBACKS_H_ */