Lines Matching +full:data +full:- +full:mirror

1 // SPDX-License-Identifier: GPL-2.0-only
3 * linux/arch/arm/mach-omap1/lcd_dma.c
5 * Extracted from arch/arm/plat-omap/dma.c
6 * Copyright (C) 2003 - 2008 Nokia Corporation
11 * OMAP2/3 support Copyright (C) 2004-2007 Texas Instruments, Inc.
13 * Some functions based on earlier dma-omap.c Copyright (C) 2001 RidgeRun, Inc.
16 * Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@ti.com>
26 #include <linux/omap-dma.h>
28 #include <linux/soc/ti/omap1-soc.h>
29 #include <linux/soc/ti/omap1-io.h>
55 void (*callback)(u16 status, void *data);
62 int mirror; member
102 void omap_set_lcd_dma_b1_mirror(int mirror) in omap_set_lcd_dma_b1_mirror() argument
105 printk(KERN_ERR "DMA mirror is not supported in 1510 mode\n"); in omap_set_lcd_dma_b1_mirror()
108 lcd_dma.mirror = mirror; in omap_set_lcd_dma_b1_mirror()
165 #define PIXSTEP(sx, sy, dx, dy) (PIXADDR(dx, dy) - PIXADDR(sx, sy) - es + 1) in set_b1_regs()
169 if (!lcd_dma.mirror) { in set_b1_regs()
171 bottom = PIXADDR(lcd_dma.xres - 1, lcd_dma.yres - 1); in set_b1_regs()
178 fi = PIXSTEP(lcd_dma.xres - 1, 0, 0, 1); in set_b1_regs()
180 top = PIXADDR(lcd_dma.xres - 1, 0); in set_b1_regs()
181 bottom = PIXADDR(0, lcd_dma.yres - 1); in set_b1_regs()
183 fi = PIXSTEP(0, 0, lcd_dma.xres - 1, 1); in set_b1_regs()
189 if (!lcd_dma.mirror) { in set_b1_regs()
190 top = PIXADDR(0, lcd_dma.yres - 1); in set_b1_regs()
191 bottom = PIXADDR(lcd_dma.xres - 1, 0); in set_b1_regs()
193 fi = PIXSTEP(0, 0, 1, lcd_dma.yres - 1); in set_b1_regs()
195 top = PIXADDR(lcd_dma.xres - 1, lcd_dma.yres - 1); in set_b1_regs()
198 fi = PIXSTEP(1, 0, 0, lcd_dma.yres - 1); in set_b1_regs()
204 if (!lcd_dma.mirror) { in set_b1_regs()
205 top = PIXADDR(lcd_dma.xres - 1, lcd_dma.yres - 1); in set_b1_regs()
208 fi = PIXSTEP(0, 1, lcd_dma.xres - 1, 0); in set_b1_regs()
210 top = PIXADDR(0, lcd_dma.yres - 1); in set_b1_regs()
211 bottom = PIXADDR(lcd_dma.xres - 1, 0); in set_b1_regs()
213 fi = PIXSTEP(lcd_dma.xres - 1, 1, 0, 0); in set_b1_regs()
219 if (!lcd_dma.mirror) { in set_b1_regs()
220 top = PIXADDR(lcd_dma.xres - 1, 0); in set_b1_regs()
221 bottom = PIXADDR(0, lcd_dma.yres - 1); in set_b1_regs()
223 fi = PIXSTEP(1, lcd_dma.yres - 1, 0, 0); in set_b1_regs()
226 bottom = PIXADDR(lcd_dma.xres - 1, lcd_dma.yres - 1); in set_b1_regs()
228 fi = PIXSTEP(0, lcd_dma.yres - 1, 1, 0); in set_b1_regs()
270 if (!(lcd_dma.rotate || lcd_dma.mirror || in set_b1_regs()
275 /* Set the double-indexed addressing mode */ in set_b1_regs()
303 int omap_request_lcd_dma(void (*callback)(u16 status, void *data), in omap_request_lcd_dma() argument
304 void *data) in omap_request_lcd_dma()
311 return -EBUSY; in omap_request_lcd_dma()
316 lcd_dma.cb_data = data; in omap_request_lcd_dma()
321 lcd_dma.mirror = 0; in omap_request_lcd_dma()
422 return -ENODEV; in omap_init_lcd_dma()