Lines Matching full:vec
9 * The VEC encoder generates PAL or NTSC composite video output.
41 /* VEC Registers */
88 * (which itself is the VEC clock divided by 8).
193 /* General VEC hardware state. */
213 readl(vec->regs + (offset)); \
219 writel(val, vec->regs + (offset)); \
392 struct vc4_vec *vec = connector_to_vc4_vec(connector); in vc4_vec_connector_set_property() local
394 if (property != vec->legacy_tv_mode_property) in vc4_vec_connector_set_property()
444 struct vc4_vec *vec = connector_to_vc4_vec(connector); in vc4_vec_connector_get_property() local
446 if (property != vec->legacy_tv_mode_property) in vc4_vec_connector_get_property()
504 static int vc4_vec_connector_init(struct drm_device *dev, struct vc4_vec *vec) in vc4_vec_connector_init() argument
506 struct drm_connector *connector = &vec->connector; in vc4_vec_connector_init()
528 vec->legacy_tv_mode_property = prop; in vc4_vec_connector_init()
534 drm_connector_attach_encoder(connector, &vec->encoder.base); in vc4_vec_connector_init()
543 struct vc4_vec *vec = encoder_to_vc4_vec(encoder); in vc4_vec_encoder_disable() local
556 clk_disable_unprepare(vec->clock); in vc4_vec_encoder_disable()
558 ret = pm_runtime_put(&vec->pdev->dev); in vc4_vec_encoder_disable()
575 struct vc4_vec *vec = encoder_to_vc4_vec(encoder); in vc4_vec_encoder_enable() local
576 struct drm_connector *connector = &vec->connector; in vc4_vec_encoder_enable()
592 ret = pm_runtime_resume_and_get(&vec->pdev->dev); in vc4_vec_encoder_enable()
605 ret = clk_set_rate(vec->clock, 108000000); in vc4_vec_encoder_enable()
611 ret = clk_prepare_enable(vec->clock); in vc4_vec_encoder_enable()
642 VEC_WRITE(VEC_DAC_CONFIG, vec->variant->dac_config); in vc4_vec_encoder_enable()
665 pm_runtime_put(&vec->pdev->dev); in vc4_vec_encoder_enable()
742 struct vc4_vec *vec = encoder_to_vc4_vec(encoder); in vc4_vec_late_register() local
744 vc4_debugfs_add_regset32(drm, "vec_regs", &vec->regset); in vc4_vec_late_register()
766 { .compatible = "brcm,bcm2835-vec", .data = &bcm2835_vec_variant },
767 { .compatible = "brcm,bcm2711-vec", .data = &bcm2711_vec_variant },
775 struct vc4_vec *vec; in vc4_vec_bind() local
790 vec = drmm_kzalloc(drm, sizeof(*vec), GFP_KERNEL); in vc4_vec_bind()
791 if (!vec) in vc4_vec_bind()
794 vec->encoder.type = VC4_ENCODER_TYPE_VEC; in vc4_vec_bind()
795 vec->pdev = pdev; in vc4_vec_bind()
796 vec->variant = (const struct vc4_vec_variant *) in vc4_vec_bind()
798 vec->regs = vc4_ioremap_regs(pdev, 0); in vc4_vec_bind()
799 if (IS_ERR(vec->regs)) in vc4_vec_bind()
800 return PTR_ERR(vec->regs); in vc4_vec_bind()
801 vec->regset.base = vec->regs; in vc4_vec_bind()
802 vec->regset.regs = vec_regs; in vc4_vec_bind()
803 vec->regset.nregs = ARRAY_SIZE(vec_regs); in vc4_vec_bind()
805 vec->clock = devm_clk_get(dev, NULL); in vc4_vec_bind()
806 if (IS_ERR(vec->clock)) { in vc4_vec_bind()
807 ret = PTR_ERR(vec->clock); in vc4_vec_bind()
817 ret = drmm_encoder_init(drm, &vec->encoder.base, in vc4_vec_bind()
824 drm_encoder_helper_add(&vec->encoder.base, &vc4_vec_encoder_helper_funcs); in vc4_vec_bind()
826 ret = vc4_vec_connector_init(drm, vec); in vc4_vec_bind()
830 dev_set_drvdata(dev, vec); in vc4_vec_bind()