Lines Matching refs:lcd_dma
67 } lcd_dma; variable
72 lcd_dma.addr = addr; in omap_set_lcd_dma_b1()
73 lcd_dma.data_type = data_type; in omap_set_lcd_dma_b1()
74 lcd_dma.xres = fb_xres; in omap_set_lcd_dma_b1()
75 lcd_dma.yres = fb_yres; in omap_set_lcd_dma_b1()
81 lcd_dma.ext_ctrl = external; in omap_set_lcd_dma_ext_controller()
87 lcd_dma.single_transfer = single; in omap_set_lcd_dma_single_transfer()
98 lcd_dma.rotate = rotate; in omap_set_lcd_dma_b1_rotation()
108 lcd_dma.mirror = mirror; in omap_set_lcd_dma_b1_mirror()
118 lcd_dma.vxres = vxres; in omap_set_lcd_dma_b1_vxres()
128 lcd_dma.xscale = xscale; in omap_set_lcd_dma_b1_scale()
129 lcd_dma.yscale = yscale; in omap_set_lcd_dma_b1_scale()
143 switch (lcd_dma.data_type) { in set_b1_regs()
158 vxres = lcd_dma.vxres ? lcd_dma.vxres : lcd_dma.xres; in set_b1_regs()
159 xscale = lcd_dma.xscale ? lcd_dma.xscale : 1; in set_b1_regs()
160 yscale = lcd_dma.yscale ? lcd_dma.yscale : 1; in set_b1_regs()
161 BUG_ON(vxres < lcd_dma.xres); in set_b1_regs()
163 #define PIXADDR(x, y) (lcd_dma.addr + \ in set_b1_regs()
167 switch (lcd_dma.rotate) { 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()
175 lcd_dma.data_type == OMAP_DMA_DATA_TYPE_S32) 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()
185 en = lcd_dma.xres; in set_b1_regs()
186 fn = lcd_dma.yres; 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()
200 en = lcd_dma.yres; in set_b1_regs()
201 fn = lcd_dma.xres; 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()
215 en = lcd_dma.xres; in set_b1_regs()
216 fn = lcd_dma.yres; 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()
230 en = lcd_dma.yres; in set_b1_regs()
231 fn = lcd_dma.xres; in set_b1_regs()
258 w |= lcd_dma.data_type; in set_b1_regs()
264 if (lcd_dma.callback != NULL) in set_b1_regs()
270 if (!(lcd_dma.rotate || lcd_dma.mirror || in set_b1_regs()
271 lcd_dma.vxres || lcd_dma.xscale || lcd_dma.yscale)) in set_b1_regs()
296 lcd_dma.active = 0; in lcd_dma_irq_handler()
297 if (lcd_dma.callback != NULL) in lcd_dma_irq_handler()
298 lcd_dma.callback(w, lcd_dma.cb_data); in lcd_dma_irq_handler()
306 spin_lock_irq(&lcd_dma.lock); in omap_request_lcd_dma()
307 if (lcd_dma.reserved) { in omap_request_lcd_dma()
308 spin_unlock_irq(&lcd_dma.lock); in omap_request_lcd_dma()
313 lcd_dma.reserved = 1; in omap_request_lcd_dma()
314 spin_unlock_irq(&lcd_dma.lock); in omap_request_lcd_dma()
315 lcd_dma.callback = callback; in omap_request_lcd_dma()
316 lcd_dma.cb_data = data; in omap_request_lcd_dma()
317 lcd_dma.active = 0; in omap_request_lcd_dma()
318 lcd_dma.single_transfer = 0; in omap_request_lcd_dma()
319 lcd_dma.rotate = 0; in omap_request_lcd_dma()
320 lcd_dma.vxres = 0; in omap_request_lcd_dma()
321 lcd_dma.mirror = 0; in omap_request_lcd_dma()
322 lcd_dma.xscale = 0; in omap_request_lcd_dma()
323 lcd_dma.yscale = 0; in omap_request_lcd_dma()
324 lcd_dma.ext_ctrl = 0; in omap_request_lcd_dma()
325 lcd_dma.src_port = 0; in omap_request_lcd_dma()
333 spin_lock(&lcd_dma.lock); in omap_free_lcd_dma()
334 if (!lcd_dma.reserved) { in omap_free_lcd_dma()
335 spin_unlock(&lcd_dma.lock); in omap_free_lcd_dma()
343 lcd_dma.reserved = 0; in omap_free_lcd_dma()
344 spin_unlock(&lcd_dma.lock); in omap_free_lcd_dma()
357 if (cpu_is_omap15xx() || !lcd_dma.ext_ctrl) in omap_enable_lcd_dma()
364 lcd_dma.active = 1; in omap_enable_lcd_dma()
374 BUG_ON(lcd_dma.active); in omap_setup_lcd_dma()
392 if (!lcd_dma.single_transfer) in omap_setup_lcd_dma()
403 lcd_dma.active = 0; in omap_stop_lcd_dma()
404 if (cpu_is_omap15xx() || !lcd_dma.ext_ctrl) in omap_stop_lcd_dma()
433 spin_lock_init(&lcd_dma.lock); in omap_init_lcd_dma()