Lines Matching refs:vc4_crtc
57 writel(val, vc4_crtc->regs + (offset)); \
63 readl(vc4_crtc->regs + (offset)); \
106 struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); in vc4_crtc_get_scanout_position() local
194 *stime = vc4_crtc->t_vblank; in vc4_crtc_get_scanout_position()
196 *etime = vc4_crtc->t_vblank; in vc4_crtc_get_scanout_position()
220 static u32 vc4_get_fifo_full_level(struct vc4_crtc *vc4_crtc, u32 format) in vc4_get_fifo_full_level() argument
222 const struct vc4_crtc_data *crtc_data = vc4_crtc_to_vc4_crtc_data(vc4_crtc); in vc4_get_fifo_full_level()
223 const struct vc4_pv_data *pv_data = vc4_crtc_to_vc4_pv_data(vc4_crtc); in vc4_get_fifo_full_level()
224 struct vc4_dev *vc4 = to_vc4_dev(vc4_crtc->base.dev); in vc4_get_fifo_full_level()
273 static u32 vc4_crtc_get_fifo_full_level_bits(struct vc4_crtc *vc4_crtc, in vc4_crtc_get_fifo_full_level_bits() argument
276 u32 level = vc4_get_fifo_full_level(vc4_crtc, format); in vc4_crtc_get_fifo_full_level_bits()
308 struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); in vc4_crtc_pixelvalve_reset() local
328 struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); in vc4_crtc_config_pv() local
329 const struct vc4_pv_data *pv_data = vc4_crtc_to_vc4_pv_data(vc4_crtc); in vc4_crtc_config_pv()
354 struct drm_printer p = drm_info_printer(&vc4_crtc->pdev->dev); in vc4_crtc_config_pv()
355 dev_info(&vc4_crtc->pdev->dev, "CRTC %d regs before:\n", in vc4_crtc_config_pv()
357 drm_print_regset32(&p, &vc4_crtc->regset); in vc4_crtc_config_pv()
437 vc4_crtc_get_fifo_full_level_bits(vc4_crtc, format) | in vc4_crtc_config_pv()
447 struct drm_printer p = drm_info_printer(&vc4_crtc->pdev->dev); in vc4_crtc_config_pv()
448 dev_info(&vc4_crtc->pdev->dev, "CRTC %d regs after:\n", in vc4_crtc_config_pv()
450 drm_print_regset32(&p, &vc4_crtc->regset); in vc4_crtc_config_pv()
471 struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); in vc4_crtc_disable() local
520 struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); in vc4_crtc_disable_at_boot() local
529 if (!(of_device_is_compatible(vc4_crtc->pdev->dev.of_node, in vc4_crtc_disable_at_boot()
531 of_device_is_compatible(vc4_crtc->pdev->dev.of_node, in vc4_crtc_disable_at_boot()
541 channel = vc4_hvs_get_fifo_from_output(vc4->hvs, vc4_crtc->data->hvs_output); in vc4_crtc_disable_at_boot()
549 pv_data = vc4_crtc_to_vc4_pv_data(vc4_crtc); in vc4_crtc_disable_at_boot()
619 struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); in vc4_crtc_atomic_enable() local
750 struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); in vc4_enable_vblank() local
766 struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); in vc4_disable_vblank() local
778 static void vc4_crtc_handle_page_flip(struct vc4_crtc *vc4_crtc) in vc4_crtc_handle_page_flip() argument
780 struct drm_crtc *crtc = &vc4_crtc->base; in vc4_crtc_handle_page_flip()
784 u32 chan = vc4_crtc->current_hvs_channel; in vc4_crtc_handle_page_flip()
788 spin_lock(&vc4_crtc->irq_lock); in vc4_crtc_handle_page_flip()
789 if (vc4_crtc->event && in vc4_crtc_handle_page_flip()
790 (vc4_crtc->current_dlist == HVS_READ(SCALER_DISPLACTX(chan)) || in vc4_crtc_handle_page_flip()
791 vc4_crtc->feeds_txp)) { in vc4_crtc_handle_page_flip()
792 drm_crtc_send_vblank_event(crtc, vc4_crtc->event); in vc4_crtc_handle_page_flip()
793 vc4_crtc->event = NULL; in vc4_crtc_handle_page_flip()
804 spin_unlock(&vc4_crtc->irq_lock); in vc4_crtc_handle_page_flip()
808 void vc4_crtc_handle_vblank(struct vc4_crtc *crtc) in vc4_crtc_handle_vblank()
817 struct vc4_crtc *vc4_crtc = data; in vc4_crtc_irq_handler() local
823 vc4_crtc_handle_vblank(vc4_crtc); in vc4_crtc_irq_handler()
1109 struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); in vc4_crtc_late_register() local
1110 const struct vc4_crtc_data *crtc_data = vc4_crtc_to_vc4_crtc_data(vc4_crtc); in vc4_crtc_late_register()
1113 &vc4_crtc->regset); in vc4_crtc_late_register()
1275 struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); in vc4_set_crtc_possible_masks() local
1276 const struct vc4_pv_data *pv_data = vc4_crtc_to_vc4_pv_data(vc4_crtc); in vc4_set_crtc_possible_masks()
1318 struct vc4_crtc *vc4_crtc, in __vc4_crtc_init() argument
1326 struct drm_crtc *crtc = &vc4_crtc->base; in __vc4_crtc_init()
1330 vc4_crtc->data = data; in __vc4_crtc_init()
1331 vc4_crtc->pdev = pdev; in __vc4_crtc_init()
1332 vc4_crtc->feeds_txp = feeds_txp; in __vc4_crtc_init()
1333 spin_lock_init(&vc4_crtc->irq_lock); in __vc4_crtc_init()
1342 drm_mode_crtc_set_gamma_size(crtc, ARRAY_SIZE(vc4_crtc->lut_r)); in __vc4_crtc_init()
1353 vc4_crtc->lut_r[i] = i; in __vc4_crtc_init()
1354 vc4_crtc->lut_g[i] = i; in __vc4_crtc_init()
1355 vc4_crtc->lut_b[i] = i; in __vc4_crtc_init()
1362 struct vc4_crtc *vc4_crtc, in vc4_crtc_init() argument
1382 return __vc4_crtc_init(drm, pdev, vc4_crtc, data, primary_plane, in vc4_crtc_init()
1391 struct vc4_crtc *vc4_crtc; in vc4_crtc_bind() local
1395 vc4_crtc = drmm_kzalloc(drm, sizeof(*vc4_crtc), GFP_KERNEL); in vc4_crtc_bind()
1396 if (!vc4_crtc) in vc4_crtc_bind()
1398 crtc = &vc4_crtc->base; in vc4_crtc_bind()
1404 vc4_crtc->regs = vc4_ioremap_regs(pdev, 0); in vc4_crtc_bind()
1405 if (IS_ERR(vc4_crtc->regs)) in vc4_crtc_bind()
1406 return PTR_ERR(vc4_crtc->regs); in vc4_crtc_bind()
1408 vc4_crtc->regset.base = vc4_crtc->regs; in vc4_crtc_bind()
1409 vc4_crtc->regset.regs = crtc_regs; in vc4_crtc_bind()
1410 vc4_crtc->regset.nregs = ARRAY_SIZE(crtc_regs); in vc4_crtc_bind()
1412 ret = vc4_crtc_init(drm, pdev, vc4_crtc, &pv_data->base, in vc4_crtc_bind()
1424 "vc4 crtc", vc4_crtc); in vc4_crtc_bind()
1428 platform_set_drvdata(pdev, vc4_crtc); in vc4_crtc_bind()
1437 struct vc4_crtc *vc4_crtc = dev_get_drvdata(dev); in vc4_crtc_unbind() local