Lines Matching full:rot

35 #define rot_read(offset)	readl(rot->regs + (offset))
36 #define rot_write(cfg, offset) writel(cfg, rot->regs + (offset))
68 static void rotator_reg_set_irq(struct rot_context *rot, bool enable) in rotator_reg_set_irq() argument
80 static enum rot_irq_status rotator_reg_get_irq_status(struct rot_context *rot) in rotator_reg_get_irq_status() argument
94 struct rot_context *rot = arg; in rotator_irq_handler() local
99 irq_status = rotator_reg_get_irq_status(rot); in rotator_irq_handler()
106 if (rot->task) { in rotator_irq_handler()
107 struct exynos_drm_ipp_task *task = rot->task; in rotator_irq_handler()
109 rot->task = NULL; in rotator_irq_handler()
110 pm_runtime_mark_last_busy(rot->dev); in rotator_irq_handler()
111 pm_runtime_put_autosuspend(rot->dev); in rotator_irq_handler()
119 static void rotator_src_set_fmt(struct rot_context *rot, u32 fmt) in rotator_src_set_fmt() argument
138 static void rotator_src_set_buf(struct rot_context *rot, in rotator_src_set_buf() argument
160 static void rotator_dst_set_transf(struct rot_context *rot, in rotator_dst_set_transf() argument
186 static void rotator_dst_set_buf(struct rot_context *rot, in rotator_dst_set_buf() argument
205 static void rotator_start(struct rot_context *rot) in rotator_start() argument
210 rotator_reg_set_irq(rot, true); in rotator_start()
220 struct rot_context *rot = in rotator_commit() local
224 ret = pm_runtime_resume_and_get(rot->dev); in rotator_commit()
226 dev_err(rot->dev, "failed to enable ROTATOR device.\n"); in rotator_commit()
229 rot->task = task; in rotator_commit()
231 rotator_src_set_fmt(rot, task->src.buf.fourcc); in rotator_commit()
232 rotator_src_set_buf(rot, &task->src); in rotator_commit()
233 rotator_dst_set_transf(rot, task->transform.rotation); in rotator_commit()
234 rotator_dst_set_buf(rot, &task->dst); in rotator_commit()
235 rotator_start(rot); in rotator_commit()
246 struct rot_context *rot = dev_get_drvdata(dev); in rotator_bind() local
248 struct exynos_drm_ipp *ipp = &rot->ipp; in rotator_bind()
250 rot->drm_dev = drm_dev; in rotator_bind()
252 exynos_drm_register_dma(drm_dev, dev, &rot->dma_priv); in rotator_bind()
256 rot->formats, rot->num_formats, "rotator"); in rotator_bind()
266 struct rot_context *rot = dev_get_drvdata(dev); in rotator_unbind() local
267 struct exynos_drm_ipp *ipp = &rot->ipp; in rotator_unbind()
270 exynos_drm_unregister_dma(rot->drm_dev, rot->dev, &rot->dma_priv); in rotator_unbind()
281 struct rot_context *rot; in rotator_probe() local
286 rot = devm_kzalloc(dev, sizeof(*rot), GFP_KERNEL); in rotator_probe()
287 if (!rot) in rotator_probe()
291 rot->formats = variant->formats; in rotator_probe()
292 rot->num_formats = variant->num_formats; in rotator_probe()
293 rot->dev = dev; in rotator_probe()
294 rot->regs = devm_platform_ioremap_resource(pdev, 0); in rotator_probe()
295 if (IS_ERR(rot->regs)) in rotator_probe()
296 return PTR_ERR(rot->regs); in rotator_probe()
303 rot); in rotator_probe()
309 rot->clock = devm_clk_get(dev, "rotator"); in rotator_probe()
310 if (IS_ERR(rot->clock)) { in rotator_probe()
312 return PTR_ERR(rot->clock); in rotator_probe()
318 platform_set_drvdata(pdev, rot); in rotator_probe()
343 struct rot_context *rot = dev_get_drvdata(dev); in rotator_runtime_suspend() local
345 clk_disable_unprepare(rot->clock); in rotator_runtime_suspend()
351 struct rot_context *rot = dev_get_drvdata(dev); in rotator_runtime_resume() local
353 return clk_prepare_enable(rot->clock); in rotator_runtime_resume()