Home
last modified time | relevance | path

Searched full:vc4 (Results 1 – 25 of 57) sorted by relevance

123

/Linux-v5.10/drivers/gpu/drm/vc4/
Dvc4_bo.c7 * DOC: VC4 GEM BO management support
9 * The VC4 GPU architecture (both scanout and rendering) has direct
40 static void vc4_bo_stats_print(struct drm_printer *p, struct vc4_dev *vc4) in vc4_bo_stats_print() argument
44 for (i = 0; i < vc4->num_labels; i++) { in vc4_bo_stats_print()
45 if (!vc4->bo_labels[i].num_allocated) in vc4_bo_stats_print()
49 vc4->bo_labels[i].name, in vc4_bo_stats_print()
50 vc4->bo_labels[i].size_allocated / 1024, in vc4_bo_stats_print()
51 vc4->bo_labels[i].num_allocated); in vc4_bo_stats_print()
54 mutex_lock(&vc4->purgeable.lock); in vc4_bo_stats_print()
55 if (vc4->purgeable.num) in vc4_bo_stats_print()
[all …]
Dvc4_irq.c60 struct vc4_dev *vc4 = in vc4_overflow_mem_work() local
67 mutex_lock(&vc4->bin_bo_lock); in vc4_overflow_mem_work()
69 if (!vc4->bin_bo) in vc4_overflow_mem_work()
72 bo = vc4->bin_bo; in vc4_overflow_mem_work()
74 bin_bo_slot = vc4_v3d_get_bin_slot(vc4); in vc4_overflow_mem_work()
80 spin_lock_irqsave(&vc4->job_lock, irqflags); in vc4_overflow_mem_work()
82 if (vc4->bin_alloc_overflow) { in vc4_overflow_mem_work()
89 exec = vc4_first_bin_job(vc4); in vc4_overflow_mem_work()
91 exec = vc4_last_render_job(vc4); in vc4_overflow_mem_work()
93 exec->bin_slots |= vc4->bin_alloc_overflow; in vc4_overflow_mem_work()
[all …]
Dvc4_v3d.c103 struct vc4_dev *vc4 = to_vc4_dev(dev); in vc4_v3d_debugfs_ident() local
104 int ret = vc4_v3d_pm_get(vc4); in vc4_v3d_debugfs_ident()
119 vc4_v3d_pm_put(vc4); in vc4_v3d_debugfs_ident()
130 vc4_v3d_pm_get(struct vc4_dev *vc4) in vc4_v3d_pm_get() argument
132 mutex_lock(&vc4->power_lock); in vc4_v3d_pm_get()
133 if (vc4->power_refcount++ == 0) { in vc4_v3d_pm_get()
134 int ret = pm_runtime_get_sync(&vc4->v3d->pdev->dev); in vc4_v3d_pm_get()
137 vc4->power_refcount--; in vc4_v3d_pm_get()
138 mutex_unlock(&vc4->power_lock); in vc4_v3d_pm_get()
142 mutex_unlock(&vc4->power_lock); in vc4_v3d_pm_get()
[all …]
Dvc4_gem.c42 struct vc4_dev *vc4 = to_vc4_dev(dev); in vc4_queue_hangcheck() local
44 mod_timer(&vc4->hangcheck.timer, in vc4_queue_hangcheck()
74 struct vc4_dev *vc4 = to_vc4_dev(dev); in vc4_get_hang_state_ioctl() local
79 if (!vc4->v3d) { in vc4_get_hang_state_ioctl()
80 DRM_DEBUG("VC4_GET_HANG_STATE with no VC4 V3D probed\n"); in vc4_get_hang_state_ioctl()
84 spin_lock_irqsave(&vc4->job_lock, irqflags); in vc4_get_hang_state_ioctl()
85 kernel_state = vc4->hang_state; in vc4_get_hang_state_ioctl()
87 spin_unlock_irqrestore(&vc4->job_lock, irqflags); in vc4_get_hang_state_ioctl()
97 spin_unlock_irqrestore(&vc4->job_lock, irqflags); in vc4_get_hang_state_ioctl()
101 vc4->hang_state = NULL; in vc4_get_hang_state_ioctl()
[all …]
Dvc4_kms.c7 * DOC: VC4 KMS
67 struct vc4_dev *vc4 = to_vc4_dev(dev); in vc4_get_ctm_state() local
71 ret = drm_modeset_lock(&vc4->ctm_state_lock, state->acquire_ctx); in vc4_get_ctm_state()
111 struct vc4_dev *vc4 = to_vc4_dev(dev); in vc4_ctm_obj_fini() local
113 drm_atomic_private_obj_fini(&vc4->ctm_manager); in vc4_ctm_obj_fini()
116 static int vc4_ctm_obj_init(struct vc4_dev *vc4) in vc4_ctm_obj_init() argument
120 drm_modeset_lock_init(&vc4->ctm_state_lock); in vc4_ctm_obj_init()
126 drm_atomic_private_obj_init(&vc4->base, &vc4->ctm_manager, &ctm_state->base, in vc4_ctm_obj_init()
129 return drmm_add_action_or_reset(&vc4->base, vc4_ctm_obj_fini, NULL); in vc4_ctm_obj_init()
152 vc4_ctm_commit(struct vc4_dev *vc4, struct drm_atomic_state *state) in vc4_ctm_commit() argument
[all …]
Dvc4_drv.c8 * DOC: Broadcom VC4 Graphics Driver
44 #define DRIVER_NAME "vc4"
45 #define DRIVER_DESC "Broadcom VC4 graphics"
70 struct vc4_dev *vc4 = to_vc4_dev(dev); in vc4_get_param_ioctl() local
77 if (!vc4->v3d) in vc4_get_param_ioctl()
82 ret = vc4_v3d_pm_get(vc4); in vc4_get_param_ioctl()
86 vc4_v3d_pm_put(vc4); in vc4_get_param_ioctl()
89 ret = vc4_v3d_pm_get(vc4); in vc4_get_param_ioctl()
93 vc4_v3d_pm_put(vc4); in vc4_get_param_ioctl()
96 ret = vc4_v3d_pm_get(vc4); in vc4_get_param_ioctl()
[all …]
Dvc4_perfmon.c7 * DOC: VC4 V3D performance monitor module
30 void vc4_perfmon_start(struct vc4_dev *vc4, struct vc4_perfmon *perfmon) in vc4_perfmon_start() argument
35 if (WARN_ON_ONCE(!perfmon || vc4->active_perfmon)) in vc4_perfmon_start()
44 vc4->active_perfmon = perfmon; in vc4_perfmon_start()
47 void vc4_perfmon_stop(struct vc4_dev *vc4, struct vc4_perfmon *perfmon, in vc4_perfmon_stop() argument
52 if (WARN_ON_ONCE(!vc4->active_perfmon || in vc4_perfmon_stop()
53 perfmon != vc4->active_perfmon)) in vc4_perfmon_stop()
62 vc4->active_perfmon = NULL; in vc4_perfmon_stop()
103 struct vc4_dev *vc4 = to_vc4_dev(dev); in vc4_perfmon_create_ioctl() local
110 if (!vc4->v3d) { in vc4_perfmon_create_ioctl()
[all …]
Dvc4_hvs.c7 * DOC: VC4 HVS module.
69 struct vc4_dev *vc4 = to_vc4_dev(dev); in vc4_hvs_dump_state() local
70 struct drm_printer p = drm_info_printer(&vc4->hvs->pdev->dev); in vc4_hvs_dump_state()
73 drm_print_regset32(&p, &vc4->hvs->regset); in vc4_hvs_dump_state()
79 readl((u32 __iomem *)vc4->hvs->dlist + i + 0), in vc4_hvs_dump_state()
80 readl((u32 __iomem *)vc4->hvs->dlist + i + 1), in vc4_hvs_dump_state()
81 readl((u32 __iomem *)vc4->hvs->dlist + i + 2), in vc4_hvs_dump_state()
82 readl((u32 __iomem *)vc4->hvs->dlist + i + 3)); in vc4_hvs_dump_state()
90 struct vc4_dev *vc4 = to_vc4_dev(dev); in vc4_hvs_debugfs_underrun() local
93 drm_printf(&p, "%d\n", atomic_read(&vc4->underrun)); in vc4_hvs_debugfs_underrun()
[all …]
Dvc4_debugfs.c26 struct vc4_dev *vc4 = to_vc4_dev(minor->dev); in vc4_debugfs_init() local
30 minor->debugfs_root, &vc4->load_tracker_enabled); in vc4_debugfs_init()
32 list_for_each_entry(entry, &vc4->debugfs_list, link) { in vc4_debugfs_init()
50 * Registers a debugfs file with a callback function for a vc4 component.
53 * called a given DRM minor, while the various VC4 components want to
63 struct vc4_dev *vc4 = to_vc4_dev(dev); in vc4_debugfs_add_file() local
75 list_add(&entry->link, &vc4->debugfs_list); in vc4_debugfs_add_file()
Dvc4_drv.h262 /* Time in jiffies when the BO was put in vc4->bo_cache. */
298 /* vc4 seqno for signaled() test */
315 struct vc4_dev *vc4; member
548 #define V3D_READ(offset) readl(vc4->v3d->regs + offset)
549 #define V3D_WRITE(offset, val) writel(val, vc4->v3d->regs + offset)
550 #define HVS_READ(offset) readl(vc4->hvs->regs + offset)
551 #define HVS_WRITE(offset, val) writel(val, vc4->hvs->regs + offset)
585 /* Pointers for our position in vc4->job_list */
686 vc4_first_bin_job(struct vc4_dev *vc4) in vc4_first_bin_job() argument
688 return list_first_entry_or_null(&vc4->bin_job_list, in vc4_first_bin_job()
[all …]
DKconfig3 tristate "Broadcom VC4 Graphics"
18 VC4 GPU, such as the Raspberry Pi or other BCM2708/BCM2835.
25 bool "Broadcom VC4 HDMI CEC Support"
29 Choose this option if you have a Broadcom VC4 GPU
Dvc4_fence.c28 return "vc4"; in vc4_fence_get_driver_name()
33 return "vc4-v3d"; in vc4_fence_get_timeline_name()
39 struct vc4_dev *vc4 = to_vc4_dev(f->dev); in vc4_fence_signaled() local
41 return vc4->finished_seqno >= f->seqno; in vc4_fence_signaled()
DMakefile5 vc4-y := \
28 vc4-$(CONFIG_DEBUG_FS) += vc4_debugfs.o
30 obj-$(CONFIG_DRM_VC4) += vc4.o
Dvc4_crtc.c7 * DOC: VC4 CRTC module
9 * In VC4, the Pixel Valve is what most closely corresponds to the
69 vc4_crtc_get_cob_allocation(struct vc4_dev *vc4, unsigned int channel) in vc4_crtc_get_cob_allocation() argument
89 struct vc4_dev *vc4 = to_vc4_dev(dev); in vc4_crtc_get_scanout_position() local
128 cob_size = vc4_crtc_get_cob_allocation(vc4, vc4_crtc_state->assigned_channel); in vc4_crtc_get_scanout_position()
261 * VC4 can only scan out to one encoder at a time, while the DRM core
294 struct vc4_dev *vc4 = to_vc4_dev(dev); in vc4_crtc_config_pv() local
375 if (vc4->hvs->hvs5) in vc4_crtc_config_pv()
400 struct vc4_dev *vc4 = to_vc4_dev(dev); in require_hvs_enabled() local
628 struct vc4_dev *vc4 = to_vc4_dev(dev); in vc4_crtc_handle_page_flip() local
[all …]
Dvc4_dpi.c7 * DOC: VC4 DPI module
9 * The VC4 DPI hardware supports MIPI DPI type 4 and Nokia ViSSI
101 /* VC4 DPI encoder KMS struct */
259 struct vc4_dev *vc4 = to_vc4_dev(drm); in vc4_dpi_bind() local
318 vc4->dpi = dpi; in vc4_dpi_bind()
334 struct vc4_dev *vc4 = to_vc4_dev(drm); in vc4_dpi_unbind() local
343 vc4->dpi = NULL; in vc4_dpi_unbind()
Dvc4_trace.h14 #define TRACE_SYSTEM vc4
59 #define TRACE_INCLUDE_PATH ../../drivers/gpu/drm/vc4
Dvc4_vec.c7 * DOC: VC4 SDTV module
176 /* VC4 VEC encoder KMS struct */
188 /* VC4 VEC connector KMS struct */
526 struct vc4_dev *vc4 = to_vc4_dev(drm); in vc4_vec_bind() local
577 vc4->vec = vec; in vc4_vec_bind()
594 struct vc4_dev *vc4 = to_vc4_dev(drm); in vc4_vec_unbind() local
601 vc4->vec = NULL; in vc4_vec_unbind()
Dvc4_plane.c7 * DOC: VC4 plane module
193 struct vc4_dev *vc4 = to_vc4_dev(plane->dev); in vc4_plane_destroy_state() local
199 spin_lock_irqsave(&vc4->hvs->mm_lock, irqflags); in vc4_plane_destroy_state()
201 spin_unlock_irqrestore(&vc4->hvs->mm_lock, irqflags); in vc4_plane_destroy_state()
519 struct vc4_dev *vc4; in vc4_plane_calc_load() local
521 vc4 = to_vc4_dev(state->plane->dev); in vc4_plane_calc_load()
522 if (!vc4->load_tracker_available) in vc4_plane_calc_load()
574 struct vc4_dev *vc4 = to_vc4_dev(state->plane->dev); in vc4_plane_allocate_lbm() local
592 spin_lock_irqsave(&vc4->hvs->mm_lock, irqflags); in vc4_plane_allocate_lbm()
593 ret = drm_mm_insert_node_generic(&vc4->hvs->lbm_mm, in vc4_plane_allocate_lbm()
[all …]
Dvc4_hdmi.c10 * DOC: VC4 Falcon HDMI module
614 * As stated in RPi's vc4 firmware "HDMI state machine (HSM) clock must in vc4_hdmi_encoder_pre_crtc_configure()
617 * operation." This conflicts with bcm2835's vc4 documentation, which in vc4_hdmi_encoder_pre_crtc_configure()
620 * Real life tests reveal that vc4's firmware statement holds up, and in vc4_hdmi_encoder_pre_crtc_configure()
1123 .name = "vc4-hdmi-codec-dai-component",
1145 .name = "vc4-hdmi-hifi",
1159 .name = "vc4-hdmi-cpu-dai-component",
1172 .name = "vc4-hdmi-cpu-dai",
1452 vc4_hdmi, "vc4", in vc4_hdmi_cec_init()
1476 "vc4 hdmi cec", vc4_hdmi); in vc4_hdmi_cec_init()
[all …]
Dvc4_txp.c462 struct vc4_dev *vc4 = to_vc4_dev(drm); in vc4_txp_bind() local
514 vc4->txp = txp; in vc4_txp_bind()
525 struct vc4_dev *vc4 = to_vc4_dev(drm); in vc4_txp_unbind() local
530 vc4->txp = NULL; in vc4_txp_unbind()
Dvc4_validate.c25 * DOC: Command list validator for VC4.
27 * Since the VC4 has no IOMMU between it and system memory, a user
352 struct vc4_dev *vc4 = to_vc4_dev(dev); in validate_tile_binning_config() local
382 bin_slot = vc4_v3d_get_bin_slot(vc4); in validate_tile_binning_config()
395 bin_addr = vc4->bin_bo->base.paddr + bin_slot * vc4->bin_alloc_size; in validate_tile_binning_config()
417 *(uint32_t *)(validated + 4) = (bin_addr + vc4->bin_alloc_size - in validate_tile_binning_config()
/Linux-v5.10/Documentation/gpu/
Dvc4.rst2 drm/vc4 Broadcom VC4 Graphics Driver
5 .. kernel-doc:: drivers/gpu/drm/vc4/vc4_drv.c
6 :doc: Broadcom VC4 Graphics Driver
18 .. kernel-doc:: drivers/gpu/drm/vc4/vc4_crtc.c
19 :doc: VC4 CRTC module
24 .. kernel-doc:: drivers/gpu/drm/vc4/vc4_hvs.c
25 :doc: VC4 HVS module.
30 .. kernel-doc:: drivers/gpu/drm/vc4/vc4_plane.c
31 :doc: VC4 plane module
36 .. kernel-doc:: drivers/gpu/drm/vc4/vc4_hdmi.c
[all …]
/Linux-v5.10/Documentation/devicetree/bindings/display/
Dbrcm,bcm2835-vc4.yaml4 $id: http://devicetree.org/schemas/display/brcm,bcm2835-vc4.yaml#
7 title: Broadcom VC4 (VideoCore4) GPU
13 The VC4 device present on the Raspberry Pi includes a display system
21 - brcm,bcm2835-vc4
22 - brcm,cygnus-vc4
31 vc4: gpu {
32 compatible = "brcm,bcm2835-vc4";
/Linux-v5.10/include/uapi/drm/
Dvc4_drm.h83 * their associated state. However, because the VC4 lacks an MMU, we have to
227 * struct drm_vc4_create_bo - ioctl argument for creating VC4 BOs.
241 * struct drm_vc4_mmap_bo - ioctl argument for mapping VC4 BOs.
260 * struct drm_vc4_create_shader_bo - ioctl argument for creating VC4
/Linux-v5.10/arch/arm/boot/dts/
Dbcm2835-common.dtsi135 vc4: gpu { label
136 compatible = "brcm,bcm2835-vc4";

123