/linux/drivers/gpu/drm/v3d/ |
H A D | v3d_gem.c | 20 v3d_init_core(struct v3d_dev *v3d, int core) in v3d_init_core() argument 28 if (v3d->ver < V3D_GEN_41) in v3d_init_core() 40 v3d_init_hw_state(struct v3d_dev *v3d) in v3d_init_hw_state() argument 42 v3d_init_core(v3d, 0); in v3d_init_hw_state() 46 v3d_idle_axi(struct v3d_dev *v3d, int core) in v3d_idle_axi() argument 48 V3D_CORE_WRITE(core, V3D_GMP_CFG(v3d->ver), V3D_GMP_CFG_STOP_REQ); in v3d_idle_axi() 50 if (wait_for((V3D_CORE_READ(core, V3D_GMP_STATUS(v3d->ver)) & in v3d_idle_axi() 59 v3d_idle_gca(struct v3d_dev *v3d) in v3d_idle_gca() argument 61 if (v3d->ver >= V3D_GEN_41) in v3d_idle_gca() 74 v3d_reset_by_bridge(struct v3d_dev *v3d) in v3d_reset_by_bridge() argument [all …]
|
H A D | v3d_irq.c | 5 * DOC: Interrupt management for the V3D engine 41 struct v3d_dev *v3d = in v3d_overflow_mem_work() local 43 struct drm_device *dev = &v3d->drm; in v3d_overflow_mem_work() 63 spin_lock_irqsave(&v3d->job_lock, irqflags); in v3d_overflow_mem_work() 64 if (!v3d->bin_job) { in v3d_overflow_mem_work() 65 spin_unlock_irqrestore(&v3d->job_lock, irqflags); in v3d_overflow_mem_work() 70 list_add_tail(&bo->unref_head, &v3d->bin_job->render->unref_list); in v3d_overflow_mem_work() 71 spin_unlock_irqrestore(&v3d->job_lock, irqflags); in v3d_overflow_mem_work() 73 v3d_mmu_flush_all(v3d); in v3d_overflow_mem_work() 85 struct v3d_dev *v3d = arg; in v3d_irq() local [all …]
|
H A D | v3d_sched.c | 5 * DOC: Broadcom V3D scheduling 121 v3d_switch_perfmon(struct v3d_dev *v3d, struct v3d_job *job) in v3d_switch_perfmon() argument 123 struct v3d_perfmon *perfmon = v3d->global_perfmon; in v3d_switch_perfmon() 128 if (perfmon == v3d->active_perfmon) in v3d_switch_perfmon() 131 if (perfmon != v3d->active_perfmon) in v3d_switch_perfmon() 132 v3d_perfmon_stop(v3d, v3d->active_perfmon, true); in v3d_switch_perfmon() 134 if (perfmon && v3d->active_perfmon != perfmon) in v3d_switch_perfmon() 135 v3d_perfmon_start(v3d, perfmon); in v3d_switch_perfmon() 141 struct v3d_dev *v3d = job->v3d; in v3d_job_start_stats() local 143 struct v3d_stats *global_stats = &v3d->queue[queue].stats; in v3d_job_start_stats() [all …]
|
H A D | v3d_mmu.c | 5 * DOC: Broadcom V3D MMU 7 * The V3D 3.x hardware (compared to VC4) now includes an MMU. It has 8 * a single level of page tables for the V3D's 4GB address space to 38 int v3d_mmu_flush_all(struct v3d_dev *v3d) in v3d_mmu_flush_all() argument 48 dev_err(v3d->drm.dev, "MMUC flush wait idle failed\n"); in v3d_mmu_flush_all() 58 dev_err(v3d->drm.dev, "MMU TLB clear wait idle failed\n"); in v3d_mmu_flush_all() 63 int v3d_mmu_set_page_table(struct v3d_dev *v3d) in v3d_mmu_set_page_table() argument 65 V3D_WRITE(V3D_MMU_PT_PA_BASE, v3d->pt_paddr >> V3D_MMU_PAGE_SHIFT); in v3d_mmu_set_page_table() 76 (v3d->mmu_scratch_paddr >> V3D_MMU_PAGE_SHIFT) | in v3d_mmu_set_page_table() 80 return v3d_mmu_flush_all(v3d); in v3d_mmu_set_page_table() [all …]
|
H A D | v3d_drv.h | 113 /* Short representation (e.g. 33, 41) of the V3D tech version */ 116 /* Short representation (e.g. 5, 6) of the V3D tech revision */ 143 /* virtual address bits from V3D to the MMU. */ 146 /* Number of V3D cores. */ 216 v3d_has_csd(struct v3d_dev *v3d) in v3d_has_csd() argument 218 return v3d->ver >= V3D_GEN_41; in v3d_has_csd() 221 #define v3d_to_pdev(v3d) to_platform_device((v3d)->drm.dev) argument 225 struct v3d_dev *v3d; member 260 /* v3d seqno for signaled() test */ 271 #define V3D_READ(offset) readl(v3d->hub_regs + offset) [all …]
|
H A D | v3d_bo.c | 5 * DOC: V3D GEM BO management support 7 * Compared to VC4 (V3D 2.x), V3D 3.3 introduces an MMU between the 11 * Physically contiguous objects may still be imported to V3D, but the 15 * driver) for an example of how to integrate with V3D. 41 struct v3d_dev *v3d = to_v3d_dev(obj->dev); in v3d_free_object() local 49 mutex_lock(&v3d->bo_lock); in v3d_free_object() 50 v3d->bo_stats.num_allocated--; in v3d_free_object() 51 v3d->bo_stats.pages_allocated -= obj->size >> V3D_MMU_PAGE_SHIFT; in v3d_free_object() 52 mutex_unlock(&v3d->bo_lock); in v3d_free_object() 54 spin_lock(&v3d->mm_lock); in v3d_free_object() [all …]
|
H A D | v3d_fence.c | 6 struct dma_fence *v3d_fence_create(struct v3d_dev *v3d, enum v3d_queue queue) in v3d_fence_create() argument 14 fence->dev = &v3d->drm; in v3d_fence_create() 16 fence->seqno = ++v3d->queue[queue].emit_seqno; in v3d_fence_create() 17 dma_fence_init(&fence->base, &v3d_fence_ops, &v3d->job_lock, in v3d_fence_create() 18 v3d->queue[queue].fence_context, fence->seqno); in v3d_fence_create() 25 return "v3d"; in v3d_fence_get_driver_name() 34 return "v3d-bin"; in v3d_fence_get_timeline_name() 36 return "v3d-render"; in v3d_fence_get_timeline_name() 38 return "v3d-tfu"; in v3d_fence_get_timeline_name() 40 return "v3d-csd"; in v3d_fence_get_timeline_name()
|
H A D | v3d_submit.c | 19 * to v3d, so we don't attach dma-buf fences to them. 54 * @job: V3D job being set up 144 DRM_ERROR("Cannot allocate memory for V3D job.\n"); in v3d_job_allocate() 159 v3d_job_init(struct v3d_dev *v3d, struct drm_file *file_priv, in v3d_job_init() argument 167 job->v3d = v3d; in v3d_job_init() 269 struct v3d_dev *v3d, in v3d_setup_csd_jobs_and_bos() argument 282 ret = v3d_job_init(v3d, file_priv, &(*job)->base, in v3d_setup_csd_jobs_and_bos() 293 ret = v3d_job_init(v3d, file_priv, *clean_job, in v3d_setup_csd_jobs_and_bos() 302 ret = v3d_lookup_bos(&v3d->drm, file_priv, *clean_job, in v3d_setup_csd_jobs_and_bos() 413 struct v3d_dev *v3d = v3d_priv->v3d; in v3d_get_cpu_indirect_csd_params() local [all …]
|
H A D | Kconfig | 3 tristate "Broadcom V3D 3.x and newer" 12 V3D 3.x or newer GPUs. SoCs supported include the BCM2711,
|
H A D | v3d_sysfs.c | 15 struct v3d_dev *v3d = to_v3d_dev(drm); in gpu_stats_show() local 23 struct v3d_stats *stats = &v3d->queue[queue].stats; in gpu_stats_show()
|
H A D | v3d_performance_counters.h | 24 /* Different revisions of V3D have different total number of
|
/linux/drivers/gpu/drm/vc4/ |
H A D | vc4_v3d.c | 135 int ret = pm_runtime_get_sync(&vc4->v3d->pdev->dev); in vc4_v3d_pm_get() 156 pm_runtime_mark_last_busy(&vc4->v3d->pdev->dev); in vc4_v3d_pm_put() 157 pm_runtime_put_autosuspend(&vc4->v3d->pdev->dev); in vc4_v3d_pm_put() 225 * To work around this, we allocate a single large buffer while V3D is 239 struct vc4_v3d *v3d = vc4->v3d; in bin_bo_alloc() local 244 if (!v3d) in bin_bo_alloc() 262 dev_err(&v3d->pdev->dev, in bin_bo_alloc() 374 struct vc4_v3d *v3d = dev_get_drvdata(dev); in vc4_v3d_runtime_suspend() local 375 struct vc4_dev *vc4 = v3d->vc4; in vc4_v3d_runtime_suspend() 379 clk_disable_unprepare(v3d->clk); in vc4_v3d_runtime_suspend() [all …]
|
H A D | vc4_perfmon.c | 7 * DOC: VC4 V3D performance monitor module 9 * The V3D block provides 16 hardware counters which can count various events. 157 if (!vc4->v3d) { in vc4_perfmon_create_ioctl() 158 DRM_DEBUG("Creating perfmon no VC4 V3D probed\n"); in vc4_perfmon_create_ioctl() 211 if (!vc4->v3d) { in vc4_perfmon_destroy_ioctl() 212 DRM_DEBUG("Destroying perfmon no VC4 V3D probed\n"); in vc4_perfmon_destroy_ioctl() 239 if (!vc4->v3d) { in vc4_perfmon_get_values_ioctl() 240 DRM_DEBUG("Getting perfmon no VC4 V3D probed\n"); in vc4_perfmon_get_values_ioctl()
|
H A D | vc4_drv.c | 11 * OpenGL ES 2.0-compatible 3D engine called V3D, and a highly 105 if (!vc4->v3d) in vc4_get_param_ioctl() 281 { .compatible = "brcm,bcm2835-v3d" }, 282 { .compatible = "brcm,cygnus-v3d" }, 283 { .compatible = "brcm,vc4-v3d" },
|
H A D | vc4_irq.c | 25 * DOC: Interrupt management for the V3D engine 249 if (!vc4->v3d) in vc4_irq_prepare() 269 if (!vc4->v3d) in vc4_irq_enable() 286 if (!vc4->v3d) in vc4_irq_disable()
|
H A D | vc4_gem.c | 83 if (!vc4->v3d) { in vc4_get_hang_state_ioctl() 84 DRM_DEBUG("VC4_GET_HANG_STATE with no VC4 V3D probed\n"); in vc4_get_hang_state_ioctl() 301 pm_runtime_put_sync_suspend(&vc4->v3d->pdev->dev); in vc4_reset() 302 pm_runtime_get_sync(&vc4->v3d->pdev->dev); in vc4_reset() 670 * @exec: V3D job being set up 1027 if (!vc4->v3d) { in vc4_submit_cl_ioctl() 1028 DRM_DEBUG("VC4_SUBMIT_CL with no VC4 V3D probed\n"); in vc4_submit_cl_ioctl() 1195 * unregistering V3D. in vc4_gem_destroy() 1199 /* V3D should already have disabled its interrupt and cleared in vc4_gem_destroy()
|
H A D | vc4_debugfs.c | 29 if (vc4->v3d) { in vc4_debugfs_init()
|
H A D | vc4_fence.c | 33 return "vc4-v3d"; in vc4_fence_get_timeline_name()
|
/linux/Documentation/gpu/ |
H A D | v3d.rst | 2 drm/v3d Broadcom V3D Graphics Driver 5 .. kernel-doc:: drivers/gpu/drm/v3d/v3d_drv.c 6 :doc: Broadcom V3D Graphics Driver 11 .. kernel-doc:: drivers/gpu/drm/v3d/v3d_bo.c 12 :doc: V3D GEM BO management support 16 .. kernel-doc:: drivers/gpu/drm/v3d/v3d_mmu.c 17 :doc: Broadcom V3D MMU 21 .. kernel-doc:: drivers/gpu/drm/v3d/v3d_sched.c 22 :doc: Broadcom V3D scheduling 27 .. kernel-doc:: drivers/gpu/drm/v3d/v3d_irq.c [all …]
|
H A D | vc4.rst | 87 V3D binner command list (BCL) validation 93 V3D render command list (RCL) generation 104 V3D Interrupts 108 :doc: Interrupt management for the V3D engine
|
/linux/Documentation/devicetree/bindings/display/ |
H A D | brcm,bcm2835-v3d.yaml | 4 $id: http://devicetree.org/schemas/display/brcm,bcm2835-v3d.yaml# 7 title: Broadcom VC4 (VideoCore4) V3D GPU 15 - brcm,bcm2835-v3d 16 - brcm,cygnus-v3d 39 v3d: v3d@7ec00000 { 40 compatible = "brcm,bcm2835-v3d";
|
/linux/arch/arm/boot/dts/broadcom/ |
H A D | bcm2835-common.dtsi | 70 clock-names = "v3d", "peri_image", "h264", "isp"; 138 v3d: v3d@7ec00000 { label 139 compatible = "brcm,bcm2835-v3d";
|
H A D | bcm2835-rpi-common.dtsi | 16 &v3d {
|
/linux/include/uapi/drm/ |
H A D | v3d_drm.h | 103 /* Enum for each of the V3D queues. */ 196 * This is optional on V3D 3.3 (where the CL can set the value) but 197 * required on V3D 4.1. 241 * struct drm_v3d_create_bo - ioctl argument for creating V3D BOs. 252 * Returned offset for the BO in the V3D address space. This offset 263 * struct drm_v3d_mmap_bo - ioctl argument for mapping V3D BOs. 306 * Returns the offset for the BO in the V3D address space for this DRM fd. 611 * must no longer be used. These counters are only valid for V3D 4.2.
|
/linux/Documentation/devicetree/bindings/soc/bcm/ |
H A D | brcm,bcm2835-pm.yaml | 50 - const: v3d 84 clock-names = "v3d", "peri_image", "h264", "isp";
|