Lines Matching refs:cursor
79 struct sti_cursor *cursor = to_sti_cursor(layer); in sti_cursor_argb8888_to_clut8() local
81 u8 *dst = cursor->pixmap.base; in sti_cursor_argb8888_to_clut8()
85 for (i = 0; i < cursor->height; i++) { in sti_cursor_argb8888_to_clut8()
86 for (j = 0; j < cursor->width; j++) { in sti_cursor_argb8888_to_clut8()
101 struct sti_cursor *cursor = to_sti_cursor(layer); in sti_cursor_prepare_layer() local
120 if (!cursor->pixmap.base || in sti_cursor_prepare_layer()
121 (cursor->width != layer->src_w) || in sti_cursor_prepare_layer()
122 (cursor->height != layer->src_h)) { in sti_cursor_prepare_layer()
123 cursor->width = layer->src_w; in sti_cursor_prepare_layer()
124 cursor->height = layer->src_h; in sti_cursor_prepare_layer()
126 if (cursor->pixmap.base) in sti_cursor_prepare_layer()
128 cursor->pixmap.size, in sti_cursor_prepare_layer()
129 cursor->pixmap.base, in sti_cursor_prepare_layer()
130 cursor->pixmap.paddr); in sti_cursor_prepare_layer()
132 cursor->pixmap.size = cursor->width * cursor->height; in sti_cursor_prepare_layer()
134 cursor->pixmap.base = dma_alloc_writecombine(layer->dev, in sti_cursor_prepare_layer()
135 cursor->pixmap.size, in sti_cursor_prepare_layer()
136 &cursor->pixmap.paddr, in sti_cursor_prepare_layer()
138 if (!cursor->pixmap.base) { in sti_cursor_prepare_layer()
159 writel(cursor->clut_paddr, layer->regs + CUR_CML); in sti_cursor_prepare_layer()
168 struct sti_cursor *cursor = to_sti_cursor(layer); in sti_cursor_commit_layer() local
175 writel(cursor->pixmap.paddr, layer->regs + CUR_PML); in sti_cursor_commit_layer()
176 writel(cursor->width, layer->regs + CUR_PMP); in sti_cursor_commit_layer()
177 writel(cursor->height << 16 | cursor->width, layer->regs + CUR_SIZE); in sti_cursor_commit_layer()
193 struct sti_cursor *cursor = to_sti_cursor(layer); in sti_cursor_init() local
194 unsigned short *base = cursor->clut; in sti_cursor_init()
219 struct sti_cursor *cursor; in sti_cursor_create() local
221 cursor = devm_kzalloc(dev, sizeof(*cursor), GFP_KERNEL); in sti_cursor_create()
222 if (!cursor) { in sti_cursor_create()
228 cursor->clut = dma_alloc_writecombine(dev, in sti_cursor_create()
230 &cursor->clut_paddr, in sti_cursor_create()
233 if (!cursor->clut) { in sti_cursor_create()
235 devm_kfree(dev, cursor); in sti_cursor_create()
239 cursor->layer.ops = &cursor_ops; in sti_cursor_create()
241 return (struct sti_layer *)cursor; in sti_cursor_create()