12fbd6f94SChristian König /* 22fbd6f94SChristian König * Copyright 2019 Advanced Micro Devices, Inc. 32fbd6f94SChristian König * 42fbd6f94SChristian König * Permission is hereby granted, free of charge, to any person obtaining a 52fbd6f94SChristian König * copy of this software and associated documentation files (the "Software"), 62fbd6f94SChristian König * to deal in the Software without restriction, including without limitation 72fbd6f94SChristian König * the rights to use, copy, modify, merge, publish, distribute, sublicense, 82fbd6f94SChristian König * and/or sell copies of the Software, and to permit persons to whom the 92fbd6f94SChristian König * Software is furnished to do so, subject to the following conditions: 102fbd6f94SChristian König * 112fbd6f94SChristian König * The above copyright notice and this permission notice shall be included in 122fbd6f94SChristian König * all copies or substantial portions of the Software. 132fbd6f94SChristian König * 142fbd6f94SChristian König * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 152fbd6f94SChristian König * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 162fbd6f94SChristian König * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 172fbd6f94SChristian König * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 182fbd6f94SChristian König * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 192fbd6f94SChristian König * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 202fbd6f94SChristian König * OTHER DEALINGS IN THE SOFTWARE. 212fbd6f94SChristian König * 222fbd6f94SChristian König */ 232fbd6f94SChristian König #ifndef __AMDGPU_DMA_BUF_H__ 242fbd6f94SChristian König #define __AMDGPU_DMA_BUF_H__ 252fbd6f94SChristian König 262fbd6f94SChristian König #include <drm/drm_gem.h> 272fbd6f94SChristian König 28e4fa8457SDaniel Vetter struct dma_buf *amdgpu_gem_prime_export(struct drm_gem_object *gobj, 292fbd6f94SChristian König int flags); 302fbd6f94SChristian König struct drm_gem_object *amdgpu_gem_prime_import(struct drm_device *dev, 312fbd6f94SChristian König struct dma_buf *dma_buf); 32*0cf0ee98SArunpravin bool amdgpu_dmabuf_is_xgmi_accessible(struct amdgpu_device *adev, 33*0cf0ee98SArunpravin struct amdgpu_bo *bo); 342fbd6f94SChristian König 352fbd6f94SChristian König extern const struct dma_buf_ops amdgpu_dmabuf_ops; 362fbd6f94SChristian König 372fbd6f94SChristian König #endif 38