mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
drm: rockchip: dw-hdmi: fix the issue of hdmi unbind error
Change-Id: Ida30cf7f38209ee730ca87589e22f9cdbaef4953 Signed-off-by: Shunqing Chen <csq@rock-chips.com>
This commit is contained in:
@@ -4007,10 +4007,8 @@ static void dw_hdmi_reg_initial(struct dw_hdmi *hdmi)
|
||||
}
|
||||
}
|
||||
|
||||
void dw_hdmi_suspend(struct device *dev)
|
||||
void dw_hdmi_suspend(struct device *dev, struct dw_hdmi *hdmi)
|
||||
{
|
||||
struct dw_hdmi *hdmi = dev_get_drvdata(dev);
|
||||
|
||||
if (!hdmi) {
|
||||
dev_warn(dev, "Hdmi has not been initialized\n");
|
||||
return;
|
||||
@@ -4039,10 +4037,8 @@ void dw_hdmi_suspend(struct device *dev)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(dw_hdmi_suspend);
|
||||
|
||||
void dw_hdmi_resume(struct device *dev)
|
||||
void dw_hdmi_resume(struct device *dev, struct dw_hdmi *hdmi)
|
||||
{
|
||||
struct dw_hdmi *hdmi = dev_get_drvdata(dev);
|
||||
|
||||
if (!hdmi) {
|
||||
dev_warn(dev, "Hdmi has not been initialized\n");
|
||||
return;
|
||||
|
||||
@@ -1397,7 +1397,9 @@ static int dw_hdmi_rockchip_probe(struct platform_device *pdev)
|
||||
|
||||
static void dw_hdmi_rockchip_shutdown(struct platform_device *pdev)
|
||||
{
|
||||
dw_hdmi_suspend(&pdev->dev);
|
||||
struct rockchip_hdmi *hdmi = platform_get_drvdata(pdev);
|
||||
|
||||
dw_hdmi_suspend(&pdev->dev, hdmi->hdmi);
|
||||
pm_runtime_put_sync(&pdev->dev);
|
||||
}
|
||||
|
||||
@@ -1411,7 +1413,9 @@ static int dw_hdmi_rockchip_remove(struct platform_device *pdev)
|
||||
|
||||
static int dw_hdmi_rockchip_suspend(struct device *dev)
|
||||
{
|
||||
dw_hdmi_suspend(dev);
|
||||
struct rockchip_hdmi *hdmi = dev_get_drvdata(dev);
|
||||
|
||||
dw_hdmi_suspend(dev, hdmi->hdmi);
|
||||
pm_runtime_put_sync(dev);
|
||||
|
||||
return 0;
|
||||
@@ -1419,8 +1423,10 @@ static int dw_hdmi_rockchip_suspend(struct device *dev)
|
||||
|
||||
static int dw_hdmi_rockchip_resume(struct device *dev)
|
||||
{
|
||||
struct rockchip_hdmi *hdmi = dev_get_drvdata(dev);
|
||||
|
||||
pm_runtime_get_sync(dev);
|
||||
dw_hdmi_resume(dev);
|
||||
dw_hdmi_resume(dev, hdmi->hdmi);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -188,8 +188,8 @@ void dw_hdmi_unbind(struct dw_hdmi *hdmi);
|
||||
struct dw_hdmi *dw_hdmi_bind(struct platform_device *pdev,
|
||||
struct drm_encoder *encoder,
|
||||
const struct dw_hdmi_plat_data *plat_data);
|
||||
void dw_hdmi_suspend(struct device *dev);
|
||||
void dw_hdmi_resume(struct device *dev);
|
||||
void dw_hdmi_suspend(struct device *dev, struct dw_hdmi *hdmi);
|
||||
void dw_hdmi_resume(struct device *dev, struct dw_hdmi *hdmi);
|
||||
|
||||
void dw_hdmi_setup_rx_sense(struct dw_hdmi *hdmi, bool hpd, bool rx_sense);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user