mirror of
git://projects.qi-hardware.com/ben-blinkenlights.git
synced 2024-11-23 22:42:49 +02:00
ubb-vga2.c: corrected and improved loading of the first TX word
- ubb-vga2.c (line): write the first word to the TX FIFO after starting the command or it is lost - ubb-vga2.c (line): fetch the first word while waiting for the back porch, making sure we have plenty of time for cache effects - ubb-vga2.c (line): we no longer need to prefetch the first word of the next line
This commit is contained in:
parent
e94b3bbcfc
commit
4480b32c50
@ -265,6 +265,7 @@ void setup(void)
|
|||||||
static void line(const uint32_t *line)
|
static void line(const uint32_t *line)
|
||||||
{
|
{
|
||||||
const uint32_t *p = line;
|
const uint32_t *p = line;
|
||||||
|
uint32_t first;
|
||||||
|
|
||||||
/* Back porch */
|
/* Back porch */
|
||||||
|
|
||||||
@ -273,7 +274,7 @@ static void line(const uint32_t *line)
|
|||||||
*msc_strpcl = 1 << 3; /* reset the MSC */
|
*msc_strpcl = 1 << 3; /* reset the MSC */
|
||||||
// while (*msc_stat & (1 << 15));
|
// while (*msc_stat & (1 << 15));
|
||||||
|
|
||||||
*msc_txfifo = *p++;
|
first = *p++;
|
||||||
|
|
||||||
until(US(0.79));
|
until(US(0.79));
|
||||||
|
|
||||||
@ -316,6 +317,8 @@ static void line(const uint32_t *line)
|
|||||||
|
|
||||||
/* Front porch */
|
/* Front porch */
|
||||||
|
|
||||||
|
*msc_txfifo = first;
|
||||||
|
|
||||||
*pdfuns = CMD;
|
*pdfuns = CMD;
|
||||||
*pddats = HSYNC;
|
*pddats = HSYNC;
|
||||||
*pdfunc = CMD;
|
*pdfunc = CMD;
|
||||||
@ -344,7 +347,6 @@ static void line(const uint32_t *line)
|
|||||||
}
|
}
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
(void) *(volatile const uint32_t *) p;
|
|
||||||
until(line_cycles);
|
until(line_cycles);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user