Commit 89f8b85e authored by Inki Dae's avatar Inki Dae Committed by Inki Dae

drm/exynos: consider common clock framework to g2d driver.

This patch just changes clk_enable/disable to
clk_prepare_enable/clk_disable_unprepare, and
adds related exception codes.
Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
parent de1d3677
...@@ -806,9 +806,20 @@ static void g2d_dma_start(struct g2d_data *g2d, ...@@ -806,9 +806,20 @@ static void g2d_dma_start(struct g2d_data *g2d,
struct g2d_cmdlist_node *node = struct g2d_cmdlist_node *node =
list_first_entry(&runqueue_node->run_cmdlist, list_first_entry(&runqueue_node->run_cmdlist,
struct g2d_cmdlist_node, list); struct g2d_cmdlist_node, list);
int ret;
ret = pm_runtime_get_sync(g2d->dev);
if (ret < 0) {
dev_warn(g2d->dev, "failed pm power on.\n");
return;
}
pm_runtime_get_sync(g2d->dev); ret = clk_prepare_enable(g2d->gate_clk);
clk_enable(g2d->gate_clk); if (ret < 0) {
dev_warn(g2d->dev, "failed to enable clock.\n");
pm_runtime_put_sync(g2d->dev);
return;
}
writel_relaxed(node->dma_addr, g2d->regs + G2D_DMA_SFR_BASE_ADDR); writel_relaxed(node->dma_addr, g2d->regs + G2D_DMA_SFR_BASE_ADDR);
writel_relaxed(G2D_DMA_START, g2d->regs + G2D_DMA_COMMAND); writel_relaxed(G2D_DMA_START, g2d->regs + G2D_DMA_COMMAND);
...@@ -861,7 +872,7 @@ static void g2d_runqueue_worker(struct work_struct *work) ...@@ -861,7 +872,7 @@ static void g2d_runqueue_worker(struct work_struct *work)
runqueue_work); runqueue_work);
mutex_lock(&g2d->runqueue_mutex); mutex_lock(&g2d->runqueue_mutex);
clk_disable(g2d->gate_clk); clk_disable_unprepare(g2d->gate_clk);
pm_runtime_put_sync(g2d->dev); pm_runtime_put_sync(g2d->dev);
complete(&g2d->runqueue_node->complete); complete(&g2d->runqueue_node->complete);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment