Skip to content

Commit

Permalink
drm/rockchip: vop: add vop power domain support
Browse files Browse the repository at this point in the history
Reference the power domain incase vop power down when
in use.

Signed-off-by: Mark Yao <yzq@rock-chips.com>
  • Loading branch information
Mark Yao authored and Mark Yao committed Apr 3, 2015
1 parent b340b3f commit 5d82d1a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/gpu/drm/rockchip/rockchip_drm_vop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}

/*
Expand Down

0 comments on commit 5d82d1a

Please sign in to comment.