Lines Matching refs:venc

72 	struct venc_state *venc = to_state(sd);  in venc_read()  local
74 return readl(venc->venc_base + offset); in venc_read()
79 struct venc_state *venc = to_state(sd); in venc_write() local
81 writel(val, (venc->venc_base + offset)); in venc_write()
98 struct venc_state *venc = to_state(sd); in vdaccfg_write() local
100 writel(val, venc->vdaccfg_reg); in vdaccfg_write()
102 val = readl(venc->vdaccfg_reg); in vdaccfg_write()
135 struct venc_state *venc = to_state(sd); in venc_enabledigitaloutput() local
168 if (venc->venc_type != VPBE_VERSION_3) in venc_enabledigitaloutput()
218 struct venc_state *venc = to_state(sd); in venc_set_ntsc() local
219 struct venc_platform_data *pdata = venc->pdata; in venc_set_ntsc()
228 venc_enable_vpss_clock(venc->venc_type, VPBE_ENC_STD, V4L2_STD_525_60); in venc_set_ntsc()
231 if (venc->venc_type == VPBE_VERSION_3) { in venc_set_ntsc()
235 } else if (venc->venc_type == VPBE_VERSION_2) { in venc_set_ntsc()
265 struct venc_state *venc = to_state(sd); in venc_set_pal() local
271 if (venc->pdata->setup_clock(VPBE_ENC_STD, V4L2_STD_625_50) < 0) in venc_set_pal()
274 venc_enable_vpss_clock(venc->venc_type, VPBE_ENC_STD, V4L2_STD_625_50); in venc_set_pal()
277 if (venc->venc_type == VPBE_VERSION_3) { in venc_set_pal()
281 } else if (venc->venc_type == VPBE_VERSION_2) { in venc_set_pal()
317 struct venc_state *venc = to_state(sd); in venc_set_480p59_94() local
318 struct venc_platform_data *pdata = venc->pdata; in venc_set_480p59_94()
321 if (venc->venc_type != VPBE_VERSION_1 && in venc_set_480p59_94()
322 venc->venc_type != VPBE_VERSION_2) in venc_set_480p59_94()
329 venc_enable_vpss_clock(venc->venc_type, VPBE_ENC_DV_TIMINGS, 27000000); in venc_set_480p59_94()
332 if (venc->venc_type == VPBE_VERSION_2) in venc_set_480p59_94()
337 if (venc->venc_type == VPBE_VERSION_1) { in venc_set_480p59_94()
365 struct venc_state *venc = to_state(sd); in venc_set_576p50() local
366 struct venc_platform_data *pdata = venc->pdata; in venc_set_576p50()
370 if (venc->venc_type != VPBE_VERSION_1 && in venc_set_576p50()
371 venc->venc_type != VPBE_VERSION_2) in venc_set_576p50()
377 venc_enable_vpss_clock(venc->venc_type, VPBE_ENC_DV_TIMINGS, 27000000); in venc_set_576p50()
380 if (venc->venc_type == VPBE_VERSION_2) in venc_set_576p50()
386 if (venc->venc_type == VPBE_VERSION_1) { in venc_set_576p50()
412 struct venc_state *venc = to_state(sd); in venc_set_720p60_internal() local
413 struct venc_platform_data *pdata = venc->pdata; in venc_set_720p60_internal()
418 venc_enable_vpss_clock(venc->venc_type, VPBE_ENC_DV_TIMINGS, 74250000); in venc_set_720p60_internal()
441 struct venc_state *venc = to_state(sd); in venc_set_1080i30_internal() local
442 struct venc_platform_data *pdata = venc->pdata; in venc_set_1080i30_internal()
447 venc_enable_vpss_clock(venc->venc_type, VPBE_ENC_DV_TIMINGS, 74250000); in venc_set_1080i30_internal()
481 struct venc_state *venc = to_state(sd); in venc_s_dv_timings() local
492 (venc->venc_type == VPBE_VERSION_2)) { in venc_s_dv_timings()
499 (venc->venc_type == VPBE_VERSION_2)) { in venc_s_dv_timings()
512 struct venc_state *venc = to_state(sd); in venc_s_routing() local
519 venc->output = output; in venc_s_routing()
559 struct venc_state *venc = to_state(sd); in venc_initialize() local
563 venc->output = 0; in venc_initialize()
564 venc->std = V4L2_STD_525_60; in venc_initialize()
566 ret = venc_s_routing(sd, 0, venc->output, 0); in venc_initialize()
572 ret = venc_s_std_output(sd, venc->std); in venc_initialize()
584 struct venc_state **venc = data; in venc_device_get() local
587 *venc = platform_get_drvdata(pdev); in venc_device_get()
595 struct venc_state *venc = NULL; in venc_sub_dev_init() local
597 bus_for_each_dev(&platform_bus_type, NULL, &venc, in venc_sub_dev_init()
599 if (venc == NULL) in venc_sub_dev_init()
602 v4l2_subdev_init(&venc->sd, &venc_ops); in venc_sub_dev_init()
604 strscpy(venc->sd.name, venc_name, sizeof(venc->sd.name)); in venc_sub_dev_init()
605 if (v4l2_device_register_subdev(v4l2_dev, &venc->sd) < 0) { in venc_sub_dev_init()
610 if (venc_initialize(&venc->sd)) { in venc_sub_dev_init()
616 return &venc->sd; in venc_sub_dev_init()
623 struct venc_state *venc; in venc_probe() local
634 venc = devm_kzalloc(&pdev->dev, sizeof(struct venc_state), GFP_KERNEL); in venc_probe()
635 if (venc == NULL) in venc_probe()
638 venc->venc_type = pdev_id->driver_data; in venc_probe()
639 venc->pdev = &pdev->dev; in venc_probe()
640 venc->pdata = pdev->dev.platform_data; in venc_probe()
642 venc->venc_base = devm_platform_ioremap_resource(pdev, 0); in venc_probe()
643 if (IS_ERR(venc->venc_base)) in venc_probe()
644 return PTR_ERR(venc->venc_base); in venc_probe()
646 if (venc->venc_type != VPBE_VERSION_1) { in venc_probe()
647 venc->vdaccfg_reg = devm_platform_ioremap_resource(pdev, 1); in venc_probe()
648 if (IS_ERR(venc->vdaccfg_reg)) in venc_probe()
649 return PTR_ERR(venc->vdaccfg_reg); in venc_probe()
651 spin_lock_init(&venc->lock); in venc_probe()
652 platform_set_drvdata(pdev, venc); in venc_probe()
653 dev_notice(venc->pdev, "VENC sub device probe success\n"); in venc_probe()