Example #1
0
static int fimg2d_runtime_resume(struct device *dev)
{
	int ret = 0;

	if (ip_is_g2d_5r()) {
		ret = fimg2d_clk_set_gate(ctrl);
		if (ret) {
			fimg2d_err("failed to fimg2d_clk_set_gate()\n");
			ret = -ENOENT;
		}
	} else if (ip_is_g2d_5h() || ip_is_g2d_5hp()) {
		ret = exynos5430_fimg2d_clk_set(ctrl);
		if (ret) {
			fimg2d_err("failed to exynos5430_fimg2d_clk_set()\n");
			ret = -ENOENT;
		}
	}

	fimg2d_debug("runtime resume... done\n");
	return ret;
}
Example #2
0
static int fimg2d_resume(struct device *dev)
{
	unsigned long flags;
	int ret = 0;

	g2d_spin_lock(&ctrl->bltlock, flags);
	atomic_set(&ctrl->suspended, 0);
	g2d_spin_unlock(&ctrl->bltlock, flags);
	/* G2D clk gating mask */
	if (ip_is_g2d_5ar2()) {
		fimg2d_clk_on(ctrl);
		fimg2d_clk_off(ctrl);
	} else if (ip_is_g2d_5hp()) {
		ret = exynos5430_fimg2d_clk_set(ctrl);
		if (ret) {
			fimg2d_err("failed to exynos5430_fimg2d_clk_set()\n");
			return -ENOENT;
		}
	}
	fimg2d_info("resume... done\n");
	return ret;
}