From: xuhuicong Date: Wed, 29 Mar 2017 03:39:26 +0000 (+0800) Subject: drm/rockchip: dw_hdmi: add power domain control X-Git-Tag: firefly_0821_release~162 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=57eae3d8eb904bf06cf186f681ab1e19c32e9a44;p=firefly-linux-kernel-4.4.55.git 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: xuhuicong --- diff --git a/drivers/gpu/drm/rockchip/Makefile b/drivers/gpu/drm/rockchip/Makefile index 142aa57e99f0..a49a0189ef10 100644 --- a/drivers/gpu/drm/rockchip/Makefile +++ b/drivers/gpu/drm/rockchip/Makefile @@ -7,9 +7,9 @@ rockchipdrm-y := rockchip_drm_drv.o rockchip_drm_fb.o \ rockchipdrm-$(CONFIG_DRM_FBDEV_EMULATION) += rockchip_drm_fbdev.o obj-$(CONFIG_ROCKCHIP_DRM_RGA) += rockchip_drm_rga.o +obj-$(CONFIG_ROCKCHIP_DW_HDMI) += dw_hdmi-rockchip.o obj-$(CONFIG_ROCKCHIP_CDN_DP) += cdn-dp.o cdn-dp-objs := cdn-dp-core.o cdn-dp-reg.o -obj-$(CONFIG_ROCKCHIP_DW_HDMI) += dw_hdmi-rockchip.o obj-$(CONFIG_ROCKCHIP_DW_MIPI_DSI) += dw-mipi-dsi.o obj-$(CONFIG_ROCKCHIP_ANALOGIX_DP) += analogix_dp-rockchip.o obj-$(CONFIG_ROCKCHIP_INNO_HDMI) += inno_hdmi.o diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c index 4cbefe86b6ef..41789871bf4a 100644 --- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c +++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -454,12 +455,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; } @@ -467,12 +472,14 @@ static int dw_hdmi_rockchip_remove(struct platform_device *pdev) static int dw_hdmi_rockchip_suspend(struct device *dev) { dw_hdmi_suspend(dev); + pm_runtime_put_sync(dev); return 0; } static int dw_hdmi_rockchip_resume(struct device *dev) { + pm_runtime_get_sync(dev); dw_hdmi_resume(dev); return 0;