#include <linux/dma-buf.h>
#include <linux/scatterlist.h>
#include <linux/shmem_fs.h>
#include <linux/vmalloc.h>
#include <drm/drm_gem.h>
#include <drm/drm_prime.h>
#include <drm/drm_probe_helper.h>
#include <xen/balloon.h>
#include <xen/xen.h>
#include "xen_drm_front.h"
#include "xen_drm_front_gem.h"
struct xen_gem_object { … };
static inline struct xen_gem_object *
to_xen_gem_obj(struct drm_gem_object *gem_obj)
{ … }
static int gem_alloc_pages_array(struct xen_gem_object *xen_obj,
size_t buf_size)
{ … }
static void gem_free_pages_array(struct xen_gem_object *xen_obj)
{ … }
static int xen_drm_front_gem_object_mmap(struct drm_gem_object *gem_obj,
struct vm_area_struct *vma)
{ … }
static const struct vm_operations_struct xen_drm_drv_vm_ops = …;
static const struct drm_gem_object_funcs xen_drm_front_gem_object_funcs = …;
static struct xen_gem_object *gem_create_obj(struct drm_device *dev,
size_t size)
{ … }
static struct xen_gem_object *gem_create(struct drm_device *dev, size_t size)
{ … }
struct drm_gem_object *xen_drm_front_gem_create(struct drm_device *dev,
size_t size)
{ … }
void xen_drm_front_gem_free_object_unlocked(struct drm_gem_object *gem_obj)
{ … }
struct page **xen_drm_front_gem_get_pages(struct drm_gem_object *gem_obj)
{ … }
struct sg_table *xen_drm_front_gem_get_sg_table(struct drm_gem_object *gem_obj)
{ … }
struct drm_gem_object *
xen_drm_front_gem_import_sg_table(struct drm_device *dev,
struct dma_buf_attachment *attach,
struct sg_table *sgt)
{ … }
int xen_drm_front_gem_prime_vmap(struct drm_gem_object *gem_obj,
struct iosys_map *map)
{ … }
void xen_drm_front_gem_prime_vunmap(struct drm_gem_object *gem_obj,
struct iosys_map *map)
{ … }