Lines Matching refs:ret

305 	int ret;
315 ret = PTR_ERR(crtc_state);
321 ret = drm_atomic_commit(state);
325 return ret;
338 int ret;
344 ret = drm_modeset_lock(&drm->mode_config.connection_mutex, ctx);
345 if (ret)
346 return ret;
353 ret = drm_modeset_lock(&crtc->mutex, ctx);
354 if (ret)
355 return ret;
383 ret = drm_scdc_readb(connector->ddc, SCDC_TMDS_CONFIG, &config);
384 if (ret < 0) {
385 drm_err(drm, "Failed to read TMDS config: %d\n", ret);
415 int ret;
445 ret = vc4_hdmi_reset_link(connector, ctx);
446 if (ret == -EDEADLK) {
494 int ret = 0;
514 ret = drm_add_edid_modes(connector, edid);
529 return ret;
553 int ret;
569 ret = drm_atomic_add_affected_planes(state, crtc);
570 if (ret)
571 return ret;
722 int ret;
724 ret = drmm_connector_init(dev, connector,
728 if (ret)
729 return ret;
741 ret = drm_mode_create_tv_margin_properties(dev);
742 if (ret)
743 return ret;
745 ret = drm_mode_create_hdmi_colorspace_property(connector, 0);
746 if (ret)
747 return ret;
778 int ret = 0;
790 ret = wait_for(!(HDMI_READ(HDMI_RAM_PACKET_STATUS) &
795 return ret;
814 int ret;
828 ret = vc4_hdmi_stop_packet(encoder, frame->any.type, true);
829 if (ret) {
830 DRM_ERROR("Failed to wait for infoframe to go idle: %d\n", ret);
863 ret = wait_for((HDMI_READ(HDMI_RAM_PACKET_STATUS) &
865 if (ret)
866 DRM_ERROR("Failed to wait for infoframe to start: %d\n", ret);
906 int ret;
910 ret = drm_hdmi_avi_infoframe_from_display_mode(&frame.avi,
912 if (ret < 0) {
932 int ret;
934 ret = hdmi_spd_infoframe_init(&frame.spd, "Broadcom", "Videocore");
935 if (ret < 0) {
1129 int ret;
1148 ret = pm_runtime_put(&vc4_hdmi->pdev->dev);
1149 if (ret < 0)
1150 DRM_ERROR("Failed to release power domain: %d\n", ret);
1639 int ret;
1668 ret = wait_for(HDMI_READ(HDMI_FIFO_CTL) &
1670 WARN_ONCE(ret, "Timeout waiting for "
1690 int ret;
1698 ret = pm_runtime_resume_and_get(&vc4_hdmi->pdev->dev);
1699 if (ret < 0) {
1700 DRM_ERROR("Failed to retain power domain: %d\n", ret);
1723 ret = clk_set_min_rate(vc4_hdmi->hsm_clock, hsm_rate);
1724 if (ret) {
1725 DRM_ERROR("Failed to set HSM clock rate: %d\n", ret);
1729 ret = clk_set_rate(vc4_hdmi->pixel_clock, tmds_char_rate);
1730 if (ret) {
1731 DRM_ERROR("Failed to set pixel clock rate: %d\n", ret);
1735 ret = clk_prepare_enable(vc4_hdmi->pixel_clock);
1736 if (ret) {
1737 DRM_ERROR("Failed to turn on pixel clock: %d\n", ret);
1751 ret = clk_set_min_rate(vc4_hdmi->pixel_bvb_clock, bvb_rate);
1752 if (ret) {
1753 DRM_ERROR("Failed to set pixel bvb clock rate: %d\n", ret);
1757 ret = clk_prepare_enable(vc4_hdmi->pixel_bvb_clock);
1758 if (ret) {
1759 DRM_ERROR("Failed to turn on pixel bvb clock: %d\n", ret);
1835 int ret;
1863 ret = wait_for(HDMI_READ(HDMI_SCHEDULER_CONTROL) &
1865 WARN_ONCE(ret, "Timeout waiting for "
1877 ret = wait_for(!(HDMI_READ(HDMI_SCHEDULER_CONTROL) &
1879 WARN_ONCE(ret, "Timeout waiting for "
2085 int ret;
2087 ret = vc4_hdmi_encoder_compute_clock(vc4_hdmi, vc4_state,
2089 if (!ret) {
2099 int ret;
2101 ret = vc4_hdmi_encoder_compute_clock(vc4_hdmi, vc4_state,
2103 if (!ret) {
2123 int ret;
2128 ret = vc4_hdmi_encoder_compute_format(vc4_hdmi, vc4_state,
2130 if (ret)
2145 return ret;
2165 int ret;
2201 ret = vc4_hdmi_encoder_compute_config(vc4_hdmi, vc4_state, mode);
2202 if (ret)
2203 return ret;
2378 int ret = 0;
2384 ret = -ENODEV;
2389 ret = -ENODEV;
2412 return ret;
2420 int ret;
2425 ret = vc4_hdmi_stop_packet(encoder, HDMI_INFOFRAME_TYPE_AUDIO, false);
2426 if (ret)
2427 dev_err(dev, "Failed to stop audio infoframe: %d\n", ret);
2524 int ret = 0;
2533 ret = -ENODEV;
2538 ret = -EINVAL;
2601 return ret;
2686 int ret;
2761 ret = devm_snd_dmaengine_pcm_register(dev, &pcm_conf, 0);
2762 if (ret) {
2763 dev_err(dev, "Could not register PCM component: %d\n", ret);
2764 return ret;
2767 ret = devm_snd_soc_register_component(dev, &vc4_hdmi_audio_cpu_dai_comp,
2769 if (ret) {
2770 dev_err(dev, "Could not register CPU DAI: %d\n", ret);
2771 return ret;
2784 ret = devm_add_action_or_reset(dev, vc4_hdmi_audio_codec_release, vc4_hdmi);
2785 if (ret)
2786 return ret;
2818 ret = devm_snd_soc_register_card(dev, card);
2819 if (ret)
2820 dev_err_probe(dev, ret, "Could not register sound card\n");
2822 return ret;
2842 int ret;
2848 ret = devm_request_threaded_irq(&pdev->dev, hpd_con,
2852 if (ret)
2853 return ret;
2855 ret = devm_request_threaded_irq(&pdev->dev, hpd_rm,
2859 if (ret)
2860 return ret;
2901 irqreturn_t ret;
2904 ret = vc4_cec_irq_handler_rx_thread(irq, priv);
2906 ret = vc4_cec_irq_handler_tx_thread(irq, priv);
2908 return ret;
2965 irqreturn_t ret;
2968 ret = vc4_cec_irq_handler_tx_bare_locked(vc4_hdmi);
2971 return ret;
3006 irqreturn_t ret;
3009 ret = vc4_cec_irq_handler_rx_bare_locked(vc4_hdmi);
3012 return ret;
3019 irqreturn_t ret;
3040 ret = vc4_cec_irq_handler_rx_bare_locked(vc4_hdmi);
3042 ret = vc4_cec_irq_handler_tx_bare_locked(vc4_hdmi);
3047 return ret;
3058 int ret;
3069 ret = pm_runtime_resume_and_get(&vc4_hdmi->pdev->dev);
3070 if (ret) {
3072 return ret;
3254 int ret;
3266 ret = PTR_ERR_OR_ZERO(vc4_hdmi->cec_adap);
3267 if (ret < 0)
3268 return ret;
3274 ret = devm_request_threaded_irq(dev, platform_get_irq_byname(pdev, "cec-rx"),
3278 if (ret)
3281 ret = devm_request_threaded_irq(dev, platform_get_irq_byname(pdev, "cec-tx"),
3285 if (ret)
3288 ret = devm_request_threaded_irq(dev, platform_get_irq(pdev, 0),
3292 if (ret)
3296 ret = cec_register_adapter(vc4_hdmi->cec_adap, &pdev->dev);
3297 if (ret < 0)
3323 ret = devm_add_action_or_reset(dev, vc4_hdmi_cec_release, vc4_hdmi);
3324 if (ret)
3325 return ret;
3332 return ret;
3357 int ret;
3383 ret = drmm_add_action_or_reset(drm, vc4_hdmi_free_regset, new_regs);
3384 if (ret)
3385 return ret;
3395 int ret;
3405 ret = vc4_hdmi_build_regset(drm, vc4_hdmi, &vc4_hdmi->hd_regset, VC4_HD);
3406 if (ret)
3407 return ret;
3409 ret = vc4_hdmi_build_regset(drm, vc4_hdmi, &vc4_hdmi->hdmi_regset, VC4_HDMI);
3410 if (ret)
3411 return ret;
3415 ret = PTR_ERR(vc4_hdmi->pixel_clock);
3416 if (ret != -EPROBE_DEFER)
3418 return ret;
3438 int ret;
3535 ret = vc4_hdmi_build_regset(drm, vc4_hdmi, &vc4_hdmi->hdmi_regset, VC4_HDMI);
3536 if (ret)
3537 return ret;
3539 ret = vc4_hdmi_build_regset(drm, vc4_hdmi, &vc4_hdmi->hd_regset, VC4_HD);
3540 if (ret)
3541 return ret;
3543 ret = vc4_hdmi_build_regset(drm, vc4_hdmi, &vc4_hdmi->cec_regset, VC5_CEC);
3544 if (ret)
3545 return ret;
3547 ret = vc4_hdmi_build_regset(drm, vc4_hdmi, &vc4_hdmi->csc_regset, VC5_CSC);
3548 if (ret)
3549 return ret;
3551 ret = vc4_hdmi_build_regset(drm, vc4_hdmi, &vc4_hdmi->dvp_regset, VC5_DVP);
3552 if (ret)
3553 return ret;
3555 ret = vc4_hdmi_build_regset(drm, vc4_hdmi, &vc4_hdmi->phy_regset, VC5_PHY);
3556 if (ret)
3557 return ret;
3559 ret = vc4_hdmi_build_regset(drm, vc4_hdmi, &vc4_hdmi->ram_regset, VC5_RAM);
3560 if (ret)
3561 return ret;
3563 ret = vc4_hdmi_build_regset(drm, vc4_hdmi, &vc4_hdmi->rm_regset, VC5_RM);
3564 if (ret)
3565 return ret;
3585 int ret;
3587 ret = clk_prepare_enable(vc4_hdmi->hsm_clock);
3588 if (ret)
3589 return ret;
3602 ret = -EINVAL;
3630 return ret;
3648 int ret;
3654 ret = drmm_mutex_init(drm, &vc4_hdmi->mutex);
3655 if (ret)
3656 return ret;
3681 ret = variant->init_resources(drm, vc4_hdmi);
3682 if (ret)
3683 return ret;
3698 ret = devm_add_action_or_reset(dev, vc4_hdmi_put_ddc_device, vc4_hdmi);
3699 if (ret)
3700 return ret;
3713 ret = devm_pm_runtime_enable(dev);
3714 if (ret)
3715 return ret;
3721 ret = pm_runtime_resume_and_get(dev);
3722 if (ret)
3723 return ret;
3733 ret = drmm_encoder_init(drm, encoder,
3737 if (ret)
3742 ret = vc4_hdmi_connector_init(drm, vc4_hdmi);
3743 if (ret)
3746 ret = vc4_hdmi_hotplug_init(vc4_hdmi);
3747 if (ret)
3750 ret = vc4_hdmi_cec_init(vc4_hdmi);
3751 if (ret)
3754 ret = vc4_hdmi_audio_init(vc4_hdmi);
3755 if (ret)
3765 return ret;