FROMLIST: drm: bridge: analogix/dp: add panel prepare/unprepare in suspend/resume time

Turn off the panel power in suspend time would help to reduce
power waste.

(am from https://patchwork.kernel.org/patch/8312971/)

Change-Id: Iac01ac4041a2486e0347ed0377abcc094ab493ea
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
This commit is contained in:
Yakir Yang
2016-02-15 19:11:37 +08:00
committed by Huang, Tao
parent e8eb9f4980
commit 2cf47cc4cf

View File

@@ -1400,6 +1400,12 @@ int analogix_dp_suspend(struct device *dev)
struct analogix_dp_device *dp = dev_get_drvdata(dev);
clk_disable_unprepare(dp->clock);
if (dp->plat_data->panel) {
if (drm_panel_unprepare(dp->plat_data->panel))
DRM_ERROR("failed to turnoff the panel\n");
}
return 0;
}
EXPORT_SYMBOL_GPL(analogix_dp_suspend);
@@ -1415,6 +1421,13 @@ int analogix_dp_resume(struct device *dev)
return ret;
}
if (dp->plat_data->panel) {
if (drm_panel_prepare(dp->plat_data->panel)) {
DRM_ERROR("failed to setup the panel\n");
return -EBUSY;
}
}
return 0;
}
EXPORT_SYMBOL_GPL(analogix_dp_resume);