mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
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 <xhc@rock-chips.com>
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/phy/phy.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
|
||||
#include <drm/drm_of.h>
|
||||
#include <drm/drmP.h>
|
||||
@@ -582,12 +583,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;
|
||||
}
|
||||
@@ -595,12 +600,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;
|
||||
|
||||
Reference in New Issue
Block a user