• Home
  • Raw
  • Download

Lines Matching full:hvs

7  * DOC: VC4 HVS module.
9 * The Hardware Video Scaler (HVS) is the piece of hardware that does
16 * There is a single global HVS, with multiple output FIFOs that can
18 * the HVS, while the vc4_crtc.c code actually drives HVS setup for
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()
75 DRM_INFO("HVS ctx:\n"); 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()
132 static int vc4_hvs_upload_linear_kernel(struct vc4_hvs *hvs, in vc4_hvs_upload_linear_kernel() argument
139 ret = drm_mm_insert_node(&hvs->dlist_mm, space, VC4_KERNEL_DWORDS); in vc4_hvs_upload_linear_kernel()
146 dst_kernel = hvs->dlist + space->start; in vc4_hvs_upload_linear_kernel()
168 /* The LUT memory is laid out with each HVS channel in order, in vc4_hvs_lut_load()
206 if (!vc4->hvs->hvs5) in vc4_hvs_get_fifo_from_output()
273 if (!vc4->hvs->hvs5) in vc4_hvs_init_channel()
294 ((!vc4->hvs->hvs5) ? SCALER_DISPBKGND_GAMMA : 0) | in vc4_hvs_init_channel()
352 spin_lock_irqsave(&vc4->hvs->mm_lock, flags); in vc4_hvs_atomic_check()
353 ret = drm_mm_insert_node(&vc4->hvs->dlist_mm, &vc4_state->mm, in vc4_hvs_atomic_check()
355 spin_unlock_irqrestore(&vc4->hvs->mm_lock, flags); in vc4_hvs_atomic_check()
426 u32 __iomem *dlist_start = vc4->hvs->dlist + vc4_state->mm.start; in vc4_hvs_atomic_flush()
430 DRM_INFO("CRTC %d HVS before:\n", drm_crtc_index(crtc)); in vc4_hvs_atomic_flush()
493 DRM_INFO("CRTC %d HVS after:\n", drm_crtc_index(crtc)); in vc4_hvs_atomic_flush()
525 DRM_DEV_ERROR(dev->dev, "HVS underrun\n"); in vc4_hvs_report_underrun()
564 struct vc4_hvs *hvs = NULL; in vc4_hvs_bind() local
569 hvs = devm_kzalloc(&pdev->dev, sizeof(*hvs), GFP_KERNEL); in vc4_hvs_bind()
570 if (!hvs) in vc4_hvs_bind()
573 hvs->pdev = pdev; in vc4_hvs_bind()
575 if (of_device_is_compatible(pdev->dev.of_node, "brcm,bcm2711-hvs")) in vc4_hvs_bind()
576 hvs->hvs5 = true; in vc4_hvs_bind()
578 hvs->regs = vc4_ioremap_regs(pdev, 0); in vc4_hvs_bind()
579 if (IS_ERR(hvs->regs)) in vc4_hvs_bind()
580 return PTR_ERR(hvs->regs); in vc4_hvs_bind()
582 hvs->regset.base = hvs->regs; in vc4_hvs_bind()
583 hvs->regset.regs = hvs_regs; in vc4_hvs_bind()
584 hvs->regset.nregs = ARRAY_SIZE(hvs_regs); in vc4_hvs_bind()
586 if (hvs->hvs5) { in vc4_hvs_bind()
587 hvs->core_clk = devm_clk_get(&pdev->dev, NULL); in vc4_hvs_bind()
588 if (IS_ERR(hvs->core_clk)) { in vc4_hvs_bind()
590 return PTR_ERR(hvs->core_clk); in vc4_hvs_bind()
593 ret = clk_prepare_enable(hvs->core_clk); in vc4_hvs_bind()
600 if (!hvs->hvs5) in vc4_hvs_bind()
601 hvs->dlist = hvs->regs + SCALER_DLIST_START; in vc4_hvs_bind()
603 hvs->dlist = hvs->regs + SCALER5_DLIST_START; in vc4_hvs_bind()
605 spin_lock_init(&hvs->mm_lock); in vc4_hvs_bind()
607 /* Set up the HVS display list memory manager. We never in vc4_hvs_bind()
612 drm_mm_init(&hvs->dlist_mm, in vc4_hvs_bind()
616 /* Set up the HVS LBM memory manager. We could have some more in vc4_hvs_bind()
621 if (!hvs->hvs5) in vc4_hvs_bind()
623 drm_mm_init(&hvs->lbm_mm, 0, 48 * 1024); in vc4_hvs_bind()
626 drm_mm_init(&hvs->lbm_mm, 0, 60 * 1024); in vc4_hvs_bind()
631 ret = vc4_hvs_upload_linear_kernel(hvs, in vc4_hvs_bind()
632 &hvs->mitchell_netravali_filter, in vc4_hvs_bind()
637 vc4->hvs = hvs; in vc4_hvs_bind()
694 vc4_hvs_irq_handler, 0, "vc4 hvs", drm); in vc4_hvs_bind()
698 vc4_debugfs_add_regset32(drm, "hvs_regs", &hvs->regset); in vc4_hvs_bind()
710 struct vc4_hvs *hvs = vc4->hvs; in vc4_hvs_unbind() local
712 if (drm_mm_node_allocated(&vc4->hvs->mitchell_netravali_filter)) in vc4_hvs_unbind()
713 drm_mm_remove_node(&vc4->hvs->mitchell_netravali_filter); in vc4_hvs_unbind()
715 drm_mm_takedown(&vc4->hvs->dlist_mm); in vc4_hvs_unbind()
716 drm_mm_takedown(&vc4->hvs->lbm_mm); in vc4_hvs_unbind()
718 clk_disable_unprepare(hvs->core_clk); in vc4_hvs_unbind()
720 vc4->hvs = NULL; in vc4_hvs_unbind()
740 { .compatible = "brcm,bcm2711-hvs" },
741 { .compatible = "brcm,bcm2835-hvs" },