From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Antonino A. Daplas" Subject: [PATCH 02/41] nvidiafb: VGA state save and restore Date: Wed, 25 Apr 2007 14:17:09 +0800 Message-ID: <462EF265.7050607@gmail.com> Reply-To: linux-fbdev-devel@lists.sourceforge.net Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from sc8-sf-mx2-b.sourceforge.net ([10.3.1.92] helo=mail.sourceforge.net) by sc8-sf-list1-new.sourceforge.net with esmtp (Exim 4.43) id 1Hgc4B-0000ih-5o for linux-fbdev-devel@lists.sourceforge.net; Wed, 25 Apr 2007 00:37:31 -0700 Received: from py-out-1112.google.com ([64.233.166.180]) by mail.sourceforge.net with esmtp (Exim 4.44) id 1Hgc4A-0002Sk-OX for linux-fbdev-devel@lists.sourceforge.net; Wed, 25 Apr 2007 00:37:31 -0700 Received: by py-out-1112.google.com with SMTP id a29so115915pyi for ; Wed, 25 Apr 2007 00:37:30 -0700 (PDT) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-fbdev-devel-bounces@lists.sourceforge.net Errors-To: linux-fbdev-devel-bounces@lists.sourceforge.net To: Andrew Morton Cc: Linux Fbdev development list 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 --- 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 3b24098..13ab41b 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 +#include