From 7dfe50b3aac2b3500139ab10a6e228d34fed9a49 Mon Sep 17 00:00:00 2001 From: "Antonino A. Daplas" Date: Tue, 8 May 2007 00:38:33 -0700 Subject: [PATCH] nvidiafb: VGA state save and restore 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 non-linear mapping of the VGA registers to the MMIO space, this will be done only on X86 platforms where the device is the primary display. 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 Signed-off-by: Linus Torvalds --- drivers/video/Makefile | 2 +- drivers/video/nvidia/nv_type.h | 6 ++++ drivers/video/nvidia/nvidia.c | 74 +++++++++++++++++++++++++++++++++++++++++- 3 files changed, 80 insertions(+), 2 deletions(-) diff --git a/drivers/video/Makefile b/drivers/video/Makefile index 49d01eb..c8b43eb 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -32,7 +32,7 @@ obj-$(CONFIG_FB_PM3) += pm3fb.o obj-$(CONFIG_FB_MATROX) += matrox/ obj-$(CONFIG_FB_RIVA) += riva/ vgastate.o -obj-$(CONFIG_FB_NVIDIA) += nvidia/ +obj-$(CONFIG_FB_NVIDIA) += nvidia/ vgastate.o obj-$(CONFIG_FB_ATY) += aty/ macmodes.o obj-$(CONFIG_FB_ATY128) += aty/ macmodes.o obj-$(CONFIG_FB_RADEON) += aty/ diff --git a/drivers/video/nvidia/nv_type.h b/drivers/video/nvidia/nv_type.h index ee430af..38f7cc0 100644 --- a/drivers/video/nvidia/nv_type.h +++ b/drivers/video/nvidia/nv_type.h @@ -5,6 +5,8 @@ #include #include #include +#include +#include