1
0
mirror of git://projects.qi-hardware.com/ben-blinkenlights.git synced 2024-11-24 01:00:36 +02:00

ubb-vga.c: removed commented-out code from earlier experiments

The history of the split prefetch code:

Once up on a time, I thought that it was important to stay very close
to the "official" pixel clock. We could do this when copying 32 bit
words from cache to the GPIO set/clear registers, but not when
shifting 8 bit values as we do now.

One problem with 32 bit values is that transferring that amount of
data exceeds the time available in the hsync pulse. Hence the idea
to split the prefetch between hsync pulse and horizontal front porch.

Note that we also split prefetches between the two VGA lines of each
QVGA line. This commit does not change that mechanism.

- ubb-vga.c (line, frame): removed code fragments for prefetch split
  between hsync pulse and front porch
- ubb-vga.c (line, frame): remove code fragments for measuring time
  relative to the rising edge of hsync (and letting the prefetch time
  control the hsync length), not the falling edge
This commit is contained in:
Werner Almesberger 2011-04-24 11:48:32 -03:00
parent 3b7a7caec1
commit 8bd7199d9e

View File

@ -254,28 +254,23 @@ static void until(uint16_t cycles)
static void line(const uint8_t *line, const uint8_t *fetch)
{
const uint8_t *p = line;
//volatile uint8_t pat = R | B | G;
/* HSYNC */
*tcnt = 0;
*pddatc = HSYNC;
// prefetch(fetch, PREFETCH_HSYNC);
prefetch(fetch, 160);
until(US(3.77));
// *tcnt = 0;
*pddats = HSYNC;
/* Front porch */
// prefetch(fetch+PREFETCH_HSYNC, PREFETCH_HFRONT);
// until(US(3.77+1.79-3.77));
until(US(3.77+1.79));
while (p != line+320) {
*pddats = *p++ << 8;//pat; //R | G | B; //*p++;
*pddatc = *p++ << 8;//pat;//R | G | B; // *p++;
*pddats = *p++ << 8;
*pddatc = *p++ << 8;
}
/* Back porch */
// until(US(31.77-3.77));
until(US(31.77));
until(US(36));
}
@ -306,14 +301,10 @@ static void frame(const uint8_t *f)
/* Front porch */
*tcnt = 0;
*pddatc = HSYNC;
// prefetch(f, PREFETCH_HSYNC);
until(US(3.77));
// *tcnt = 0;
*pddats = HSYNC;
// prefetch(f+PREFETCH_HSYNC, PREFETCH_HFRONT);
prefetch(f, 160);
// until(US(31.77-3.77));
until(US(31.77));
until(US(36));
hdelay(31);