Lines Matching full:vc4
7 * DOC: VC4 HVS module.
206 struct drm_device *drm = &hvs->vc4->base; in vc4_hvs_dump_state()
232 struct vc4_dev *vc4 = to_vc4_dev(dev); in vc4_hvs_debugfs_underrun() local
235 drm_printf(&p, "%d\n", atomic_read(&vc4->underrun)); in vc4_hvs_debugfs_underrun()
244 struct vc4_dev *vc4 = to_vc4_dev(dev); in vc4_hvs_debugfs_dlist() local
245 struct vc4_hvs *hvs = vc4->hvs; in vc4_hvs_debugfs_dlist()
265 dlist_word = readl((u32 __iomem *)vc4->hvs->dlist + j); in vc4_hvs_debugfs_dlist()
286 struct vc4_dev *vc4 = to_vc4_dev(dev); in vc6_hvs_debugfs_dlist() local
287 struct vc4_hvs *hvs = vc4->hvs; in vc6_hvs_debugfs_dlist()
314 dlist_word = readl((u32 __iomem *)vc4->hvs->dlist + j); in vc6_hvs_debugfs_dlist()
335 struct vc4_dev *vc4 = to_vc4_dev(dev); in vc6_hvs_debugfs_upm_allocs() local
336 struct vc4_hvs *hvs = vc4->hvs; in vc6_hvs_debugfs_upm_allocs()
400 drm_err(&hvs->vc4->base, "Failed to allocate space for filter kernel: %d\n", in vc4_hvs_upload_linear_kernel()
422 struct vc4_dev *vc4 = hvs->vc4; in vc4_hvs_lut_load() local
423 struct drm_device *drm = &vc4->base; in vc4_hvs_lut_load()
429 WARN_ON_ONCE(vc4->gen > VC4_GEN_5); in vc4_hvs_lut_load()
434 if (hvs->vc4->gen != VC4_GEN_4) in vc4_hvs_lut_load()
475 struct vc4_dev *vc4 = hvs->vc4; in vc4_hvs_get_fifo_frame_count() local
476 struct drm_device *drm = &vc4->base; in vc4_hvs_get_fifo_frame_count()
480 WARN_ON_ONCE(vc4->gen > VC4_GEN_6_D); in vc4_hvs_get_fifo_frame_count()
485 switch (vc4->gen) { in vc4_hvs_get_fifo_frame_count()
524 drm_err(drm, "Unknown VC4 generation: %d", vc4->gen); in vc4_hvs_get_fifo_frame_count()
534 struct vc4_dev *vc4 = hvs->vc4; in vc4_hvs_get_fifo_from_output() local
538 WARN_ON_ONCE(vc4->gen > VC4_GEN_6_D); in vc4_hvs_get_fifo_from_output()
540 switch (vc4->gen) { in vc4_hvs_get_fifo_from_output()
621 struct vc4_dev *vc4 = hvs->vc4; in vc4_hvs_init_channel() local
622 struct drm_device *drm = &vc4->base; in vc4_hvs_init_channel()
631 WARN_ON_ONCE(vc4->gen > VC4_GEN_5); in vc4_hvs_init_channel()
648 if (vc4->gen == VC4_GEN_4) { in vc4_hvs_init_channel()
670 ((vc4->gen == VC4_GEN_4) ? SCALER_DISPBKGND_GAMMA : 0) | in vc4_hvs_init_channel()
686 struct vc4_dev *vc4 = hvs->vc4; in vc6_hvs_init_channel() local
687 struct drm_device *drm = &vc4->base; in vc6_hvs_init_channel()
694 WARN_ON_ONCE(vc4->gen < VC4_GEN_6_C); in vc6_hvs_init_channel()
721 struct vc4_dev *vc4 = hvs->vc4; in __vc4_hvs_stop_channel() local
722 struct drm_device *drm = &vc4->base; in __vc4_hvs_stop_channel()
725 WARN_ON_ONCE(vc4->gen > VC4_GEN_5); in __vc4_hvs_stop_channel()
753 struct vc4_dev *vc4 = hvs->vc4; in __vc6_hvs_stop_channel() local
754 struct drm_device *drm = &vc4->base; in __vc6_hvs_stop_channel()
757 WARN_ON_ONCE(vc4->gen < VC4_GEN_6_C); in __vc6_hvs_stop_channel()
781 struct vc4_dev *vc4 = hvs->vc4; in vc4_hvs_stop_channel() local
783 if (vc4->gen >= VC4_GEN_6_C) in vc4_hvs_stop_channel()
794 struct vc4_dev *vc4 = to_vc4_dev(dev); in vc4_hvs_atomic_check() local
822 spin_lock_irqsave(&vc4->hvs->mm_lock, flags); in vc4_hvs_atomic_check()
823 ret = drm_mm_insert_node(&vc4->hvs->dlist_mm, &vc4_state->mm, in vc4_hvs_atomic_check()
825 spin_unlock_irqrestore(&vc4->hvs->mm_lock, flags); in vc4_hvs_atomic_check()
837 struct vc4_dev *vc4 = to_vc4_dev(dev); in vc4_hvs_install_dlist() local
838 struct vc4_hvs *hvs = vc4->hvs; in vc4_hvs_install_dlist()
845 if (vc4->gen >= VC4_GEN_6_C) in vc4_hvs_install_dlist()
899 struct vc4_dev *vc4 = to_vc4_dev(dev); in vc4_hvs_atomic_enable() local
907 if (vc4->gen >= VC4_GEN_6_C) in vc4_hvs_atomic_enable()
908 vc6_hvs_init_channel(vc4->hvs, crtc, mode, oneshot); in vc4_hvs_atomic_enable()
910 vc4_hvs_init_channel(vc4->hvs, crtc, mode, oneshot); in vc4_hvs_atomic_enable()
917 struct vc4_dev *vc4 = to_vc4_dev(dev); in vc4_hvs_atomic_disable() local
922 vc4_hvs_stop_channel(vc4->hvs, chan); in vc4_hvs_atomic_disable()
931 struct vc4_dev *vc4 = to_vc4_dev(dev); in vc4_hvs_atomic_flush() local
932 struct vc4_hvs *hvs = vc4->hvs; in vc4_hvs_atomic_flush()
940 u32 __iomem *dlist_start = vc4->hvs->dlist + vc4_state->mm.start; in vc4_hvs_atomic_flush()
946 WARN_ON_ONCE(vc4->gen > VC4_GEN_6_D); in vc4_hvs_atomic_flush()
996 if (vc4->gen >= VC4_GEN_6_C) { in vc4_hvs_atomic_flush()
1032 WARN_ON_ONCE(vc4->gen > VC4_GEN_5); in vc4_hvs_atomic_flush()
1058 struct vc4_dev *vc4 = hvs->vc4; in vc4_hvs_mask_underrun() local
1059 struct drm_device *drm = &vc4->base; in vc4_hvs_mask_underrun()
1063 WARN_ON(vc4->gen > VC4_GEN_5); in vc4_hvs_mask_underrun()
1069 dispctrl &= ~((vc4->gen == VC4_GEN_5) ? in vc4_hvs_mask_underrun()
1080 struct vc4_dev *vc4 = hvs->vc4; in vc4_hvs_unmask_underrun() local
1081 struct drm_device *drm = &vc4->base; in vc4_hvs_unmask_underrun()
1085 WARN_ON(vc4->gen > VC4_GEN_5); in vc4_hvs_unmask_underrun()
1091 dispctrl |= ((vc4->gen == VC4_GEN_5) ? in vc4_hvs_unmask_underrun()
1104 struct vc4_dev *vc4 = to_vc4_dev(dev); in vc4_hvs_report_underrun() local
1106 atomic_inc(&vc4->underrun); in vc4_hvs_report_underrun()
1113 struct vc4_dev *vc4 = to_vc4_dev(dev); in vc4_hvs_irq_handler() local
1114 struct vc4_hvs *hvs = vc4->hvs; in vc4_hvs_irq_handler()
1121 WARN_ON(vc4->gen > VC4_GEN_5); in vc4_hvs_irq_handler()
1138 dspeislur = (vc4->gen == VC4_GEN_5) ? in vc4_hvs_irq_handler()
1163 struct vc4_dev *vc4 = to_vc4_dev(drm); in vc4_hvs_debugfs_init() local
1164 struct vc4_hvs *hvs = vc4->hvs; in vc4_hvs_debugfs_init()
1166 if (!vc4->hvs) in vc4_hvs_debugfs_init()
1169 if (vc4->gen == VC4_GEN_4) in vc4_hvs_debugfs_init()
1172 &vc4->load_tracker_enabled); in vc4_hvs_debugfs_init()
1174 if (vc4->gen >= VC4_GEN_6_C) { in vc4_hvs_debugfs_init()
1188 struct vc4_hvs *__vc4_hvs_alloc(struct vc4_dev *vc4, in __vc4_hvs_alloc() argument
1192 struct drm_device *drm = &vc4->base; in __vc4_hvs_alloc()
1203 hvs->vc4 = vc4; in __vc4_hvs_alloc()
1209 switch (vc4->gen) { in __vc4_hvs_alloc()
1243 drm_err(drm, "Unknown VC4 generation: %d", vc4->gen); in __vc4_hvs_alloc()
1257 switch (vc4->gen) { in __vc4_hvs_alloc()
1278 drm_err(drm, "Unknown VC4 generation: %d", vc4->gen); in __vc4_hvs_alloc()
1284 if (vc4->gen >= VC4_GEN_6_C) { in __vc4_hvs_alloc()
1298 vc4->hvs = hvs; in __vc4_hvs_alloc()
1305 struct vc4_dev *vc4 = hvs->vc4; in vc4_hvs_hw_init() local
1337 if (vc4->gen == VC4_GEN_4) in vc4_hvs_hw_init()
1367 * VC4 panics when < 2 lines in FIFO. in vc4_hvs_hw_init()
1378 * VC4 panics when < 2 lines in FIFO. in vc4_hvs_hw_init()
1491 if (hvs->vc4->gen == VC4_GEN_6_C) { in vc6_hvs_hw_init()
1535 struct vc4_dev *vc4 = hvs->vc4; in vc4_hvs_cob_init() local
1542 switch (vc4->gen) { in vc4_hvs_cob_init()
1634 struct vc4_dev *vc4 = to_vc4_dev(drm); in vc4_hvs_bind() local
1643 hvs = __vc4_hvs_alloc(vc4, regs, pdev); in vc4_hvs_bind()
1649 if (vc4->gen == VC4_GEN_6_C) { in vc4_hvs_bind()
1655 vc4->gen = VC4_GEN_6_D; in vc4_hvs_bind()
1664 if (vc4->gen >= VC4_GEN_5) { in vc4_hvs_bind()
1679 (vc4->gen >= VC4_GEN_6_C) ? "core" : NULL); in vc4_hvs_bind()
1686 (vc4->gen >= VC4_GEN_6_C) ? "disp" : NULL); in vc4_hvs_bind()
1716 if (vc4->gen >= VC4_GEN_5) in vc4_hvs_bind()
1721 if (vc4->gen >= VC4_GEN_6_C) in vc4_hvs_bind()
1741 if (vc4->gen < VC4_GEN_6_C) { in vc4_hvs_bind()
1743 vc4_hvs_irq_handler, 0, "vc4 hvs", drm); in vc4_hvs_bind()
1755 struct vc4_dev *vc4 = to_vc4_dev(drm); in vc4_hvs_unbind() local
1756 struct vc4_hvs *hvs = vc4->hvs; in vc4_hvs_unbind()
1759 if (drm_mm_node_allocated(&vc4->hvs->mitchell_netravali_filter)) in vc4_hvs_unbind()
1760 drm_mm_remove_node(&vc4->hvs->mitchell_netravali_filter); in vc4_hvs_unbind()
1762 drm_mm_for_each_node_safe(node, next, &vc4->hvs->dlist_mm) in vc4_hvs_unbind()
1765 drm_mm_takedown(&vc4->hvs->dlist_mm); in vc4_hvs_unbind()
1767 drm_mm_for_each_node_safe(node, next, &vc4->hvs->lbm_mm) in vc4_hvs_unbind()
1769 drm_mm_takedown(&vc4->hvs->lbm_mm); in vc4_hvs_unbind()
1774 vc4->hvs = NULL; in vc4_hvs_unbind()