5d4c28b872
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>
24 lines
737 B
C
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_ */
|