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)); \
374 struct vc4_vec *vec = connector_to_vc4_vec(connector); in vc4_vec_connector_set_property() local
376 if (property != vec->legacy_tv_mode_property) in vc4_vec_connector_set_property()
422 struct vc4_vec *vec = connector_to_vc4_vec(connector); in vc4_vec_connector_get_property() local
424 if (property != vec->legacy_tv_mode_property) in vc4_vec_connector_get_property()
478 static int vc4_vec_connector_init(struct drm_device *dev, struct vc4_vec *vec) in vc4_vec_connector_init() argument
480 struct drm_connector *connector = &vec->connector; in vc4_vec_connector_init()
502 vec->legacy_tv_mode_property = prop; in vc4_vec_connector_init()
506 drm_connector_attach_encoder(connector, &vec->encoder.base); in vc4_vec_connector_init()
515 struct vc4_vec *vec = encoder_to_vc4_vec(encoder); in vc4_vec_encoder_disable() local
528 clk_disable_unprepare(vec->clock); in vc4_vec_encoder_disable()
530 ret = pm_runtime_put(&vec->pdev->dev); in vc4_vec_encoder_disable()
547 struct vc4_vec *vec = encoder_to_vc4_vec(encoder); in vc4_vec_encoder_enable() local
548 struct drm_connector *connector = &vec->connector; in vc4_vec_encoder_enable()
564 ret = pm_runtime_resume_and_get(&vec->pdev->dev); in vc4_vec_encoder_enable()
577 ret = clk_set_rate(vec->clock, 108000000); in vc4_vec_encoder_enable()
583 ret = clk_prepare_enable(vec->clock); in vc4_vec_encoder_enable()
614 VEC_WRITE(VEC_DAC_CONFIG, vec->variant->dac_config); in vc4_vec_encoder_enable()
637 pm_runtime_put(&vec->pdev->dev); in vc4_vec_encoder_enable()
714 struct vc4_vec *vec = encoder_to_vc4_vec(encoder); in vc4_vec_late_register() local
716 vc4_debugfs_add_regset32(drm, "vec_regs", &vec->regset); in vc4_vec_late_register()
738 { .compatible = "brcm,bcm2835-vec", .data = &bcm2835_vec_variant },
739 { .compatible = "brcm,bcm2711-vec", .data = &bcm2711_vec_variant },
747 struct vc4_vec *vec; in vc4_vec_bind() local
761 vec = drmm_kzalloc(drm, sizeof(*vec), GFP_KERNEL); in vc4_vec_bind()
762 if (!vec) in vc4_vec_bind()
765 vec->encoder.type = VC4_ENCODER_TYPE_VEC; in vc4_vec_bind()
766 vec->pdev = pdev; in vc4_vec_bind()
767 vec->variant = (const struct vc4_vec_variant *) in vc4_vec_bind()
769 vec->regs = vc4_ioremap_regs(pdev, 0); in vc4_vec_bind()
770 if (IS_ERR(vec->regs)) in vc4_vec_bind()
771 return PTR_ERR(vec->regs); in vc4_vec_bind()
772 vec->regset.base = vec->regs; in vc4_vec_bind()
773 vec->regset.regs = vec_regs; in vc4_vec_bind()
774 vec->regset.nregs = ARRAY_SIZE(vec_regs); in vc4_vec_bind()
776 vec->clock = devm_clk_get(dev, NULL); in vc4_vec_bind()
777 if (IS_ERR(vec->clock)) { in vc4_vec_bind()
778 ret = PTR_ERR(vec->clock); in vc4_vec_bind()
788 ret = drmm_encoder_init(drm, &vec->encoder.base, in vc4_vec_bind()
795 drm_encoder_helper_add(&vec->encoder.base, &vc4_vec_encoder_helper_funcs); in vc4_vec_bind()
797 ret = vc4_vec_connector_init(drm, vec); in vc4_vec_bind()
801 dev_set_drvdata(dev, vec); in vc4_vec_bind()