diff options
author | Mark Yao <yzq@rock-chips.com> | 2015-04-01 05:48:53 (GMT) |
---|---|---|
committer | Mark Yao <mark.yao@rock-chips.com> | 2015-04-03 06:23:36 (GMT) |
commit | 5d82d1a785155fe4ff65628a88b677cfacea863b (patch) | |
tree | 3c12d30f49c9ebd33c3eac44a1efc358bdb26581 | |
parent | b340b3fb71473291ea924a47e0069828c83da729 (diff) | |
download | linux-5d82d1a785155fe4ff65628a88b677cfacea863b.tar.xz |
drm/rockchip: vop: add vop power domain support
Reference the power domain incase vop power down when
in use.
Signed-off-by: Mark Yao <yzq@rock-chips.com>
-rw-r--r-- | drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index 6115898..ccb0ce0 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c @@ -421,6 +421,12 @@ static void vop_enable(struct drm_crtc *crtc) if (vop->is_enabled) return; + ret = pm_runtime_get_sync(vop->dev); + if (ret < 0) { + dev_err(vop->dev, "failed to get pm runtime: %d\n", ret); + return; + } + ret = clk_enable(vop->hclk); if (ret < 0) { dev_err(vop->dev, "failed to enable hclk - %d\n", ret); @@ -517,6 +523,7 @@ static void vop_disable(struct drm_crtc *crtc) clk_disable(vop->dclk); clk_disable(vop->aclk); clk_disable(vop->hclk); + pm_runtime_put(vop->dev); } /* |