VIS_CONSCOPY ioctl command
copies a rectangular region of pixels from one location to another location.
One use for this ioctl is to scroll.
To implement the
VIS_CONSCOPY ioctl command in the console frame buffer driver, follow these
Copy the vis_conscopy structure. The vis_conscopy structure describes the source and target rectangle sizes and locations.
Validate the display parameters. Return an error if any of the display parameters is out of range.
Invalidate any user context so that user applications cannot
simultaneously access the frame buffer hardware through user memory mappings.
This step is neither allowed nor necessary in polled I/O mode because user
applications are not running. Be sure to hold a lock so that users cannot
restore the mapping through a page fault until the
VIS_CONSDISPLAY ioctl completes.
Call the function to copy the rectangle.
For optimal performance, use the rendering engine of the graphic device to implement the copy function. You need to decide how to do the context management within the driver to set up the rendering engine for best performance.