drivers/video/fbdev/omap/lcd_dma.c
Source file repositories/reference/linux-study-clean/drivers/video/fbdev/omap/lcd_dma.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/video/fbdev/omap/lcd_dma.c- Extension
.c- Size
- 10774 bytes
- Lines
- 446
- Domain
- Driver Families
- Bucket
- drivers/video
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/export.hlinux/module.hlinux/spinlock.hlinux/interrupt.hlinux/io.hlinux/omap-dma.hlinux/soc/ti/omap1-soc.hlinux/soc/ti/omap1-io.hlcdc.hlcd_dma.h
Detected Declarations
function Copyrightfunction omap_set_lcd_dma_b1function omap_set_lcd_dma_ext_controllerfunction omap_set_lcd_dma_single_transferfunction omap_set_lcd_dma_b1_rotationfunction omap_set_lcd_dma_b1_mirrorfunction omap_set_lcd_dma_b1_vxresfunction omap_set_lcd_dma_b1_scalefunction set_b1_regsfunction lcd_dma_irq_handlerfunction omap_request_lcd_dmafunction omap_free_lcd_dmafunction omap_enable_lcd_dmafunction omap_setup_lcd_dmafunction omap_stop_lcd_dmafunction omap_init_lcd_dmaexport omap_set_lcd_dma_b1export omap_set_lcd_dma_ext_controllerexport omap_set_lcd_dma_single_transferexport omap_set_lcd_dma_b1_rotationexport omap_set_lcd_dma_b1_mirrorexport omap_set_lcd_dma_b1_vxresexport omap_set_lcd_dma_b1_scaleexport omap_request_lcd_dmaexport omap_free_lcd_dmaexport omap_enable_lcd_dmaexport omap_setup_lcd_dmaexport omap_stop_lcd_dma
Annotated Snippet
if (!lcd_dma.mirror) {
top = PIXADDR(0, 0);
bottom = PIXADDR(lcd_dma.xres - 1, lcd_dma.yres - 1);
/* 1510 DMA requires the bottom address to be 2 more
* than the actual last memory access location. */
if (cpu_is_omap15xx() &&
lcd_dma.data_type == OMAP_DMA_DATA_TYPE_S32)
bottom += 2;
ei = PIXSTEP(0, 0, 1, 0);
fi = PIXSTEP(lcd_dma.xres - 1, 0, 0, 1);
} else {
top = PIXADDR(lcd_dma.xres - 1, 0);
bottom = PIXADDR(0, lcd_dma.yres - 1);
ei = PIXSTEP(1, 0, 0, 0);
fi = PIXSTEP(0, 0, lcd_dma.xres - 1, 1);
}
en = lcd_dma.xres;
fn = lcd_dma.yres;
break;
case 90:
if (!lcd_dma.mirror) {
top = PIXADDR(0, lcd_dma.yres - 1);
bottom = PIXADDR(lcd_dma.xres - 1, 0);
ei = PIXSTEP(0, 1, 0, 0);
fi = PIXSTEP(0, 0, 1, lcd_dma.yres - 1);
} else {
top = PIXADDR(lcd_dma.xres - 1, lcd_dma.yres - 1);
bottom = PIXADDR(0, 0);
ei = PIXSTEP(0, 1, 0, 0);
fi = PIXSTEP(1, 0, 0, lcd_dma.yres - 1);
}
en = lcd_dma.yres;
fn = lcd_dma.xres;
break;
case 180:
if (!lcd_dma.mirror) {
top = PIXADDR(lcd_dma.xres - 1, lcd_dma.yres - 1);
bottom = PIXADDR(0, 0);
ei = PIXSTEP(1, 0, 0, 0);
fi = PIXSTEP(0, 1, lcd_dma.xres - 1, 0);
} else {
top = PIXADDR(0, lcd_dma.yres - 1);
bottom = PIXADDR(lcd_dma.xres - 1, 0);
ei = PIXSTEP(0, 0, 1, 0);
fi = PIXSTEP(lcd_dma.xres - 1, 1, 0, 0);
}
en = lcd_dma.xres;
fn = lcd_dma.yres;
break;
case 270:
if (!lcd_dma.mirror) {
top = PIXADDR(lcd_dma.xres - 1, 0);
bottom = PIXADDR(0, lcd_dma.yres - 1);
ei = PIXSTEP(0, 0, 0, 1);
fi = PIXSTEP(1, lcd_dma.yres - 1, 0, 0);
} else {
top = PIXADDR(0, 0);
bottom = PIXADDR(lcd_dma.xres - 1, lcd_dma.yres - 1);
ei = PIXSTEP(0, 0, 0, 1);
fi = PIXSTEP(0, lcd_dma.yres - 1, 1, 0);
}
en = lcd_dma.yres;
fn = lcd_dma.xres;
break;
default:
BUG();
return; /* Suppress warning about uninitialized vars */
}
if (cpu_is_omap15xx()) {
omap_writew(top >> 16, OMAP1510_DMA_LCD_TOP_F1_U);
omap_writew(top, OMAP1510_DMA_LCD_TOP_F1_L);
omap_writew(bottom >> 16, OMAP1510_DMA_LCD_BOT_F1_U);
omap_writew(bottom, OMAP1510_DMA_LCD_BOT_F1_L);
return;
}
/* 1610 regs */
omap_writew(top >> 16, OMAP1610_DMA_LCD_TOP_B1_U);
omap_writew(top, OMAP1610_DMA_LCD_TOP_B1_L);
omap_writew(bottom >> 16, OMAP1610_DMA_LCD_BOT_B1_U);
omap_writew(bottom, OMAP1610_DMA_LCD_BOT_B1_L);
omap_writew(en, OMAP1610_DMA_LCD_SRC_EN_B1);
omap_writew(fn, OMAP1610_DMA_LCD_SRC_FN_B1);
w = omap_readw(OMAP1610_DMA_LCD_CSDP);
w &= ~0x03;
w |= lcd_dma.data_type;
Annotation
- Immediate include surface: `linux/export.h`, `linux/module.h`, `linux/spinlock.h`, `linux/interrupt.h`, `linux/io.h`, `linux/omap-dma.h`, `linux/soc/ti/omap1-soc.h`, `linux/soc/ti/omap1-io.h`.
- Detected declarations: `function Copyright`, `function omap_set_lcd_dma_b1`, `function omap_set_lcd_dma_ext_controller`, `function omap_set_lcd_dma_single_transfer`, `function omap_set_lcd_dma_b1_rotation`, `function omap_set_lcd_dma_b1_mirror`, `function omap_set_lcd_dma_b1_vxres`, `function omap_set_lcd_dma_b1_scale`, `function set_b1_regs`, `function lcd_dma_irq_handler`.
- Atlas domain: Driver Families / drivers/video.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.