From: "Antonino A. Daplas" Allow the saving and restoration of VGA text mode. The state is saved on the first open and restored on the last close. Because of the VGA registers are linearly mapped to the MMIO space, MMIO access is used which is not limited to X86 platforms nor to the primary display device. An echo 0 > /sys/class/vtconsole/vtcon1/bind will convert the display from graphics to text mode. Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton --- drivers/video/Makefile | 2 - drivers/video/savage/savagefb.h | 10 ++++- drivers/video/savage/savagefb_driver.c | 39 +++++++++++++++++++++++ 3 files changed, 48 insertions(+), 3 deletions(-) diff -puN drivers/video/Makefile~savagefb-vga-state-save-and-restore drivers/video/Makefile --- a/drivers/video/Makefile~savagefb-vga-state-save-and-restore +++ a/drivers/video/Makefile @@ -38,7 +38,7 @@ obj-$(CONFIG_FB_ATY128) += aty/ macmo obj-$(CONFIG_FB_RADEON) += aty/ obj-$(CONFIG_FB_SIS) += sis/ obj-$(CONFIG_FB_KYRO) += kyro/ -obj-$(CONFIG_FB_SAVAGE) += savage/ +obj-$(CONFIG_FB_SAVAGE) += savage/ vgastate.o obj-$(CONFIG_FB_GEODE) += geode/ obj-$(CONFIG_FB_MBX) += mbx/ obj-$(CONFIG_FB_I810) += vgastate.o diff -puN drivers/video/savage/savagefb.h~savagefb-vga-state-save-and-restore drivers/video/savage/savagefb.h --- a/drivers/video/savage/savagefb.h~savagefb-vga-state-save-and-restore +++ a/drivers/video/savage/savagefb.h @@ -15,6 +15,8 @@ #include #include #include +#include +#include