g2d               262 drivers/gpu/drm/exynos/exynos_drm_g2d.c static inline void g2d_hw_reset(struct g2d_data *g2d)
g2d               264 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	writel(G2D_R | G2D_SFRCLEAR, g2d->regs + G2D_SOFT_RESET);
g2d               265 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	clear_bit(G2D_BIT_ENGINE_BUSY, &g2d->flags);
g2d               268 drivers/gpu/drm/exynos/exynos_drm_g2d.c static int g2d_init_cmdlist(struct g2d_data *g2d)
g2d               270 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	struct device *dev = g2d->dev;
g2d               276 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	g2d->cmdlist_dma_attrs = DMA_ATTR_WRITE_COMBINE;
g2d               278 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	g2d->cmdlist_pool_virt = dma_alloc_attrs(to_dma_dev(g2d->drm_dev),
g2d               280 drivers/gpu/drm/exynos/exynos_drm_g2d.c 						&g2d->cmdlist_pool, GFP_KERNEL,
g2d               281 drivers/gpu/drm/exynos/exynos_drm_g2d.c 						g2d->cmdlist_dma_attrs);
g2d               282 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	if (!g2d->cmdlist_pool_virt) {
g2d               297 drivers/gpu/drm/exynos/exynos_drm_g2d.c 			g2d->cmdlist_pool_virt + nr * G2D_CMDLIST_SIZE;
g2d               299 drivers/gpu/drm/exynos/exynos_drm_g2d.c 			g2d->cmdlist_pool + nr * G2D_CMDLIST_SIZE;
g2d               305 drivers/gpu/drm/exynos/exynos_drm_g2d.c 		list_add_tail(&node[nr].list, &g2d->free_cmdlist);
g2d               311 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	dma_free_attrs(to_dma_dev(g2d->drm_dev), G2D_CMDLIST_POOL_SIZE,
g2d               312 drivers/gpu/drm/exynos/exynos_drm_g2d.c 			g2d->cmdlist_pool_virt,
g2d               313 drivers/gpu/drm/exynos/exynos_drm_g2d.c 			g2d->cmdlist_pool, g2d->cmdlist_dma_attrs);
g2d               317 drivers/gpu/drm/exynos/exynos_drm_g2d.c static void g2d_fini_cmdlist(struct g2d_data *g2d)
g2d               319 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	kfree(g2d->cmdlist_node);
g2d               321 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	if (g2d->cmdlist_pool_virt && g2d->cmdlist_pool) {
g2d               322 drivers/gpu/drm/exynos/exynos_drm_g2d.c 		dma_free_attrs(to_dma_dev(g2d->drm_dev),
g2d               324 drivers/gpu/drm/exynos/exynos_drm_g2d.c 				g2d->cmdlist_pool_virt,
g2d               325 drivers/gpu/drm/exynos/exynos_drm_g2d.c 				g2d->cmdlist_pool, g2d->cmdlist_dma_attrs);
g2d               329 drivers/gpu/drm/exynos/exynos_drm_g2d.c static struct g2d_cmdlist_node *g2d_get_cmdlist(struct g2d_data *g2d)
g2d               331 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	struct device *dev = g2d->dev;
g2d               334 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	mutex_lock(&g2d->cmdlist_mutex);
g2d               335 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	if (list_empty(&g2d->free_cmdlist)) {
g2d               337 drivers/gpu/drm/exynos/exynos_drm_g2d.c 		mutex_unlock(&g2d->cmdlist_mutex);
g2d               341 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	node = list_first_entry(&g2d->free_cmdlist, struct g2d_cmdlist_node,
g2d               344 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	mutex_unlock(&g2d->cmdlist_mutex);
g2d               349 drivers/gpu/drm/exynos/exynos_drm_g2d.c static void g2d_put_cmdlist(struct g2d_data *g2d, struct g2d_cmdlist_node *node)
g2d               351 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	mutex_lock(&g2d->cmdlist_mutex);
g2d               352 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	list_move_tail(&node->list, &g2d->free_cmdlist);
g2d               353 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	mutex_unlock(&g2d->cmdlist_mutex);
g2d               376 drivers/gpu/drm/exynos/exynos_drm_g2d.c static void g2d_userptr_put_dma_addr(struct g2d_data *g2d,
g2d               398 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	dma_unmap_sg(to_dma_dev(g2d->drm_dev), g2d_userptr->sgt->sgl,
g2d               419 drivers/gpu/drm/exynos/exynos_drm_g2d.c static dma_addr_t *g2d_userptr_get_dma_addr(struct g2d_data *g2d,
g2d               433 drivers/gpu/drm/exynos/exynos_drm_g2d.c 		DRM_DEV_ERROR(g2d->dev, "invalid userptr size.\n");
g2d               486 drivers/gpu/drm/exynos/exynos_drm_g2d.c 		DRM_DEV_ERROR(g2d->dev,
g2d               508 drivers/gpu/drm/exynos/exynos_drm_g2d.c 		DRM_DEV_ERROR(g2d->dev, "failed to get sgt from pages.\n");
g2d               514 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	if (!dma_map_sg(to_dma_dev(g2d->drm_dev), sgt->sgl, sgt->nents,
g2d               516 drivers/gpu/drm/exynos/exynos_drm_g2d.c 		DRM_DEV_ERROR(g2d->dev, "failed to map sgt with dma region.\n");
g2d               526 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	if (g2d->current_pool + (npages << PAGE_SHIFT) < g2d->max_pool) {
g2d               527 drivers/gpu/drm/exynos/exynos_drm_g2d.c 		g2d->current_pool += npages << PAGE_SHIFT;
g2d               553 drivers/gpu/drm/exynos/exynos_drm_g2d.c static void g2d_userptr_free_all(struct g2d_data *g2d, struct drm_file *filp)
g2d               560 drivers/gpu/drm/exynos/exynos_drm_g2d.c 			g2d_userptr_put_dma_addr(g2d, g2d_userptr, true);
g2d               562 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	g2d->current_pool = 0;
g2d               565 drivers/gpu/drm/exynos/exynos_drm_g2d.c static enum g2d_reg_type g2d_get_reg_type(struct g2d_data *g2d, int reg_offset)
g2d               598 drivers/gpu/drm/exynos/exynos_drm_g2d.c 		DRM_DEV_ERROR(g2d->dev, "Unknown register offset![%d]\n",
g2d               633 drivers/gpu/drm/exynos/exynos_drm_g2d.c static bool g2d_check_buf_desc_is_valid(struct g2d_data *g2d,
g2d               651 drivers/gpu/drm/exynos/exynos_drm_g2d.c 		DRM_DEV_ERROR(g2d->dev, "width[%d] is out of range!\n", width);
g2d               658 drivers/gpu/drm/exynos/exynos_drm_g2d.c 		DRM_DEV_ERROR(g2d->dev,
g2d               678 drivers/gpu/drm/exynos/exynos_drm_g2d.c 		DRM_DEV_ERROR(g2d->dev, "last engine access position [%lu] "
g2d               686 drivers/gpu/drm/exynos/exynos_drm_g2d.c static int g2d_map_cmdlist_gem(struct g2d_data *g2d,
g2d               709 drivers/gpu/drm/exynos/exynos_drm_g2d.c 		reg_type = g2d_get_reg_type(g2d, offset);
g2d               726 drivers/gpu/drm/exynos/exynos_drm_g2d.c 			if (!g2d_check_buf_desc_is_valid(g2d, buf_desc,
g2d               744 drivers/gpu/drm/exynos/exynos_drm_g2d.c 			if (!g2d_check_buf_desc_is_valid(g2d, buf_desc,
g2d               751 drivers/gpu/drm/exynos/exynos_drm_g2d.c 			addr = g2d_userptr_get_dma_addr(g2d,
g2d               773 drivers/gpu/drm/exynos/exynos_drm_g2d.c static void g2d_unmap_cmdlist_gem(struct g2d_data *g2d,
g2d               793 drivers/gpu/drm/exynos/exynos_drm_g2d.c 			g2d_userptr_put_dma_addr(g2d, obj, false);
g2d               804 drivers/gpu/drm/exynos/exynos_drm_g2d.c static void g2d_dma_start(struct g2d_data *g2d,
g2d               811 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	set_bit(G2D_BIT_ENGINE_BUSY, &g2d->flags);
g2d               812 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	writel_relaxed(node->dma_addr, g2d->regs + G2D_DMA_SFR_BASE_ADDR);
g2d               813 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	writel_relaxed(G2D_DMA_START, g2d->regs + G2D_DMA_COMMAND);
g2d               816 drivers/gpu/drm/exynos/exynos_drm_g2d.c static struct g2d_runqueue_node *g2d_get_runqueue_node(struct g2d_data *g2d)
g2d               820 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	if (list_empty(&g2d->runqueue))
g2d               823 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	runqueue_node = list_first_entry(&g2d->runqueue,
g2d               829 drivers/gpu/drm/exynos/exynos_drm_g2d.c static void g2d_free_runqueue_node(struct g2d_data *g2d,
g2d               834 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	mutex_lock(&g2d->cmdlist_mutex);
g2d               840 drivers/gpu/drm/exynos/exynos_drm_g2d.c 		g2d_unmap_cmdlist_gem(g2d, node, runqueue_node->filp);
g2d               841 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	list_splice_tail_init(&runqueue_node->run_cmdlist, &g2d->free_cmdlist);
g2d               842 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	mutex_unlock(&g2d->cmdlist_mutex);
g2d               844 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	kmem_cache_free(g2d->runqueue_slab, runqueue_node);
g2d               854 drivers/gpu/drm/exynos/exynos_drm_g2d.c static void g2d_remove_runqueue_nodes(struct g2d_data *g2d, struct drm_file *file)
g2d               858 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	if (list_empty(&g2d->runqueue))
g2d               861 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	list_for_each_entry_safe(node, n, &g2d->runqueue, list) {
g2d               866 drivers/gpu/drm/exynos/exynos_drm_g2d.c 		g2d_free_runqueue_node(g2d, node);
g2d               872 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	struct g2d_data *g2d = container_of(work, struct g2d_data,
g2d               880 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	if (test_bit(G2D_BIT_ENGINE_BUSY, &g2d->flags))
g2d               883 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	mutex_lock(&g2d->runqueue_mutex);
g2d               885 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	runqueue_node = g2d->runqueue_node;
g2d               886 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	g2d->runqueue_node = NULL;
g2d               889 drivers/gpu/drm/exynos/exynos_drm_g2d.c 		pm_runtime_mark_last_busy(g2d->dev);
g2d               890 drivers/gpu/drm/exynos/exynos_drm_g2d.c 		pm_runtime_put_autosuspend(g2d->dev);
g2d               894 drivers/gpu/drm/exynos/exynos_drm_g2d.c 			g2d_free_runqueue_node(g2d, runqueue_node);
g2d               897 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	if (!test_bit(G2D_BIT_SUSPEND_RUNQUEUE, &g2d->flags)) {
g2d               898 drivers/gpu/drm/exynos/exynos_drm_g2d.c 		g2d->runqueue_node = g2d_get_runqueue_node(g2d);
g2d               900 drivers/gpu/drm/exynos/exynos_drm_g2d.c 		if (g2d->runqueue_node) {
g2d               901 drivers/gpu/drm/exynos/exynos_drm_g2d.c 			pm_runtime_get_sync(g2d->dev);
g2d               902 drivers/gpu/drm/exynos/exynos_drm_g2d.c 			g2d_dma_start(g2d, g2d->runqueue_node);
g2d               906 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	mutex_unlock(&g2d->runqueue_mutex);
g2d               909 drivers/gpu/drm/exynos/exynos_drm_g2d.c static void g2d_finish_event(struct g2d_data *g2d, u32 cmdlist_no)
g2d               911 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	struct drm_device *drm_dev = g2d->drm_dev;
g2d               912 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	struct g2d_runqueue_node *runqueue_node = g2d->runqueue_node;
g2d               932 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	struct g2d_data *g2d = dev_id;
g2d               935 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	pending = readl_relaxed(g2d->regs + G2D_INTC_PEND);
g2d               937 drivers/gpu/drm/exynos/exynos_drm_g2d.c 		writel_relaxed(pending, g2d->regs + G2D_INTC_PEND);
g2d               940 drivers/gpu/drm/exynos/exynos_drm_g2d.c 		u32 cmdlist_no = readl_relaxed(g2d->regs + G2D_DMA_STATUS);
g2d               945 drivers/gpu/drm/exynos/exynos_drm_g2d.c 		g2d_finish_event(g2d, cmdlist_no);
g2d               947 drivers/gpu/drm/exynos/exynos_drm_g2d.c 		writel_relaxed(0, g2d->regs + G2D_DMA_HOLD_CMD);
g2d               950 drivers/gpu/drm/exynos/exynos_drm_g2d.c 					g2d->regs + G2D_DMA_COMMAND);
g2d               955 drivers/gpu/drm/exynos/exynos_drm_g2d.c 		clear_bit(G2D_BIT_ENGINE_BUSY, &g2d->flags);
g2d               956 drivers/gpu/drm/exynos/exynos_drm_g2d.c 		queue_work(g2d->g2d_workq, &g2d->runqueue_work);
g2d               971 drivers/gpu/drm/exynos/exynos_drm_g2d.c static void g2d_wait_finish(struct g2d_data *g2d, struct drm_file *file)
g2d               973 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	struct device *dev = g2d->dev;
g2d               978 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	mutex_lock(&g2d->runqueue_mutex);
g2d               981 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	if (!g2d->runqueue_node)
g2d               984 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	runqueue_node = g2d->runqueue_node;
g2d               990 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	mutex_unlock(&g2d->runqueue_mutex);
g2d               993 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	while (tries-- && (g2d->runqueue_node == runqueue_node))
g2d               996 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	mutex_lock(&g2d->runqueue_mutex);
g2d               998 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	if (g2d->runqueue_node != runqueue_node)
g2d              1002 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	g2d_hw_reset(g2d);
g2d              1014 drivers/gpu/drm/exynos/exynos_drm_g2d.c 		g2d_free_runqueue_node(g2d, runqueue_node);
g2d              1017 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	mutex_unlock(&g2d->runqueue_mutex);
g2d              1020 drivers/gpu/drm/exynos/exynos_drm_g2d.c static int g2d_check_reg_offset(struct g2d_data *g2d,
g2d              1053 drivers/gpu/drm/exynos/exynos_drm_g2d.c 			reg_type = g2d_get_reg_type(g2d, reg_offset);
g2d              1067 drivers/gpu/drm/exynos/exynos_drm_g2d.c 			reg_type = g2d_get_reg_type(g2d, reg_offset);
g2d              1077 drivers/gpu/drm/exynos/exynos_drm_g2d.c 			reg_type = g2d_get_reg_type(g2d, reg_offset);
g2d              1089 drivers/gpu/drm/exynos/exynos_drm_g2d.c 			reg_type = g2d_get_reg_type(g2d, reg_offset);
g2d              1102 drivers/gpu/drm/exynos/exynos_drm_g2d.c 			reg_type = g2d_get_reg_type(g2d, reg_offset);
g2d              1120 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	dev_err(g2d->dev, "Bad register offset: 0x%lx\n", cmdlist->data[index]);
g2d              1141 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	struct g2d_data *g2d = dev_get_drvdata(priv->g2d_dev);
g2d              1150 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	node = g2d_get_cmdlist(g2d);
g2d              1161 drivers/gpu/drm/exynos/exynos_drm_g2d.c 		dev_err(g2d->dev, "number of submitted G2D commands exceeds limit\n");
g2d              1229 drivers/gpu/drm/exynos/exynos_drm_g2d.c 		dev_err(g2d->dev, "cmdlist size is too big\n");
g2d              1244 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	ret = g2d_check_reg_offset(g2d, node, req->cmd_nr, false);
g2d              1263 drivers/gpu/drm/exynos/exynos_drm_g2d.c 		ret = g2d_check_reg_offset(g2d, node, req->cmd_buf_nr, true);
g2d              1267 drivers/gpu/drm/exynos/exynos_drm_g2d.c 		ret = g2d_map_cmdlist_gem(g2d, node, drm_dev, file);
g2d              1286 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	g2d_unmap_cmdlist_gem(g2d, node, file);
g2d              1291 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	g2d_put_cmdlist(g2d, node);
g2d              1300 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	struct g2d_data *g2d = dev_get_drvdata(priv->g2d_dev);
g2d              1306 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	runqueue_node = kmem_cache_alloc(g2d->runqueue_slab, GFP_KERNEL);
g2d              1321 drivers/gpu/drm/exynos/exynos_drm_g2d.c 		dev_err(g2d->dev, "there is no inuse cmdlist\n");
g2d              1322 drivers/gpu/drm/exynos/exynos_drm_g2d.c 		kmem_cache_free(g2d->runqueue_slab, runqueue_node);
g2d              1326 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	mutex_lock(&g2d->runqueue_mutex);
g2d              1329 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	list_add_tail(&runqueue_node->list, &g2d->runqueue);
g2d              1330 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	mutex_unlock(&g2d->runqueue_mutex);
g2d              1333 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	queue_work(g2d->g2d_workq, &g2d->runqueue_work);
g2d              1339 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	g2d_free_runqueue_node(g2d, runqueue_node);
g2d              1360 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	struct g2d_data *g2d;
g2d              1366 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	g2d = dev_get_drvdata(priv->g2d_dev);
g2d              1369 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	mutex_lock(&g2d->runqueue_mutex);
g2d              1370 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	g2d_remove_runqueue_nodes(g2d, file);
g2d              1371 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	mutex_unlock(&g2d->runqueue_mutex);
g2d              1378 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	g2d_wait_finish(g2d, file);
g2d              1386 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	mutex_lock(&g2d->cmdlist_mutex);
g2d              1388 drivers/gpu/drm/exynos/exynos_drm_g2d.c 		g2d_unmap_cmdlist_gem(g2d, node, file);
g2d              1389 drivers/gpu/drm/exynos/exynos_drm_g2d.c 		list_move_tail(&node->list, &g2d->free_cmdlist);
g2d              1391 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	mutex_unlock(&g2d->cmdlist_mutex);
g2d              1394 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	g2d_userptr_free_all(g2d, file);
g2d              1399 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	struct g2d_data *g2d = dev_get_drvdata(dev);
g2d              1404 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	g2d->drm_dev = drm_dev;
g2d              1407 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	ret = g2d_init_cmdlist(g2d);
g2d              1413 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	ret = exynos_drm_register_dma(drm_dev, dev, &g2d->dma_priv);
g2d              1416 drivers/gpu/drm/exynos/exynos_drm_g2d.c 		g2d_fini_cmdlist(g2d);
g2d              1428 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	struct g2d_data *g2d = dev_get_drvdata(dev);
g2d              1433 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	set_bit(G2D_BIT_SUSPEND_RUNQUEUE, &g2d->flags);
g2d              1434 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	g2d_wait_finish(g2d, NULL);
g2d              1437 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	cancel_work_sync(&g2d->runqueue_work);
g2d              1438 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	exynos_drm_unregister_dma(g2d->drm_dev, dev, &g2d->dma_priv);
g2d              1450 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	struct g2d_data *g2d;
g2d              1453 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	g2d = devm_kzalloc(dev, sizeof(*g2d), GFP_KERNEL);
g2d              1454 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	if (!g2d)
g2d              1457 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	g2d->runqueue_slab = kmem_cache_create("g2d_runqueue_slab",
g2d              1459 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	if (!g2d->runqueue_slab)
g2d              1462 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	g2d->dev = dev;
g2d              1464 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	g2d->g2d_workq = create_singlethread_workqueue("g2d");
g2d              1465 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	if (!g2d->g2d_workq) {
g2d              1471 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	INIT_WORK(&g2d->runqueue_work, g2d_runqueue_worker);
g2d              1472 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	INIT_LIST_HEAD(&g2d->free_cmdlist);
g2d              1473 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	INIT_LIST_HEAD(&g2d->runqueue);
g2d              1475 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	mutex_init(&g2d->cmdlist_mutex);
g2d              1476 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	mutex_init(&g2d->runqueue_mutex);
g2d              1478 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	g2d->gate_clk = devm_clk_get(dev, "fimg2d");
g2d              1479 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	if (IS_ERR(g2d->gate_clk)) {
g2d              1481 drivers/gpu/drm/exynos/exynos_drm_g2d.c 		ret = PTR_ERR(g2d->gate_clk);
g2d              1488 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	clear_bit(G2D_BIT_SUSPEND_RUNQUEUE, &g2d->flags);
g2d              1489 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	clear_bit(G2D_BIT_ENGINE_BUSY, &g2d->flags);
g2d              1493 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	g2d->regs = devm_ioremap_resource(dev, res);
g2d              1494 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	if (IS_ERR(g2d->regs)) {
g2d              1495 drivers/gpu/drm/exynos/exynos_drm_g2d.c 		ret = PTR_ERR(g2d->regs);
g2d              1499 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	g2d->irq = platform_get_irq(pdev, 0);
g2d              1500 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	if (g2d->irq < 0) {
g2d              1502 drivers/gpu/drm/exynos/exynos_drm_g2d.c 		ret = g2d->irq;
g2d              1506 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	ret = devm_request_irq(dev, g2d->irq, g2d_irq_handler, 0,
g2d              1507 drivers/gpu/drm/exynos/exynos_drm_g2d.c 								"drm_g2d", g2d);
g2d              1513 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	g2d->max_pool = MAX_POOL;
g2d              1515 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	platform_set_drvdata(pdev, g2d);
g2d              1528 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	destroy_workqueue(g2d->g2d_workq);
g2d              1530 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	kmem_cache_destroy(g2d->runqueue_slab);
g2d              1536 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	struct g2d_data *g2d = platform_get_drvdata(pdev);
g2d              1541 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	g2d_remove_runqueue_nodes(g2d, NULL);
g2d              1546 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	g2d_fini_cmdlist(g2d);
g2d              1547 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	destroy_workqueue(g2d->g2d_workq);
g2d              1548 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	kmem_cache_destroy(g2d->runqueue_slab);
g2d              1556 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	struct g2d_data *g2d = dev_get_drvdata(dev);
g2d              1562 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	set_bit(G2D_BIT_SUSPEND_RUNQUEUE, &g2d->flags);
g2d              1563 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	g2d_wait_finish(g2d, NULL);
g2d              1564 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	flush_work(&g2d->runqueue_work);
g2d              1571 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	struct g2d_data *g2d = dev_get_drvdata(dev);
g2d              1573 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	clear_bit(G2D_BIT_SUSPEND_RUNQUEUE, &g2d->flags);
g2d              1574 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	queue_work(g2d->g2d_workq, &g2d->runqueue_work);
g2d              1583 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	struct g2d_data *g2d = dev_get_drvdata(dev);
g2d              1585 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	clk_disable_unprepare(g2d->gate_clk);
g2d              1592 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	struct g2d_data *g2d = dev_get_drvdata(dev);
g2d              1595 drivers/gpu/drm/exynos/exynos_drm_g2d.c 	ret = clk_prepare_enable(g2d->gate_clk);