Lines Matching +full:clk +full:- +full:mgr

1 // SPDX-License-Identifier: GPL-2.0-only
4 * Copyright (C) 2010-2011 Texas Instruments Incorporated - https://www.ti.com/
21 #include <linux/clk.h>
26 #include <sound/omap-hdmi-audio.h>
41 r = pm_runtime_get_sync(&hdmi.pdev->dev); in hdmi_runtime_get()
43 pm_runtime_put_sync(&hdmi.pdev->dev); in hdmi_runtime_get()
56 r = pm_runtime_put_sync(&hdmi.pdev->dev); in hdmi_runtime_put()
57 WARN_ON(r < 0 && r != -ENOSYS); in hdmi_runtime_put()
98 reg = devm_regulator_get(&hdmi.pdev->dev, "vdda"); in hdmi_init_regulator()
101 if (PTR_ERR(reg) != -EPROBE_DEFER) in hdmi_init_regulator()
148 struct omap_overlay_manager *mgr = hdmi.output.manager; in hdmi_power_on_full() local
162 DSSDBG("hdmi_power_on x_res= %d y_res = %d\n", p->x_res, p->y_res); in hdmi_power_on_full()
164 hdmi_pll_compute(&hdmi.pll, p->pixelclock, &hdmi_cinfo); in hdmi_power_on_full()
195 dss_mgr_set_timings(mgr, p); in hdmi_power_on_full()
201 r = dss_mgr_enable(mgr); in hdmi_power_on_full()
220 return -EIO; in hdmi_power_on_full()
225 struct omap_overlay_manager *mgr = hdmi.output.manager; in hdmi_power_off_full() local
229 dss_mgr_disable(mgr); in hdmi_power_off_full()
245 if (!dispc_mgr_timings_ok(out->dispc_channel, timings)) in hdmi_display_check_timing()
246 return -EINVAL; in hdmi_display_check_timing()
258 dispc_set_tv_pclk(timings->pixelclock); in hdmi_display_set_timing()
306 hdmi_wp_audio_enable(&hd->wp, true); in hdmi_start_audio_stream()
307 hdmi4_audio_start(&hd->core, &hd->wp); in hdmi_start_audio_stream()
312 hdmi4_audio_stop(&hd->core, &hd->wp); in hdmi_stop_audio_stream()
313 hdmi_wp_audio_enable(&hd->wp, false); in hdmi_stop_audio_stream()
326 if (out->manager == NULL) { in hdmi_display_enable()
328 r = -ENODEV; in hdmi_display_enable()
343 hdmi.audio_abort_cb(&hdmi.pdev->dev); in hdmi_display_enable()
416 struct omap_overlay_manager *mgr; in hdmi_connect() local
423 mgr = omap_dss_get_overlay_manager(dssdev->dispc_channel); in hdmi_connect()
424 if (!mgr) in hdmi_connect()
425 return -ENODEV; in hdmi_connect()
427 r = dss_mgr_connect(mgr, dssdev); in hdmi_connect()
434 dst->name); in hdmi_connect()
435 dss_mgr_disconnect(mgr, dssdev); in hdmi_connect()
445 WARN_ON(dst != dssdev->dst); in hdmi_disconnect()
447 if (dst != dssdev->dst) in hdmi_disconnect()
452 if (dssdev->manager) in hdmi_disconnect()
453 dss_mgr_disconnect(dssdev->manager, dssdev); in hdmi_disconnect()
510 out->dev = &pdev->dev; in hdmi_init_output()
511 out->id = OMAP_DSS_OUTPUT_HDMI; in hdmi_init_output()
512 out->output_type = OMAP_DISPLAY_TYPE_HDMI; in hdmi_init_output()
513 out->name = "hdmi.0"; in hdmi_init_output()
514 out->dispc_channel = OMAP_DSS_CHANNEL_DIGIT; in hdmi_init_output()
515 out->ops.hdmi = &hdmi_ops; in hdmi_init_output()
516 out->owner = THIS_MODULE; in hdmi_init_output()
530 struct device_node *node = pdev->dev.of_node; in hdmi_probe_of()
557 mutex_lock(&hd->lock); in hdmi_audio_startup()
559 if (!hdmi_mode_has_audio(&hd->cfg) || !hd->display_enabled) { in hdmi_audio_startup()
560 ret = -EPERM; in hdmi_audio_startup()
564 hd->audio_abort_cb = abort_cb; in hdmi_audio_startup()
567 mutex_unlock(&hd->lock); in hdmi_audio_startup()
576 mutex_lock(&hd->lock); in hdmi_audio_shutdown()
577 hd->audio_abort_cb = NULL; in hdmi_audio_shutdown()
578 hd->audio_configured = false; in hdmi_audio_shutdown()
579 hd->audio_playing = false; in hdmi_audio_shutdown()
580 mutex_unlock(&hd->lock); in hdmi_audio_shutdown()
590 WARN_ON(!hdmi_mode_has_audio(&hd->cfg)); in hdmi_audio_start()
592 spin_lock_irqsave(&hd->audio_playing_lock, flags); in hdmi_audio_start()
594 if (hd->display_enabled) in hdmi_audio_start()
596 hd->audio_playing = true; in hdmi_audio_start()
598 spin_unlock_irqrestore(&hd->audio_playing_lock, flags); in hdmi_audio_start()
607 WARN_ON(!hdmi_mode_has_audio(&hd->cfg)); in hdmi_audio_stop()
609 spin_lock_irqsave(&hd->audio_playing_lock, flags); in hdmi_audio_stop()
611 if (hd->display_enabled) in hdmi_audio_stop()
613 hd->audio_playing = false; in hdmi_audio_stop()
615 spin_unlock_irqrestore(&hd->audio_playing_lock, flags); in hdmi_audio_stop()
624 mutex_lock(&hd->lock); in hdmi_audio_config()
626 if (!hdmi_mode_has_audio(&hd->cfg) || !hd->display_enabled) { in hdmi_audio_config()
627 ret = -EPERM; in hdmi_audio_config()
631 ret = hdmi4_audio_config(&hd->core, &hd->wp, dss_audio, in hdmi_audio_config()
632 hd->cfg.timings.pixelclock); in hdmi_audio_config()
634 hd->audio_configured = true; in hdmi_audio_config()
635 hd->audio_config = *dss_audio; in hdmi_audio_config()
638 mutex_unlock(&hd->lock); in hdmi_audio_config()
661 dev, "omap-hdmi-audio", PLATFORM_DEVID_AUTO, in hdmi_audio_register()
675 dev_set_drvdata(&pdev->dev, &hdmi); in hdmi4_bind()
680 if (pdev->dev.of_node) { in hdmi4_bind()
705 r = -ENODEV; in hdmi4_bind()
709 r = devm_request_threaded_irq(&pdev->dev, irq, in hdmi4_bind()
717 pm_runtime_enable(&pdev->dev); in hdmi4_bind()
721 r = hdmi_audio_register(&pdev->dev); in hdmi4_bind()
725 pm_runtime_disable(&pdev->dev); in hdmi4_bind()
748 pm_runtime_disable(&pdev->dev); in hdmi4_unbind()
758 return component_add(&pdev->dev, &hdmi4_component_ops); in hdmi4_probe()
763 component_del(&pdev->dev, &hdmi4_component_ops); in hdmi4_remove()
791 { .compatible = "ti,omap4-hdmi", },