From 36549072d7e0df82ee5abc66d80014f6d2bb7f1a Mon Sep 17 00:00:00 2001 From: Huicong Xu Date: Wed, 29 Mar 2017 11:39:26 +0800 Subject: [PATCH] drm/rockchip: dw_hdmi: add power domain control close pd when suspend, no when plug out because hotplug detect need it. make hdmi probe before dp otherwise the shared power domain will be close after dp probe and cause splash screen when starting kernel if hdmi uboot logo display Change-Id: I82ba1abdaf7567173df9ad900d57eca0e6be3932 Signed-off-by: Huicong Xu Signed-off-by: Algea Cao --- drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c index f9a9c18d6311..716f4ba47f2e 100644 --- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c +++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include @@ -676,12 +677,16 @@ static const struct component_ops dw_hdmi_rockchip_ops = { static int dw_hdmi_rockchip_probe(struct platform_device *pdev) { + pm_runtime_enable(&pdev->dev); + pm_runtime_get_sync(&pdev->dev); + return component_add(&pdev->dev, &dw_hdmi_rockchip_ops); } static int dw_hdmi_rockchip_remove(struct platform_device *pdev) { component_del(&pdev->dev, &dw_hdmi_rockchip_ops); + pm_runtime_disable(&pdev->dev); return 0; } @@ -691,6 +696,7 @@ static int dw_hdmi_rockchip_suspend(struct device *dev) struct rockchip_hdmi *hdmi = dev_get_drvdata(dev); dw_hdmi_suspend(hdmi->hdmi); + pm_runtime_put_sync(dev); return 0; } @@ -700,6 +706,7 @@ static int dw_hdmi_rockchip_resume(struct device *dev) struct rockchip_hdmi *hdmi = dev_get_drvdata(dev); dw_hdmi_resume(hdmi->hdmi); + pm_runtime_get_sync(dev); return 0; }