Userland writes to a memory buffer, not to the hardware. Eventually the
program asks the kernel to flush the buffer, and the kernel complies by
verifying and translating the buffer contents (e.g. DMA addresses) and
passing instructions to the hardware however it deems best (e.g.
splitting large buffers to give other tasks a go). The kernel portion
cal run in parallel with further execution of userland -- on a good card
it might be done entirely with card DMA.
If the userland program waits for a long time, the hardware isn't locked
so there is no problem.
> Since one of the goals of this conversation was to figure out how to get
> away from requiring X for display. I assume you are leaning towards
> frame buffer consoles. What happens when there is a virtual console
> switch before the program flushes its buffer?
See above; no problem. The VC switch may have to wait for currently
executing commands or DMA to complete (unless the hardware allows this
to be interrupted), but it doesn't have to wait for userland.
-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/