summaryrefslogtreecommitdiffstats
path: root/drivers/video/savage/savagefb.h
diff options
context:
space:
mode:
authorAntonino A. Daplas <adaplas@gmail.com>2007-05-08 00:38:36 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-08 11:15:29 -0700
commit22d832edcace45b26ced76efef6c863449e4e060 (patch)
tree155190ea0e8d4b1504c754d272518cd9da147771 /drivers/video/savage/savagefb.h
parentf7829158bce2c8180bf7a1cb922cad812d3a2788 (diff)
downloadblackbird-obmc-linux-22d832edcace45b26ced76efef6c863449e4e060.tar.gz
blackbird-obmc-linux-22d832edcace45b26ced76efef6c863449e4e060.zip
savagefb: 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 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 <adaplas@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/savage/savagefb.h')
-rw-r--r--drivers/video/savage/savagefb.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/video/savage/savagefb.h b/drivers/video/savage/savagefb.h
index e648a6c0f6d9..8bfdfc3c5234 100644
--- a/drivers/video/savage/savagefb.h
+++ b/drivers/video/savage/savagefb.h
@@ -15,6 +15,8 @@
#include <linux/i2c.h>
#include <linux/i2c-id.h>
#include <linux/i2c-algo-bit.h>
+#include <linux/mutex.h>
+#include <video/vga.h>
#include "../edid.h"
#ifdef SAVAGEFB_DEBUG
@@ -189,8 +191,12 @@ struct savagefb_par {
struct savagefb_i2c_chan chan;
struct savage_reg state;
struct savage_reg save;
+ struct savage_reg initial;
+ struct vgastate vgastate;
+ struct mutex open_lock;
unsigned char *edid;
u32 pseudo_palette[16];
+ u32 open_count;
int paletteEnabled;
int pm_state;
int display_type;
@@ -203,7 +209,7 @@ struct savagefb_par {
int clock[4];
int MCLK, REFCLK, LCDclk;
struct {
- u8 __iomem *vbase;
+ void __iomem *vbase;
u32 pbase;
u32 len;
#ifdef CONFIG_MTRR
@@ -212,7 +218,7 @@ struct savagefb_par {
} video;
struct {
- volatile u8 __iomem *vbase;
+ void __iomem *vbase;
u32 pbase;
u32 len;
} mmio;
OpenPOWER on IntegriCloud