1
0
mirror of git://projects.qi-hardware.com/ben-blinkenlights.git synced 2024-11-27 17:50:19 +02:00

ubb-vga.c: cleaned up setup process and prepared for DMA

- ubb-vga.c (setup): made "static"
- ubb-vga.c (setup_noirq, cleanup_noirq, session): added functions for
  setup tasks to perform with interrupts off
This commit is contained in:
Werner Almesberger 2011-04-29 22:48:01 -03:00
parent 8d803dda4c
commit 64f3047144

View File

@ -226,7 +226,7 @@ static const struct mode {
*/ */
void setup(void) static void setup(void)
{ {
mlockall(MCL_CURRENT | MCL_FUTURE); mlockall(MCL_CURRENT | MCL_FUTURE);
ben_setup(); ben_setup();
@ -243,6 +243,16 @@ void setup(void)
} }
static void setup_noirq(void)
{
}
static void cleanup_noirq(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;
@ -377,9 +387,13 @@ static void session(void (*gen)(void **fb, int xres, int yres), int frames)
disable_interrupts(); disable_interrupts();
setup_noirq();
for (i = 0; i != frames; i++) for (i = 0; i != frames; i++)
frame(f); frame(f);
cleanup_noirq();
enable_interrupts(); enable_interrupts();
} }