1*3cc5d7a5SMax Zhen /* SPDX-License-Identifier: GPL-2.0 */ 2*3cc5d7a5SMax Zhen /* 3*3cc5d7a5SMax Zhen * Copyright (C) 2026, Advanced Micro Devices, Inc. 4*3cc5d7a5SMax Zhen */ 5*3cc5d7a5SMax Zhen #ifndef _AMDXDNA_CBUF_H_ 6*3cc5d7a5SMax Zhen #define _AMDXDNA_CBUF_H_ 7*3cc5d7a5SMax Zhen 8*3cc5d7a5SMax Zhen #include "amdxdna_pci_drv.h" 9*3cc5d7a5SMax Zhen #include <drm/drm_device.h> 10*3cc5d7a5SMax Zhen #include <linux/dma-buf.h> 11*3cc5d7a5SMax Zhen 12*3cc5d7a5SMax Zhen bool amdxdna_use_carveout(struct amdxdna_dev *xdna); 13*3cc5d7a5SMax Zhen int amdxdna_carveout_init(struct amdxdna_dev *xdna, u64 carveout_addr, u64 carveout_size); 14*3cc5d7a5SMax Zhen void amdxdna_carveout_fini(struct amdxdna_dev *xdna); 15*3cc5d7a5SMax Zhen void amdxdna_get_carveout_conf(struct amdxdna_dev *xdna, u64 *addr, u64 *size); 16*3cc5d7a5SMax Zhen struct dma_buf *amdxdna_get_cbuf(struct drm_device *dev, size_t size, u64 alignment); 17*3cc5d7a5SMax Zhen 18*3cc5d7a5SMax Zhen #endif 19