From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Antonino A. Daplas" Subject: [PATCH 04/41] savagefb: VGA state save and restore Date: Wed, 25 Apr 2007 14:19:09 +0800 Message-ID: <462EF2DD.1080600@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 1Hgc4o-0000nC-2E for linux-fbdev-devel@lists.sourceforge.net; Wed, 25 Apr 2007 00:38:10 -0700 Received: from py-out-1112.google.com ([64.233.166.181]) by mail.sourceforge.net with esmtp (Exim 4.44) id 1Hgc4m-0002jG-MK for linux-fbdev-devel@lists.sourceforge.net; Wed, 25 Apr 2007 00:38:10 -0700 Received: by py-out-1112.google.com with SMTP id a29so116069pyi for ; Wed, 25 Apr 2007 00:38:08 -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 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 --- 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 --git a/drivers/video/Makefile b/drivers/video/Makefile index 13ab41b..4fa1529 100644 --- a/drivers/video/Makefile +++ b/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 --git a/drivers/video/savage/savagefb.h b/drivers/video/savage/savagefb.h index e648a6c..8bfdfc3 100644 --- a/drivers/video/savage/savagefb.h +++ b/drivers/video/savage/savagefb.h @@ -15,6 +15,8 @@ #define __SAVAGEFB_H__ #include #include #include +#include +#include