Lines Matching refs:hdmi
33 static struct omap_hdmi hdmi; variable
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()
95 if (hdmi.vdda_reg != NULL) in hdmi_init_regulator()
98 reg = devm_regulator_get(&hdmi.pdev->dev, "vdda"); in hdmi_init_regulator()
106 hdmi.vdda_reg = reg; in hdmi_init_regulator()
115 r = regulator_enable(hdmi.vdda_reg); in hdmi_power_on_core()
126 hdmi.core_enabled = true; in hdmi_power_on_core()
131 regulator_disable(hdmi.vdda_reg); in hdmi_power_on_core()
138 hdmi.core_enabled = false; in hdmi_power_off_core()
141 regulator_disable(hdmi.vdda_reg); in hdmi_power_off_core()
148 struct omap_overlay_manager *mgr = hdmi.output.manager; in hdmi_power_on_full()
149 struct hdmi_wp_data *wp = &hdmi.wp; in hdmi_power_on_full()
160 p = &hdmi.cfg.timings; in hdmi_power_on_full()
164 hdmi_pll_compute(&hdmi.pll, p->pixelclock, &hdmi_cinfo); in hdmi_power_on_full()
166 r = dss_pll_enable(&hdmi.pll.pll); in hdmi_power_on_full()
172 r = dss_pll_set_config(&hdmi.pll.pll, &hdmi_cinfo); in hdmi_power_on_full()
178 r = hdmi_phy_configure(&hdmi.phy, hdmi_cinfo.clkdco, in hdmi_power_on_full()
189 hdmi4_configure(&hdmi.core, &hdmi.wp, &hdmi.cfg); in hdmi_power_on_full()
197 r = hdmi_wp_video_start(&hdmi.wp); in hdmi_power_on_full()
211 hdmi_wp_video_stop(&hdmi.wp); in hdmi_power_on_full()
213 hdmi_wp_set_phy_pwr(&hdmi.wp, HDMI_PHYPWRCMD_OFF); in hdmi_power_on_full()
217 dss_pll_disable(&hdmi.pll.pll); in hdmi_power_on_full()
225 struct omap_overlay_manager *mgr = hdmi.output.manager; in hdmi_power_off_full()
227 hdmi_wp_clear_irqenable(&hdmi.wp, 0xffffffff); in hdmi_power_off_full()
231 hdmi_wp_video_stop(&hdmi.wp); in hdmi_power_off_full()
233 hdmi_wp_set_phy_pwr(&hdmi.wp, HDMI_PHYPWRCMD_OFF); in hdmi_power_off_full()
235 dss_pll_disable(&hdmi.pll.pll); in hdmi_power_off_full()
243 struct omap_dss_device *out = &hdmi.output; in hdmi_display_check_timing()
254 mutex_lock(&hdmi.lock); in hdmi_display_set_timing()
256 hdmi.cfg.timings = *timings; in hdmi_display_set_timing()
260 mutex_unlock(&hdmi.lock); in hdmi_display_set_timing()
266 *timings = hdmi.cfg.timings; in hdmi_display_get_timings()
271 mutex_lock(&hdmi.lock); in hdmi_dump_regs()
274 mutex_unlock(&hdmi.lock); in hdmi_dump_regs()
278 hdmi_wp_dump(&hdmi.wp, s); in hdmi_dump_regs()
279 hdmi_pll_dump(&hdmi.pll, s); in hdmi_dump_regs()
280 hdmi_phy_dump(&hdmi.phy, s); in hdmi_dump_regs()
281 hdmi4_core_dump(&hdmi.core, s); in hdmi_dump_regs()
284 mutex_unlock(&hdmi.lock); in hdmi_dump_regs()
291 mutex_lock(&hdmi.lock); in read_edid()
296 r = hdmi4_read_edid(&hdmi.core, buf, len); in read_edid()
299 mutex_unlock(&hdmi.lock); in read_edid()
318 struct omap_dss_device *out = &hdmi.output; in hdmi_display_enable()
324 mutex_lock(&hdmi.lock); in hdmi_display_enable()
338 if (hdmi.audio_configured) { in hdmi_display_enable()
339 r = hdmi4_audio_config(&hdmi.core, &hdmi.wp, &hdmi.audio_config, in hdmi_display_enable()
340 hdmi.cfg.timings.pixelclock); in hdmi_display_enable()
343 hdmi.audio_abort_cb(&hdmi.pdev->dev); in hdmi_display_enable()
344 hdmi.audio_configured = false; in hdmi_display_enable()
348 spin_lock_irqsave(&hdmi.audio_playing_lock, flags); in hdmi_display_enable()
349 if (hdmi.audio_configured && hdmi.audio_playing) in hdmi_display_enable()
350 hdmi_start_audio_stream(&hdmi); in hdmi_display_enable()
351 hdmi.display_enabled = true; in hdmi_display_enable()
352 spin_unlock_irqrestore(&hdmi.audio_playing_lock, flags); in hdmi_display_enable()
354 mutex_unlock(&hdmi.lock); in hdmi_display_enable()
358 mutex_unlock(&hdmi.lock); in hdmi_display_enable()
368 mutex_lock(&hdmi.lock); in hdmi_display_disable()
370 spin_lock_irqsave(&hdmi.audio_playing_lock, flags); in hdmi_display_disable()
371 hdmi_stop_audio_stream(&hdmi); in hdmi_display_disable()
372 hdmi.display_enabled = false; in hdmi_display_disable()
373 spin_unlock_irqrestore(&hdmi.audio_playing_lock, flags); in hdmi_display_disable()
377 mutex_unlock(&hdmi.lock); in hdmi_display_disable()
386 mutex_lock(&hdmi.lock); in hdmi_core_enable()
394 mutex_unlock(&hdmi.lock); in hdmi_core_enable()
398 mutex_unlock(&hdmi.lock); in hdmi_core_enable()
406 mutex_lock(&hdmi.lock); in hdmi_core_disable()
410 mutex_unlock(&hdmi.lock); in hdmi_core_disable()
459 bool need_enable = !hdmi.core_enabled; in hdmi_read_edid()
479 hdmi.cfg.infoframe = *avi; in hdmi_set_infoframe()
486 hdmi.cfg.hdmi_dvi_mode = hdmi_mode ? HDMI_HDMI : HDMI_DVI; in hdmi_set_hdmi_mode()
508 struct omap_dss_device *out = &hdmi.output; in hdmi_init_output()
515 out->ops.hdmi = &hdmi_ops; in hdmi_init_output()
523 struct omap_dss_device *out = &hdmi.output; in hdmi_uninit_output()
538 r = hdmi_parse_lanes_of(pdev, ep, &hdmi.phy); in hdmi_probe_of()
656 .audio_dma_addr = hdmi_wp_get_audio_dma_addr(&hdmi.wp), in hdmi_audio_register()
660 hdmi.audio_pdev = platform_device_register_data( in hdmi_audio_register()
664 return PTR_ERR_OR_ZERO(hdmi.audio_pdev); in hdmi_audio_register()
674 hdmi.pdev = pdev; in hdmi4_bind()
675 platform_set_drvdata(pdev, &hdmi); in hdmi4_bind()
677 mutex_init(&hdmi.lock); in hdmi4_bind()
678 spin_lock_init(&hdmi.audio_playing_lock); in hdmi4_bind()
686 r = hdmi_wp_init(pdev, &hdmi.wp); in hdmi4_bind()
690 r = hdmi_pll_init(pdev, &hdmi.pll, &hdmi.wp); in hdmi4_bind()
694 r = hdmi_phy_init(pdev, &hdmi.phy); in hdmi4_bind()
698 r = hdmi4_core_init(pdev, &hdmi.core); in hdmi4_bind()
711 IRQF_ONESHOT, "OMAP HDMI", &hdmi.wp); in hdmi4_bind()
733 hdmi_pll_uninit(&hdmi.pll); in hdmi4_bind()
741 if (hdmi.audio_pdev) in hdmi4_unbind()
742 platform_device_unregister(hdmi.audio_pdev); in hdmi4_unbind()
746 hdmi_pll_uninit(&hdmi.pll); in hdmi4_unbind()