Beispiel #1
0
static void g2d_runqueue_worker(struct work_struct *work)
{
	struct g2d_data *g2d = container_of(work, struct g2d_data,
					    runqueue_work);

	pm_qos_update_request(&g2d->pm_qos, 0);

	mutex_lock(&g2d->runqueue_mutex);
	clk_disable(g2d->gate_clk);
	pm_runtime_put_sync(g2d->dev);

	/* if async mode, do not call complete. */
	if (!g2d->runqueue_node->async)
		complete(&g2d->runqueue_node->complete);

	/*
	 * if async mode, run_cmdlist of runqueue_node is not freed
	 * at exynos_g2d_exec_ioctl once complete because wait_for_completion
	 * wasn't called there so free it here.
	 */
	if (g2d->runqueue_node->async)
		g2d_free_runqueue_node(g2d, g2d->runqueue_node);

	if (g2d->suspended)
		g2d->runqueue_node = NULL;
	else
		g2d_exec_runqueue(g2d);
	mutex_unlock(&g2d->runqueue_mutex);
}
static void g2d_runqueue_worker(struct work_struct *work)
{
	struct g2d_data *g2d = container_of(work, struct g2d_data,
					    runqueue_work);

	pm_qos_update_request(&g2d->pm_qos, 0);

	mutex_lock(&g2d->runqueue_mutex);
	clk_disable(g2d->gate_clk);
	pm_runtime_put_sync(g2d->dev);

	complete(&g2d->runqueue_node->complete);
	if (g2d->runqueue_node->async)
		g2d_free_runqueue_node(g2d, g2d->runqueue_node);

	if (g2d->suspended)
		g2d->runqueue_node = NULL;
	else
		g2d_exec_runqueue(g2d);
	mutex_unlock(&g2d->runqueue_mutex);
}