aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/exynos/exynos_hdmi.c
diff options
context:
space:
mode:
authorJoonyoung Shim <jy0922.shim@samsung.com>2012-04-23 06:35:51 -0400
committerInki Dae <inki.dae@samsung.com>2012-05-08 05:46:33 -0400
commitab27af85e3154380e65a293b893f79ea0416afdf (patch)
treeb79d19f72b53ea824857000d11e8eb7569dc4dd1 /drivers/gpu/drm/exynos/exynos_hdmi.c
parentcf8fc4f10e2c5c5b6b60d6e79d61cc58afa5967d (diff)
drm/exynos: add PM functions for hdmi and mixer
This patch supports the PM for hdmi and mixer. Turn off hdmi and mixer when suspended, and when resume, will turn on them by hdmi hotplug detection if hdmi is attached. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_hdmi.c')
-rw-r--r--drivers/gpu/drm/exynos/exynos_hdmi.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index 9212d7d53f3a..ad53c4808bdb 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -2367,11 +2367,43 @@ static int __devexit hdmi_remove(struct platform_device *pdev)
2367 return 0; 2367 return 0;
2368} 2368}
2369 2369
2370#ifdef CONFIG_PM_SLEEP
2371static int hdmi_suspend(struct device *dev)
2372{
2373 struct exynos_drm_hdmi_context *ctx = get_hdmi_context(dev);
2374 struct hdmi_context *hdata = ctx->ctx;
2375
2376 disable_irq(hdata->internal_irq);
2377 disable_irq(hdata->external_irq);
2378
2379 hdata->hpd = false;
2380 if (ctx->drm_dev)
2381 drm_helper_hpd_irq_event(ctx->drm_dev);
2382
2383 hdmi_poweroff(hdata);
2384
2385 return 0;
2386}
2387
2388static int hdmi_resume(struct device *dev)
2389{
2390 struct exynos_drm_hdmi_context *ctx = get_hdmi_context(dev);
2391 struct hdmi_context *hdata = ctx->ctx;
2392
2393 enable_irq(hdata->external_irq);
2394 enable_irq(hdata->internal_irq);
2395 return 0;
2396}
2397#endif
2398
2399static SIMPLE_DEV_PM_OPS(hdmi_pm_ops, hdmi_suspend, hdmi_resume);
2400
2370struct platform_driver hdmi_driver = { 2401struct platform_driver hdmi_driver = {
2371 .probe = hdmi_probe, 2402 .probe = hdmi_probe,
2372 .remove = __devexit_p(hdmi_remove), 2403 .remove = __devexit_p(hdmi_remove),
2373 .driver = { 2404 .driver = {
2374 .name = "exynos4-hdmi", 2405 .name = "exynos4-hdmi",
2375 .owner = THIS_MODULE, 2406 .owner = THIS_MODULE,
2407 .pm = &hdmi_pm_ops,
2376 }, 2408 },
2377}; 2409};