Exemplo n.º 1
0
static int fimg2d_runtime_suspend(struct device *dev)
{
	fimg2d_debug("runtime suspend... done\n");
	if (ip_is_g2d_5h() || ip_is_g2d_5hp())
		exynos5433_fimg2d_clk_set_osc(ctrl);
	return 0;
}
Exemplo n.º 2
0
void fimg2d_power_control(struct fimg2d_control *ctrl, enum fimg2d_pw_status status)
{
	if (status == FIMG2D_PW_ON) {
		if (ip_is_g2d_5h() || ip_is_g2d_5hp() || ip_is_g2d_7i()) {
			pm_runtime_get_sync(ctrl->dev);
			fimg2d_debug("Done pm_runtime_get_sync()\n");
		}
	} else if (status == FIMG2D_PW_OFF) {
		if (ip_is_g2d_5h() || ip_is_g2d_5hp())
			exynos5433_fimg2d_clk_set_osc(ctrl);
		if (ip_is_g2d_5h() || ip_is_g2d_5hp() || ip_is_g2d_7i()){
			pm_runtime_put_sync(ctrl->dev);
			fimg2d_debug("Done pm_runtime_put_sync()\n");
		}
	} else
		fimg2d_debug("status failed : %d\n", status);
}
Exemplo n.º 3
0
static int fimg2d_suspend(struct device *dev)
{
	unsigned long flags;
	int retry = POLL_RETRY;

	g2d_spin_lock(&ctrl->bltlock, flags);
	atomic_set(&ctrl->suspended, 1);
	g2d_spin_unlock(&ctrl->bltlock, flags);
	while (retry--) {
		if (fimg2d_queue_is_empty(&ctrl->cmd_q))
			break;
		mdelay(POLL_TIMEOUT);
	}
	if (ip_is_g2d_5h() || ip_is_g2d_5hp())
		exynos5433_fimg2d_clk_set_osc(ctrl);
	fimg2d_info("suspend... done\n");
	return 0;
}