int omap_lcd_dma_running(void)
{ /* *OnOMAP1510,internalLCDcontrollerwillstartthetransfer *whenitgetsenabled,soassumeDMArunningifLCDenabled.
*/ if (cpu_is_omap15xx()) if (omap_readw(OMAP_LCDC_CONTROL) & OMAP_LCDC_CTRL_LCD_EN) return1;
/* Check if LCD DMA is running */ if (cpu_is_omap16xx()) if (omap_readw(OMAP1610_DMA_LCD_CCR) & OMAP_DMA_CCR_EN) return1;
int active; unsignedlong addr; int rotate, data_type, xres, yres; int vxres; int mirror; int xscale, yscale; int ext_ctrl; int src_port; int single_transfer;
} lcd_dma;
void omap_set_lcd_dma_b1_rotation(int rotate)
{ if (cpu_is_omap15xx()) {
printk(KERN_ERR "DMA rotation is not supported in 1510 mode\n");
BUG(); return;
}
lcd_dma.rotate = rotate;
}
EXPORT_SYMBOL(omap_set_lcd_dma_b1_rotation);
void omap_set_lcd_dma_b1_mirror(int mirror)
{ if (cpu_is_omap15xx()) {
printk(KERN_ERR "DMA mirror is not supported in 1510 mode\n");
BUG();
}
lcd_dma.mirror = mirror;
}
EXPORT_SYMBOL(omap_set_lcd_dma_b1_mirror);
void omap_set_lcd_dma_b1_vxres(unsignedlong vxres)
{ if (cpu_is_omap15xx()) {
pr_err("DMA virtual resolution is not supported in 1510 mode\n");
BUG();
}
lcd_dma.vxres = vxres;
}
EXPORT_SYMBOL(omap_set_lcd_dma_b1_vxres);
void omap_set_lcd_dma_b1_scale(unsignedint xscale, unsignedint yscale)
{ if (cpu_is_omap15xx()) {
printk(KERN_ERR "DMA scale is not supported in 1510 mode\n");
BUG();
}
lcd_dma.xscale = xscale;
lcd_dma.yscale = yscale;
}
EXPORT_SYMBOL(omap_set_lcd_dma_b1_scale);
staticvoid set_b1_regs(void)
{ unsignedlong top, bottom; int es;
u16 w; unsignedlong en, fn; long ei, fi; unsignedlong vxres; unsignedint xscale, yscale;
switch (lcd_dma.data_type) { case OMAP_DMA_DATA_TYPE_S8:
es = 1; break; case OMAP_DMA_DATA_TYPE_S16:
es = 2; break; case OMAP_DMA_DATA_TYPE_S32:
es = 4; break; default:
BUG(); return;
}
w = omap_readw(OMAP1610_DMA_LCD_CSDP);
w &= ~0x03;
w |= lcd_dma.data_type;
omap_writew(w, OMAP1610_DMA_LCD_CSDP);
w = omap_readw(OMAP1610_DMA_LCD_CTRL); /* Always set the source port as SDRAM for now*/
w &= ~(0x03 << 6); if (lcd_dma.callback != NULL)
w |= 1 << 1; /* Block interrupt enable */ else
w &= ~(1 << 1);
omap_writew(w, OMAP1610_DMA_LCD_CTRL);
void omap_free_lcd_dma(void)
{
spin_lock(&lcd_dma.lock); if (!lcd_dma.reserved) {
spin_unlock(&lcd_dma.lock);
printk(KERN_ERR "LCD DMA is not reserved\n");
BUG(); return;
} if (!cpu_is_omap15xx())
omap_writew(omap_readw(OMAP1610_DMA_LCD_CCR) & ~1,
OMAP1610_DMA_LCD_CCR);
lcd_dma.reserved = 0;
spin_unlock(&lcd_dma.lock);
}
EXPORT_SYMBOL(omap_free_lcd_dma);
void omap_enable_lcd_dma(void)
{
u16 w;
/* *SettheEnablebitonlyifanexternalcontrolleris *connected.OtherwisetheOMAPinternalcontrollerwill *startthetransferwhenitgetsenabled.
*/ if (cpu_is_omap15xx() || !lcd_dma.ext_ctrl) return;
w = omap_readw(OMAP1610_DMA_LCD_CTRL);
w |= 1 << 8;
omap_writew(w, OMAP1610_DMA_LCD_CTRL);
lcd_dma.active = 1;
w = omap_readw(OMAP1610_DMA_LCD_CCR);
w |= 1 << 7;
omap_writew(w, OMAP1610_DMA_LCD_CCR);
}
EXPORT_SYMBOL(omap_enable_lcd_dma);
void omap_setup_lcd_dma(void)
{
BUG_ON(lcd_dma.active); if (!cpu_is_omap15xx()) { /* Set some reasonable defaults */
omap_writew(0x5440, OMAP1610_DMA_LCD_CCR);
omap_writew(0x9102, OMAP1610_DMA_LCD_CSDP);
omap_writew(0x0004, OMAP1610_DMA_LCD_LCH_CTRL);
}
set_b1_regs(); if (!cpu_is_omap15xx()) {
u16 w;
w = omap_readw(OMAP1610_DMA_LCD_CCR); /* *IfDMAwasalreadyactivesettheend_progbittohave *theprogrammedregistersetloadedintotheactive *registerset.
*/
w |= 1 << 11; /* End_prog */ if (!lcd_dma.single_transfer)
w |= (3 << 8); /* Auto_init, repeat */
omap_writew(w, OMAP1610_DMA_LCD_CCR);
}
}
EXPORT_SYMBOL(omap_setup_lcd_dma);
void omap_stop_lcd_dma(void)
{
u16 w;
lcd_dma.active = 0; if (cpu_is_omap15xx() || !lcd_dma.ext_ctrl) return;
w = omap_readw(OMAP1610_DMA_LCD_CCR);
w &= ~(1 << 7);
omap_writew(w, OMAP1610_DMA_LCD_CCR);
w = omap_readw(OMAP1610_DMA_LCD_CTRL);
w &= ~(1 << 8);
omap_writew(w, OMAP1610_DMA_LCD_CTRL);
}
EXPORT_SYMBOL(omap_stop_lcd_dma);
staticint __init omap_init_lcd_dma(void)
{ int r;
if (!cpu_class_is_omap1()) return -ENODEV;
if (cpu_is_omap16xx()) {
u16 w;
/* this would prevent OMAP sleep */
w = omap_readw(OMAP1610_DMA_LCD_CTRL);
w &= ~(1 << 8);
omap_writew(w, OMAP1610_DMA_LCD_CTRL);
}
spin_lock_init(&lcd_dma.lock);
r = request_threaded_irq(INT_DMA_LCD, NULL, lcd_dma_irq_handler,
IRQF_ONESHOT, "LCD DMA", NULL); if (r != 0)
pr_err("unable to request IRQ for LCD DMA (error %d)\n", r);
return r;
}
arch_initcall(omap_init_lcd_dma);
Messung V0.5 in Prozent
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.9Angebot
(Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-10-11)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.