1
0
mirror of git://projects.qi-hardware.com/ben-blinkenlights.git synced 2024-11-23 22:42:49 +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);
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)
{
const uint32_t *p = line;
@ -377,9 +387,13 @@ static void session(void (*gen)(void **fb, int xres, int yres), int frames)
disable_interrupts();
setup_noirq();
for (i = 0; i != frames; i++)
frame(f);
cleanup_noirq();
enable_interrupts();
}