#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/device.h>
#include <linux/io.h>
#include <linux/sched/signal.h>
#include <linux/dma-fence-array.h>
#include <drm/drm_syncobj.h>
#include "uapi/drm/vc4_drm.h"
#include "vc4_drv.h"
#include "vc4_regs.h"
#include "vc4_trace.h"
static void
vc4_queue_hangcheck(struct drm_device *dev)
{ … }
struct vc4_hang_state { … };
static void
vc4_free_hang_state(struct drm_device *dev, struct vc4_hang_state *state)
{ … }
int
vc4_get_hang_state_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv)
{ … }
static void
vc4_save_hang_state(struct drm_device *dev)
{ … }
static void
vc4_reset(struct drm_device *dev)
{ … }
static void
vc4_reset_work(struct work_struct *work)
{ … }
static void
vc4_hangcheck_elapsed(struct timer_list *t)
{ … }
static void
submit_cl(struct drm_device *dev, uint32_t thread, uint32_t start, uint32_t end)
{ … }
int
vc4_wait_for_seqno(struct drm_device *dev, uint64_t seqno, uint64_t timeout_ns,
bool interruptible)
{ … }
static void
vc4_flush_caches(struct drm_device *dev)
{ … }
static void
vc4_flush_texture_caches(struct drm_device *dev)
{ … }
void
vc4_submit_next_bin_job(struct drm_device *dev)
{ … }
void
vc4_submit_next_render_job(struct drm_device *dev)
{ … }
void
vc4_move_job_to_render(struct drm_device *dev, struct vc4_exec_info *exec)
{ … }
static void
vc4_update_bo_seqnos(struct vc4_exec_info *exec, uint64_t seqno)
{ … }
static void
vc4_unlock_bo_reservations(struct drm_device *dev,
struct vc4_exec_info *exec,
struct ww_acquire_ctx *acquire_ctx)
{ … }
static int
vc4_lock_bo_reservations(struct drm_device *dev,
struct vc4_exec_info *exec,
struct ww_acquire_ctx *acquire_ctx)
{ … }
static int
vc4_queue_submit(struct drm_device *dev, struct vc4_exec_info *exec,
struct ww_acquire_ctx *acquire_ctx,
struct drm_syncobj *out_sync)
{ … }
static int
vc4_cl_lookup_bos(struct drm_device *dev,
struct drm_file *file_priv,
struct vc4_exec_info *exec)
{ … }
static int
vc4_get_bcl(struct drm_device *dev, struct vc4_exec_info *exec)
{ … }
static void
vc4_complete_exec(struct drm_device *dev, struct vc4_exec_info *exec)
{ … }
void
vc4_job_handle_completed(struct vc4_dev *vc4)
{ … }
static void vc4_seqno_cb_work(struct work_struct *work)
{ … }
int vc4_queue_seqno_cb(struct drm_device *dev,
struct vc4_seqno_cb *cb, uint64_t seqno,
void (*func)(struct vc4_seqno_cb *cb))
{ … }
static void
vc4_job_done_work(struct work_struct *work)
{ … }
static int
vc4_wait_for_seqno_ioctl_helper(struct drm_device *dev,
uint64_t seqno,
uint64_t *timeout_ns)
{ … }
int
vc4_wait_seqno_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv)
{ … }
int
vc4_wait_bo_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv)
{ … }
int
vc4_submit_cl_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv)
{ … }
static void vc4_gem_destroy(struct drm_device *dev, void *unused);
int vc4_gem_init(struct drm_device *dev)
{ … }
static void vc4_gem_destroy(struct drm_device *dev, void *unused)
{ … }
int vc4_gem_madvise_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv)
{ … }