#include <linux/debugfs.h>
#include <linux/iosys-map.h>
#include <linux/pci.h>
#include <drm/drm_device.h>
#include <drm/drm_file.h>
#include <drm/drm_gem_ttm_helper.h>
#include <drm/radeon_drm.h>
#include "radeon.h"
#include "radeon_prime.h"
struct dma_buf *radeon_gem_prime_export(struct drm_gem_object *gobj,
int flags);
struct sg_table *radeon_gem_prime_get_sg_table(struct drm_gem_object *obj);
int radeon_gem_prime_pin(struct drm_gem_object *obj);
void radeon_gem_prime_unpin(struct drm_gem_object *obj);
const struct drm_gem_object_funcs radeon_gem_object_funcs;
static vm_fault_t radeon_gem_fault(struct vm_fault *vmf)
{ … }
static const struct vm_operations_struct radeon_gem_vm_ops = …;
static void radeon_gem_object_free(struct drm_gem_object *gobj)
{ … }
int radeon_gem_object_create(struct radeon_device *rdev, unsigned long size,
int alignment, int initial_domain,
u32 flags, bool kernel,
struct drm_gem_object **obj)
{ … }
static int radeon_gem_set_domain(struct drm_gem_object *gobj,
uint32_t rdomain, uint32_t wdomain)
{ … }
int radeon_gem_init(struct radeon_device *rdev)
{ … }
void radeon_gem_fini(struct radeon_device *rdev)
{ … }
static int radeon_gem_object_open(struct drm_gem_object *obj, struct drm_file *file_priv)
{ … }
static void radeon_gem_object_close(struct drm_gem_object *obj,
struct drm_file *file_priv)
{ … }
static int radeon_gem_handle_lockup(struct radeon_device *rdev, int r)
{ … }
static int radeon_gem_object_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma)
{ … }
const struct drm_gem_object_funcs radeon_gem_object_funcs = …;
int radeon_gem_info_ioctl(struct drm_device *dev, void *data,
struct drm_file *filp)
{ … }
int radeon_gem_create_ioctl(struct drm_device *dev, void *data,
struct drm_file *filp)
{ … }
int radeon_gem_userptr_ioctl(struct drm_device *dev, void *data,
struct drm_file *filp)
{ … }
int radeon_gem_set_domain_ioctl(struct drm_device *dev, void *data,
struct drm_file *filp)
{ … }
int radeon_mode_dumb_mmap(struct drm_file *filp,
struct drm_device *dev,
uint32_t handle, uint64_t *offset_p)
{ … }
int radeon_gem_mmap_ioctl(struct drm_device *dev, void *data,
struct drm_file *filp)
{ … }
int radeon_gem_busy_ioctl(struct drm_device *dev, void *data,
struct drm_file *filp)
{ … }
int radeon_gem_wait_idle_ioctl(struct drm_device *dev, void *data,
struct drm_file *filp)
{ … }
int radeon_gem_set_tiling_ioctl(struct drm_device *dev, void *data,
struct drm_file *filp)
{ … }
int radeon_gem_get_tiling_ioctl(struct drm_device *dev, void *data,
struct drm_file *filp)
{ … }
static void radeon_gem_va_update_vm(struct radeon_device *rdev,
struct radeon_bo_va *bo_va)
{ … }
int radeon_gem_va_ioctl(struct drm_device *dev, void *data,
struct drm_file *filp)
{ … }
int radeon_gem_op_ioctl(struct drm_device *dev, void *data,
struct drm_file *filp)
{ … }
int radeon_align_pitch(struct radeon_device *rdev, int width, int cpp, bool tiled)
{ … }
int radeon_mode_dumb_create(struct drm_file *file_priv,
struct drm_device *dev,
struct drm_mode_create_dumb *args)
{ … }
#if defined(CONFIG_DEBUG_FS)
static int radeon_debugfs_gem_info_show(struct seq_file *m, void *unused)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
#endif
void radeon_gem_debugfs_init(struct radeon_device *rdev)
{ … }