#include <linux/delay.h>
#include <linux/mutex.h>
#include <linux/spinlock_types.h>
#include <linux/workqueue.h>
#include <drm/drm_encoder.h>
#include <drm/drm_gem.h>
#include <drm/drm_gem_shmem_helper.h>
#include <drm/gpu_scheduler.h>
#include "v3d_performance_counters.h"
#include "uapi/drm/v3d_drm.h"
struct clk;
struct platform_device;
struct reset_control;
#define GMP_GRANULARITY …
#define V3D_MMU_PAGE_SHIFT …
#define V3D_MAX_QUEUES …
static inline char *v3d_queue_to_string(enum v3d_queue queue)
{ … }
struct v3d_stats { … };
struct v3d_queue_state { … };
struct v3d_perfmon { … };
struct v3d_dev { … };
static inline struct v3d_dev *
to_v3d_dev(struct drm_device *dev)
{ … }
static inline bool
v3d_has_csd(struct v3d_dev *v3d)
{ … }
#define v3d_to_pdev(v3d) …
struct v3d_file_priv { … };
struct v3d_bo { … };
static inline struct v3d_bo *
to_v3d_bo(struct drm_gem_object *bo)
{ … }
struct v3d_fence { … };
static inline struct v3d_fence *
to_v3d_fence(struct dma_fence *fence)
{ … }
#define V3D_READ(offset) …
#define V3D_WRITE(offset, val) …
#define V3D_BRIDGE_READ(offset) …
#define V3D_BRIDGE_WRITE(offset, val) …
#define V3D_GCA_READ(offset) …
#define V3D_GCA_WRITE(offset, val) …
#define V3D_CORE_READ(core, offset) …
#define V3D_CORE_WRITE(core, offset, val) …
struct v3d_job { … };
struct v3d_bin_job { … };
struct v3d_render_job { … };
struct v3d_tfu_job { … };
struct v3d_csd_job { … };
enum v3d_cpu_job_type { … };
struct v3d_timestamp_query { … };
#define V3D_MAX_PERFMONS …
struct v3d_performance_query { … };
struct v3d_indirect_csd_info { … };
struct v3d_timestamp_query_info { … };
struct v3d_performance_query_info { … };
struct v3d_copy_query_results_info { … };
struct v3d_cpu_job { … };
v3d_cpu_job_fn;
struct v3d_submit_outsync { … };
struct v3d_submit_ext { … };
#define __wait_for(OP, COND, US, Wmin, Wmax) …
#define _wait_for(COND, US, Wmin, Wmax) …
#define wait_for(COND, MS) …
static inline unsigned long nsecs_to_jiffies_timeout(const u64 n)
{ … }
struct drm_gem_object *v3d_create_object(struct drm_device *dev, size_t size);
void v3d_free_object(struct drm_gem_object *gem_obj);
struct v3d_bo *v3d_bo_create(struct drm_device *dev, struct drm_file *file_priv,
size_t size);
void v3d_get_bo_vaddr(struct v3d_bo *bo);
void v3d_put_bo_vaddr(struct v3d_bo *bo);
int v3d_create_bo_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv);
int v3d_mmap_bo_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv);
int v3d_get_bo_offset_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv);
int v3d_wait_bo_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv);
struct drm_gem_object *v3d_prime_import_sg_table(struct drm_device *dev,
struct dma_buf_attachment *attach,
struct sg_table *sgt);
void v3d_debugfs_init(struct drm_minor *minor);
void v3d_get_stats(const struct v3d_stats *stats, u64 timestamp,
u64 *active_runtime, u64 *jobs_completed);
extern const struct dma_fence_ops v3d_fence_ops;
struct dma_fence *v3d_fence_create(struct v3d_dev *v3d, enum v3d_queue queue);
int v3d_gem_init(struct drm_device *dev);
void v3d_gem_destroy(struct drm_device *dev);
void v3d_reset(struct v3d_dev *v3d);
void v3d_invalidate_caches(struct v3d_dev *v3d);
void v3d_clean_caches(struct v3d_dev *v3d);
void v3d_job_cleanup(struct v3d_job *job);
void v3d_job_put(struct v3d_job *job);
int v3d_submit_cl_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv);
int v3d_submit_tfu_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv);
int v3d_submit_csd_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv);
int v3d_submit_cpu_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv);
int v3d_irq_init(struct v3d_dev *v3d);
void v3d_irq_enable(struct v3d_dev *v3d);
void v3d_irq_disable(struct v3d_dev *v3d);
void v3d_irq_reset(struct v3d_dev *v3d);
int v3d_mmu_set_page_table(struct v3d_dev *v3d);
void v3d_mmu_insert_ptes(struct v3d_bo *bo);
void v3d_mmu_remove_ptes(struct v3d_bo *bo);
void v3d_timestamp_query_info_free(struct v3d_timestamp_query_info *query_info,
unsigned int count);
void v3d_performance_query_info_free(struct v3d_performance_query_info *query_info,
unsigned int count);
void v3d_job_update_stats(struct v3d_job *job, enum v3d_queue queue);
int v3d_sched_init(struct v3d_dev *v3d);
void v3d_sched_fini(struct v3d_dev *v3d);
void v3d_perfmon_get(struct v3d_perfmon *perfmon);
void v3d_perfmon_put(struct v3d_perfmon *perfmon);
void v3d_perfmon_start(struct v3d_dev *v3d, struct v3d_perfmon *perfmon);
void v3d_perfmon_stop(struct v3d_dev *v3d, struct v3d_perfmon *perfmon,
bool capture);
struct v3d_perfmon *v3d_perfmon_find(struct v3d_file_priv *v3d_priv, int id);
void v3d_perfmon_open_file(struct v3d_file_priv *v3d_priv);
void v3d_perfmon_close_file(struct v3d_file_priv *v3d_priv);
int v3d_perfmon_create_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv);
int v3d_perfmon_destroy_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv);
int v3d_perfmon_get_values_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv);
int v3d_perfmon_get_counter_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv);
int v3d_sysfs_init(struct device *dev);
void v3d_sysfs_destroy(struct device *dev);