mirror of
git://projects.qi-hardware.com/ben-blinkenlights.git
synced 2024-11-24 01:00:36 +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:
parent
8d803dda4c
commit
64f3047144
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user