0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023 #ifndef __AMDGPU_GEM_H__
0024 #define __AMDGPU_GEM_H__
0025
0026 #include <drm/amdgpu_drm.h>
0027 #include <drm/drm_gem.h>
0028
0029
0030
0031
0032
0033 #define AMDGPU_GEM_DOMAIN_MAX 0x3
0034 #define gem_to_amdgpu_bo(gobj) container_of((gobj), struct amdgpu_bo, tbo.base)
0035
0036 unsigned long amdgpu_gem_timeout(uint64_t timeout_ns);
0037
0038
0039
0040
0041 void amdgpu_gem_force_release(struct amdgpu_device *adev);
0042 int amdgpu_gem_object_create(struct amdgpu_device *adev, unsigned long size,
0043 int alignment, u32 initial_domain,
0044 u64 flags, enum ttm_bo_type type,
0045 struct dma_resv *resv,
0046 struct drm_gem_object **obj);
0047
0048 int amdgpu_mode_dumb_create(struct drm_file *file_priv,
0049 struct drm_device *dev,
0050 struct drm_mode_create_dumb *args);
0051 int amdgpu_mode_dumb_mmap(struct drm_file *filp,
0052 struct drm_device *dev,
0053 uint32_t handle, uint64_t *offset_p);
0054
0055 int amdgpu_gem_create_ioctl(struct drm_device *dev, void *data,
0056 struct drm_file *filp);
0057 int amdgpu_gem_info_ioctl(struct drm_device *dev, void *data,
0058 struct drm_file *filp);
0059 int amdgpu_gem_userptr_ioctl(struct drm_device *dev, void *data,
0060 struct drm_file *filp);
0061 int amdgpu_gem_mmap_ioctl(struct drm_device *dev, void *data,
0062 struct drm_file *filp);
0063 int amdgpu_gem_wait_idle_ioctl(struct drm_device *dev, void *data,
0064 struct drm_file *filp);
0065 uint64_t amdgpu_gem_va_map_flags(struct amdgpu_device *adev, uint32_t flags);
0066 int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data,
0067 struct drm_file *filp);
0068 int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
0069 struct drm_file *filp);
0070
0071 int amdgpu_gem_metadata_ioctl(struct drm_device *dev, void *data,
0072 struct drm_file *filp);
0073
0074 #endif