Skip to content

Commit

Permalink
drm: bridge: analogix/dp: add panel prepare/unprepare in suspend/resu…
Browse files Browse the repository at this point in the history
…me time

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

Tested-by: Caesar Wang <wxt@rock-chips.com>
Tested-by: Douglas Anderson <dianders@chromium.org>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
  • Loading branch information
Yakir Yang committed Apr 5, 2016
1 parent 398a399 commit 211f276
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 211f276

Please sign in to comment.