Lines Matching full:rdma
52 #define RDMA_FIFO_SIZE(rdma) ((rdma)->data->fifo_size) argument
109 struct mtk_disp_rdma *rdma = dev_get_drvdata(dev); in rdma_update_bits() local
110 unsigned int tmp = readl(rdma->regs + reg); in rdma_update_bits()
113 writel(tmp, rdma->regs + reg); in rdma_update_bits()
120 struct mtk_disp_rdma *rdma = dev_get_drvdata(dev); in mtk_rdma_register_vblank_cb() local
122 rdma->vblank_cb = vblank_cb; in mtk_rdma_register_vblank_cb()
123 rdma->vblank_cb_data = vblank_cb_data; in mtk_rdma_register_vblank_cb()
128 struct mtk_disp_rdma *rdma = dev_get_drvdata(dev); in mtk_rdma_unregister_vblank_cb() local
130 rdma->vblank_cb = NULL; in mtk_rdma_unregister_vblank_cb()
131 rdma->vblank_cb_data = NULL; in mtk_rdma_unregister_vblank_cb()
147 struct mtk_disp_rdma *rdma = dev_get_drvdata(dev); in mtk_rdma_get_formats() local
149 return rdma->data->formats; in mtk_rdma_get_formats()
154 struct mtk_disp_rdma *rdma = dev_get_drvdata(dev); in mtk_rdma_get_num_formats() local
156 return rdma->data->num_formats; in mtk_rdma_get_num_formats()
161 struct mtk_disp_rdma *rdma = dev_get_drvdata(dev); in mtk_rdma_clk_enable() local
163 return clk_prepare_enable(rdma->clk); in mtk_rdma_clk_enable()
168 struct mtk_disp_rdma *rdma = dev_get_drvdata(dev); in mtk_rdma_clk_disable() local
170 clk_disable_unprepare(rdma->clk); in mtk_rdma_clk_disable()
190 struct mtk_disp_rdma *rdma = dev_get_drvdata(dev); in mtk_rdma_config() local
193 mtk_ddp_write_mask(cmdq_pkt, width, &rdma->cmdq_reg, rdma->regs, in mtk_rdma_config()
195 mtk_ddp_write_mask(cmdq_pkt, height, &rdma->cmdq_reg, rdma->regs, in mtk_rdma_config()
198 if (rdma->fifo_size) in mtk_rdma_config()
199 rdma_fifo_size = rdma->fifo_size; in mtk_rdma_config()
201 rdma_fifo_size = RDMA_FIFO_SIZE(rdma); in mtk_rdma_config()
213 mtk_ddp_write(cmdq_pkt, reg, &rdma->cmdq_reg, rdma->regs, DISP_REG_RDMA_FIFO_CON); in mtk_rdma_config()
216 static unsigned int rdma_fmt_convert(struct mtk_disp_rdma *rdma, in rdma_fmt_convert() argument
262 struct mtk_disp_rdma *rdma = dev_get_drvdata(dev); in mtk_rdma_layer_config() local
269 con = rdma_fmt_convert(rdma, fmt); in mtk_rdma_layer_config()
270 mtk_ddp_write_relaxed(cmdq_pkt, con, &rdma->cmdq_reg, rdma->regs, DISP_RDMA_MEM_CON); in mtk_rdma_layer_config()
273 mtk_ddp_write_mask(cmdq_pkt, RDMA_MATRIX_ENABLE, &rdma->cmdq_reg, rdma->regs, in mtk_rdma_layer_config()
277 &rdma->cmdq_reg, rdma->regs, DISP_REG_RDMA_SIZE_CON_0, in mtk_rdma_layer_config()
280 mtk_ddp_write_mask(cmdq_pkt, 0, &rdma->cmdq_reg, rdma->regs, in mtk_rdma_layer_config()
284 mtk_ddp_write_relaxed(cmdq_pkt, addr, &rdma->cmdq_reg, rdma->regs, in mtk_rdma_layer_config()
286 mtk_ddp_write_relaxed(cmdq_pkt, pitch, &rdma->cmdq_reg, rdma->regs, in mtk_rdma_layer_config()
288 mtk_ddp_write(cmdq_pkt, RDMA_MEM_GMC, &rdma->cmdq_reg, rdma->regs, in mtk_rdma_layer_config()
290 mtk_ddp_write_mask(cmdq_pkt, RDMA_MODE_MEMORY, &rdma->cmdq_reg, rdma->regs, in mtk_rdma_layer_config()
331 "failed to get rdma clk\n"); in mtk_disp_rdma_probe()
337 "failed to ioremap rdma\n"); in mtk_disp_rdma_probe()
345 "mediatek,rdma-fifo-size", in mtk_disp_rdma_probe()
348 return dev_err_probe(dev, ret, "Failed to get rdma fifo size\n"); in mtk_disp_rdma_probe()
406 { .compatible = "mediatek,mt2701-disp-rdma",
408 { .compatible = "mediatek,mt8173-disp-rdma",
410 { .compatible = "mediatek,mt8183-disp-rdma",
412 { .compatible = "mediatek,mt8195-disp-rdma",
422 .name = "mediatek-disp-rdma",