#include <linux/file.h>
#include <linux/sync_file.h>
#include <linux/uaccess.h>
#include <drm/drm_drv.h>
#include <drm/drm_file.h>
#include <drm/drm_syncobj.h>
#include "msm_drv.h"
#include "msm_gpu.h"
#include "msm_gem.h"
#include "msm_gpu_trace.h"
#define SUBMIT_ERROR(submit, fmt, ...) …
static struct msm_gem_submit *submit_create(struct drm_device *dev,
struct msm_gpu *gpu,
struct msm_gpu_submitqueue *queue, uint32_t nr_bos,
uint32_t nr_cmds)
{ … }
void __msm_gem_submit_destroy(struct kref *kref)
{ … }
static int submit_lookup_objects(struct msm_gem_submit *submit,
struct drm_msm_gem_submit *args, struct drm_file *file)
{ … }
static int submit_lookup_cmds(struct msm_gem_submit *submit,
struct drm_msm_gem_submit *args, struct drm_file *file)
{ … }
static int submit_lock_objects(struct msm_gem_submit *submit)
{ … }
static int submit_fence_sync(struct msm_gem_submit *submit)
{ … }
static int submit_pin_objects(struct msm_gem_submit *submit)
{ … }
static void submit_unpin_objects(struct msm_gem_submit *submit)
{ … }
static void submit_attach_object_fences(struct msm_gem_submit *submit)
{ … }
static int submit_bo(struct msm_gem_submit *submit, uint32_t idx,
struct drm_gem_object **obj, uint64_t *iova)
{ … }
static int submit_reloc(struct msm_gem_submit *submit, struct drm_gem_object *obj,
uint32_t offset, uint32_t nr_relocs, struct drm_msm_gem_submit_reloc *relocs)
{ … }
static void submit_cleanup(struct msm_gem_submit *submit, bool error)
{ … }
void msm_submit_retire(struct msm_gem_submit *submit)
{ … }
struct msm_submit_post_dep { … };
static struct drm_syncobj **msm_parse_deps(struct msm_gem_submit *submit,
struct drm_file *file,
uint64_t in_syncobjs_addr,
uint32_t nr_in_syncobjs,
size_t syncobj_stride)
{ … }
static void msm_reset_syncobjs(struct drm_syncobj **syncobjs,
uint32_t nr_syncobjs)
{ … }
static struct msm_submit_post_dep *msm_parse_post_deps(struct drm_device *dev,
struct drm_file *file,
uint64_t syncobjs_addr,
uint32_t nr_syncobjs,
size_t syncobj_stride)
{ … }
static void msm_process_post_deps(struct msm_submit_post_dep *post_deps,
uint32_t count, struct dma_fence *fence)
{ … }
int msm_ioctl_gem_submit(struct drm_device *dev, void *data,
struct drm_file *file)
{ … }