1
0
mirror of git://projects.qi-hardware.com/ben-blinkenlights.git synced 2024-12-27 12:01:45 +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:
Werner Almesberger 2011-04-28 12:30:22 -03:00
parent e94b3bbcfc
commit 4480b32c50

View File

@ -265,6 +265,7 @@ void setup(void)
static void line(const uint32_t *line)
{
const uint32_t *p = line;
uint32_t first;
/* Back porch */
@ -273,7 +274,7 @@ static void line(const uint32_t *line)
*msc_strpcl = 1 << 3; /* reset the MSC */
// while (*msc_stat & (1 << 15));
*msc_txfifo = *p++;
first = *p++;
until(US(0.79));
@ -316,6 +317,8 @@ static void line(const uint32_t *line)
/* Front porch */
*msc_txfifo = first;
*pdfuns = CMD;
*pddats = HSYNC;
*pdfunc = CMD;
@ -344,7 +347,6 @@ static void line(const uint32_t *line)
}
fail:
(void) *(volatile const uint32_t *) p;
until(line_cycles);
}