Lines Matching +full:disable +full:- +full:wp
1 // SPDX-License-Identifier: GPL-2.0-only
31 #include <sound/omap-hdmi-audio.h>
45 r = pm_runtime_get_sync(&hdmi.pdev->dev); in hdmi_runtime_get()
47 pm_runtime_put_sync(&hdmi.pdev->dev); in hdmi_runtime_get()
60 r = pm_runtime_put_sync(&hdmi.pdev->dev); in hdmi_runtime_put()
61 WARN_ON(r < 0 && r != -ENOSYS); in hdmi_runtime_put()
66 struct hdmi_wp_data *wp = data; in hdmi_irq_handler() local
69 irqstatus = hdmi_wp_get_irqstatus(wp); in hdmi_irq_handler()
70 hdmi_wp_set_irqstatus(wp, irqstatus); in hdmi_irq_handler()
82 hdmi_wp_set_phy_pwr(wp, HDMI_PHYPWRCMD_OFF); in hdmi_irq_handler()
94 hdmi_wp_set_irqstatus(wp, HDMI_IRQ_LINK_CONNECT | in hdmi_irq_handler()
97 hdmi_wp_set_phy_pwr(wp, HDMI_PHYPWRCMD_LDOON); in hdmi_irq_handler()
102 hdmi_wp_set_phy_pwr(wp, HDMI_PHYPWRCMD_TXON); in hdmi_irq_handler()
104 hdmi_wp_set_phy_pwr(wp, HDMI_PHYPWRCMD_LDOON); in hdmi_irq_handler()
117 reg = devm_regulator_get(&hdmi.pdev->dev, "vdda"); in hdmi_init_regulator()
174 DSSDBG("hdmi_power_on x_res= %d y_res = %d\n", p->x_res, p->y_res); in hdmi_power_on_full()
176 hdmi_pll_compute(&hdmi.pll, p->pixelclock, &hdmi_cinfo); in hdmi_power_on_full()
178 /* disable and clear irqs */ in hdmi_power_on_full()
179 hdmi_wp_clear_irqenable(&hdmi.wp, 0xffffffff); in hdmi_power_on_full()
180 hdmi_wp_set_irqstatus(&hdmi.wp, in hdmi_power_on_full()
181 hdmi_wp_get_irqstatus(&hdmi.wp)); in hdmi_power_on_full()
202 r = hdmi_wp_set_phy_pwr(&hdmi.wp, HDMI_PHYPWRCMD_LDOON); in hdmi_power_on_full()
206 hdmi5_configure(&hdmi.core, &hdmi.wp, &hdmi.cfg); in hdmi_power_on_full()
214 r = hdmi_wp_video_start(&hdmi.wp); in hdmi_power_on_full()
222 hdmi_wp_set_irqenable(&hdmi.wp, in hdmi_power_on_full()
228 hdmi_wp_video_stop(&hdmi.wp); in hdmi_power_on_full()
230 hdmi_wp_set_phy_pwr(&hdmi.wp, HDMI_PHYPWRCMD_OFF); in hdmi_power_on_full()
237 return -EIO; in hdmi_power_on_full()
244 hdmi_wp_clear_irqenable(&hdmi.wp, 0xffffffff); in hdmi_power_off_full()
248 hdmi_wp_video_stop(&hdmi.wp); in hdmi_power_off_full()
250 hdmi_wp_set_phy_pwr(&hdmi.wp, HDMI_PHYPWRCMD_OFF); in hdmi_power_off_full()
263 if (timings->interlace) in hdmi_display_check_timing()
264 return -EINVAL; in hdmi_display_check_timing()
266 if (!dispc_mgr_timings_ok(out->dispc_channel, timings)) in hdmi_display_check_timing()
267 return -EINVAL; in hdmi_display_check_timing()
279 dispc_set_tv_pclk(timings->pixelclock); in hdmi_display_set_timing()
299 hdmi_wp_dump(&hdmi.wp, s); in hdmi_dump_regs()
318 idlemode = REG_GET(hdmi.wp.base, HDMI_WP_SYSCONFIG, 3, 2); in read_edid()
319 /* No-idle mode */ in read_edid()
320 REG_FLD_MOD(hdmi.wp.base, HDMI_WP_SYSCONFIG, 1, 3, 2); in read_edid()
324 REG_FLD_MOD(hdmi.wp.base, HDMI_WP_SYSCONFIG, idlemode, 3, 2); in read_edid()
334 REG_FLD_MOD(hdmi.wp.base, HDMI_WP_SYSCONFIG, 1, 3, 2); in hdmi_start_audio_stream()
335 hdmi_wp_audio_enable(&hd->wp, true); in hdmi_start_audio_stream()
336 hdmi_wp_audio_core_req_enable(&hd->wp, true); in hdmi_start_audio_stream()
341 hdmi_wp_audio_core_req_enable(&hd->wp, false); in hdmi_stop_audio_stream()
342 hdmi_wp_audio_enable(&hd->wp, false); in hdmi_stop_audio_stream()
343 REG_FLD_MOD(hd->wp.base, HDMI_WP_SYSCONFIG, hd->wp_idlemode, 3, 2); in hdmi_stop_audio_stream()
356 if (out->manager == NULL) { in hdmi_display_enable()
358 r = -ENODEV; in hdmi_display_enable()
369 r = hdmi5_audio_config(&hdmi.core, &hdmi.wp, &hdmi.audio_config, in hdmi_display_enable()
373 hdmi.audio_abort_cb(&hdmi.pdev->dev); in hdmi_display_enable()
453 mgr = omap_dss_get_overlay_manager(dssdev->dispc_channel); in hdmi_connect()
455 return -ENODEV; in hdmi_connect()
464 dst->name); in hdmi_connect()
475 WARN_ON(dst != dssdev->dst); in hdmi_disconnect()
477 if (dst != dssdev->dst) in hdmi_disconnect()
482 if (dssdev->manager) in hdmi_disconnect()
483 dss_mgr_disconnect(dssdev->manager, dssdev); in hdmi_disconnect()
527 .disable = hdmi_display_disable,
542 out->dev = &pdev->dev; in hdmi_init_output()
543 out->id = OMAP_DSS_OUTPUT_HDMI; in hdmi_init_output()
544 out->output_type = OMAP_DISPLAY_TYPE_HDMI; in hdmi_init_output()
545 out->name = "hdmi.0"; in hdmi_init_output()
546 out->dispc_channel = OMAP_DSS_CHANNEL_DIGIT; in hdmi_init_output()
547 out->ops.hdmi = &hdmi_ops; in hdmi_init_output()
548 out->owner = THIS_MODULE; in hdmi_init_output()
562 struct device_node *node = pdev->dev.of_node; in hdmi_probe_of()
589 mutex_lock(&hd->lock); in hdmi_audio_startup()
591 if (!hdmi_mode_has_audio(&hd->cfg) || !hd->display_enabled) { in hdmi_audio_startup()
592 ret = -EPERM; in hdmi_audio_startup()
596 hd->audio_abort_cb = abort_cb; in hdmi_audio_startup()
599 mutex_unlock(&hd->lock); in hdmi_audio_startup()
608 mutex_lock(&hd->lock); in hdmi_audio_shutdown()
609 hd->audio_abort_cb = NULL; in hdmi_audio_shutdown()
610 hd->audio_configured = false; in hdmi_audio_shutdown()
611 hd->audio_playing = false; in hdmi_audio_shutdown()
612 mutex_unlock(&hd->lock); in hdmi_audio_shutdown()
622 WARN_ON(!hdmi_mode_has_audio(&hd->cfg)); in hdmi_audio_start()
624 spin_lock_irqsave(&hd->audio_playing_lock, flags); in hdmi_audio_start()
626 if (hd->display_enabled) in hdmi_audio_start()
628 hd->audio_playing = true; in hdmi_audio_start()
630 spin_unlock_irqrestore(&hd->audio_playing_lock, flags); in hdmi_audio_start()
639 WARN_ON(!hdmi_mode_has_audio(&hd->cfg)); in hdmi_audio_stop()
641 spin_lock_irqsave(&hd->audio_playing_lock, flags); in hdmi_audio_stop()
643 if (hd->display_enabled) in hdmi_audio_stop()
645 hd->audio_playing = false; in hdmi_audio_stop()
647 spin_unlock_irqrestore(&hd->audio_playing_lock, flags); in hdmi_audio_stop()
656 mutex_lock(&hd->lock); in hdmi_audio_config()
658 if (!hdmi_mode_has_audio(&hd->cfg) || !hd->display_enabled) { in hdmi_audio_config()
659 ret = -EPERM; in hdmi_audio_config()
663 ret = hdmi5_audio_config(&hd->core, &hd->wp, dss_audio, in hdmi_audio_config()
664 hd->cfg.timings.pixelclock); in hdmi_audio_config()
667 hd->audio_configured = true; in hdmi_audio_config()
668 hd->audio_config = *dss_audio; in hdmi_audio_config()
671 mutex_unlock(&hd->lock); in hdmi_audio_config()
689 .audio_dma_addr = hdmi_wp_get_audio_dma_addr(&hdmi.wp), in hdmi_audio_register()
694 dev, "omap-hdmi-audio", PLATFORM_DEVID_AUTO, in hdmi_audio_register()
702 REG_GET(hdmi.wp.base, HDMI_WP_SYSCONFIG, 3, 2); in hdmi_audio_register()
716 dev_set_drvdata(&pdev->dev, &hdmi); in hdmi5_bind()
721 if (pdev->dev.of_node) { in hdmi5_bind()
727 r = hdmi_wp_init(pdev, &hdmi.wp); in hdmi5_bind()
731 r = hdmi_pll_init(pdev, &hdmi.pll, &hdmi.wp); in hdmi5_bind()
746 r = -ENODEV; in hdmi5_bind()
750 r = devm_request_threaded_irq(&pdev->dev, irq, in hdmi5_bind()
752 IRQF_ONESHOT, "OMAP HDMI", &hdmi.wp); in hdmi5_bind()
758 pm_runtime_enable(&pdev->dev); in hdmi5_bind()
762 r = hdmi_audio_register(&pdev->dev); in hdmi5_bind()
766 pm_runtime_disable(&pdev->dev); in hdmi5_bind()
789 pm_runtime_disable(&pdev->dev); in hdmi5_unbind()
799 return component_add(&pdev->dev, &hdmi5_component_ops); in hdmi5_probe()
804 component_del(&pdev->dev, &hdmi5_component_ops); in hdmi5_remove()
832 { .compatible = "ti,omap5-hdmi", },
833 { .compatible = "ti,dra7-hdmi", },