Lines Matching full:v3d
22 v3d_init_core(struct v3d_dev *v3d, int core) in v3d_init_core() argument
30 if (v3d->ver < 40) in v3d_init_core()
42 v3d_init_hw_state(struct v3d_dev *v3d) in v3d_init_hw_state() argument
44 v3d_init_core(v3d, 0); in v3d_init_hw_state()
48 v3d_idle_axi(struct v3d_dev *v3d, int core) in v3d_idle_axi() argument
61 v3d_idle_gca(struct v3d_dev *v3d) in v3d_idle_gca() argument
63 if (v3d->ver >= 41) in v3d_idle_gca()
76 v3d_reset_by_bridge(struct v3d_dev *v3d) in v3d_reset_by_bridge() argument
99 v3d_reset_v3d(struct v3d_dev *v3d) in v3d_reset_v3d() argument
101 if (v3d->reset) in v3d_reset_v3d()
102 reset_control_reset(v3d->reset); in v3d_reset_v3d()
104 v3d_reset_by_bridge(v3d); in v3d_reset_v3d()
106 v3d_init_hw_state(v3d); in v3d_reset_v3d()
110 v3d_reset(struct v3d_dev *v3d) in v3d_reset() argument
112 struct drm_device *dev = &v3d->drm; in v3d_reset()
121 v3d_idle_axi(v3d, 0); in v3d_reset()
123 v3d_idle_gca(v3d); in v3d_reset()
124 v3d_reset_v3d(v3d); in v3d_reset()
126 v3d_mmu_set_page_table(v3d); in v3d_reset()
127 v3d_irq_reset(v3d); in v3d_reset()
129 v3d_perfmon_stop(v3d, v3d->active_perfmon, false); in v3d_reset()
135 v3d_flush_l3(struct v3d_dev *v3d) in v3d_flush_l3() argument
137 if (v3d->ver < 41) { in v3d_flush_l3()
143 if (v3d->ver < 33) { in v3d_flush_l3()
151 * uniforms and instructions on V3D 3.2.
154 v3d_invalidate_l2c(struct v3d_dev *v3d, int core) in v3d_invalidate_l2c() argument
156 if (v3d->ver > 32) in v3d_invalidate_l2c()
166 v3d_flush_l2t(struct v3d_dev *v3d, int core) in v3d_flush_l2t() argument
175 mutex_lock(&v3d->cache_clean_lock); in v3d_flush_l2t()
179 mutex_unlock(&v3d->cache_clean_lock); in v3d_flush_l2t()
191 v3d_clean_caches(struct v3d_dev *v3d) in v3d_clean_caches() argument
193 struct drm_device *dev = &v3d->drm; in v3d_clean_caches()
204 mutex_lock(&v3d->cache_clean_lock); in v3d_clean_caches()
214 mutex_unlock(&v3d->cache_clean_lock); in v3d_clean_caches()
221 v3d_invalidate_slices(struct v3d_dev *v3d, int core) in v3d_invalidate_slices() argument
231 v3d_invalidate_caches(struct v3d_dev *v3d) in v3d_invalidate_caches() argument
238 v3d_flush_l3(v3d); in v3d_invalidate_caches()
239 v3d_invalidate_l2c(v3d, 0); in v3d_invalidate_caches()
240 v3d_flush_l2t(v3d, 0); in v3d_invalidate_caches()
241 v3d_invalidate_slices(v3d, 0); in v3d_invalidate_caches()
249 * to v3d, so we don't attach dma-buf fences to them.
284 * @job: V3D job being set up
400 v3d_job_init(struct v3d_dev *v3d, struct drm_file *file_priv, in v3d_job_init() argument
411 DRM_ERROR("Cannot allocate memory for v3d job."); in v3d_job_init()
416 job->v3d = v3d; in v3d_job_init()
649 * v3d_submit_cl_ioctl() - Submits a job (frame) to the V3D.
664 struct v3d_dev *v3d = to_v3d_dev(dev); in v3d_submit_cl_ioctl() local
675 trace_v3d_submit_cl_ioctl(&v3d->drm, args->rcl_start, args->rcl_end); in v3d_submit_cl_ioctl()
695 ret = v3d_job_init(v3d, file_priv, (void *)&render, sizeof(*render), in v3d_submit_cl_ioctl()
705 ret = v3d_job_init(v3d, file_priv, (void *)&bin, sizeof(*bin), in v3d_submit_cl_ioctl()
719 ret = v3d_job_init(v3d, file_priv, (void *)&clean_job, sizeof(*clean_job), in v3d_submit_cl_ioctl()
748 mutex_lock(&v3d->sched_lock); in v3d_submit_cl_ioctl()
774 mutex_unlock(&v3d->sched_lock); in v3d_submit_cl_ioctl()
792 mutex_unlock(&v3d->sched_lock); in v3d_submit_cl_ioctl()
806 * v3d_submit_tfu_ioctl() - Submits a TFU (texture formatting) job to the V3D.
818 struct v3d_dev *v3d = to_v3d_dev(dev); in v3d_submit_tfu_ioctl() local
825 trace_v3d_submit_tfu_ioctl(&v3d->drm, args->iia); in v3d_submit_tfu_ioctl()
840 ret = v3d_job_init(v3d, file_priv, (void *)&job, sizeof(*job), in v3d_submit_tfu_ioctl()
877 mutex_lock(&v3d->sched_lock); in v3d_submit_tfu_ioctl()
879 mutex_unlock(&v3d->sched_lock); in v3d_submit_tfu_ioctl()
899 * v3d_submit_csd_ioctl() - Submits a CSD (texture formatting) job to the V3D.
911 struct v3d_dev *v3d = to_v3d_dev(dev); in v3d_submit_csd_ioctl() local
920 trace_v3d_submit_csd_ioctl(&v3d->drm, args->cfg[5], args->cfg[6]); in v3d_submit_csd_ioctl()
925 if (!v3d_has_csd(v3d)) { in v3d_submit_csd_ioctl()
943 ret = v3d_job_init(v3d, file_priv, (void *)&job, sizeof(*job), in v3d_submit_csd_ioctl()
948 ret = v3d_job_init(v3d, file_priv, (void *)&clean_job, sizeof(*clean_job), in v3d_submit_csd_ioctl()
973 mutex_lock(&v3d->sched_lock); in v3d_submit_csd_ioctl()
982 mutex_unlock(&v3d->sched_lock); in v3d_submit_csd_ioctl()
997 mutex_unlock(&v3d->sched_lock); in v3d_submit_csd_ioctl()
1012 struct v3d_dev *v3d = to_v3d_dev(dev); in v3d_gem_init() local
1017 v3d->queue[i].fence_context = dma_fence_context_alloc(1); in v3d_gem_init()
1019 spin_lock_init(&v3d->mm_lock); in v3d_gem_init()
1020 spin_lock_init(&v3d->job_lock); in v3d_gem_init()
1021 ret = drmm_mutex_init(dev, &v3d->bo_lock); in v3d_gem_init()
1024 ret = drmm_mutex_init(dev, &v3d->reset_lock); in v3d_gem_init()
1027 ret = drmm_mutex_init(dev, &v3d->sched_lock); in v3d_gem_init()
1030 ret = drmm_mutex_init(dev, &v3d->cache_clean_lock); in v3d_gem_init()
1038 drm_mm_init(&v3d->mm, 1, pt_size / sizeof(u32) - 1); in v3d_gem_init()
1040 v3d->pt = dma_alloc_wc(v3d->drm.dev, pt_size, in v3d_gem_init()
1041 &v3d->pt_paddr, in v3d_gem_init()
1043 if (!v3d->pt) { in v3d_gem_init()
1044 drm_mm_takedown(&v3d->mm); in v3d_gem_init()
1045 dev_err(v3d->drm.dev, in v3d_gem_init()
1050 v3d_init_hw_state(v3d); in v3d_gem_init()
1051 v3d_mmu_set_page_table(v3d); in v3d_gem_init()
1053 ret = v3d_sched_init(v3d); in v3d_gem_init()
1055 drm_mm_takedown(&v3d->mm); in v3d_gem_init()
1056 dma_free_coherent(v3d->drm.dev, 4096 * 1024, (void *)v3d->pt, in v3d_gem_init()
1057 v3d->pt_paddr); in v3d_gem_init()
1066 struct v3d_dev *v3d = to_v3d_dev(dev); in v3d_gem_destroy() local
1068 v3d_sched_fini(v3d); in v3d_gem_destroy()
1071 * unregistering V3D. in v3d_gem_destroy()
1073 WARN_ON(v3d->bin_job); in v3d_gem_destroy()
1074 WARN_ON(v3d->render_job); in v3d_gem_destroy()
1076 drm_mm_takedown(&v3d->mm); in v3d_gem_destroy()
1078 dma_free_coherent(v3d->drm.dev, 4096 * 1024, (void *)v3d->pt, in v3d_gem_destroy()
1079 v3d->pt_paddr); in v3d_gem_destroy()