[PATCH] fbcon: Add ability to save/restore graphics state

Add hooks to save and restore the graphics state.  These hooks are called in
fbcon_blank() when entering/leaving KD_GRAPHICS mode.  This is needed by
savagefb at least so it can cooperate with savage_dri and by cyblafb.

State save/restoration can be full or partial.

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 04a58f3..55ccaf3 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -617,6 +617,12 @@
 
 	/* perform fb specific mmap */
 	int (*fb_mmap)(struct fb_info *info, struct file *file, struct vm_area_struct *vma);
+
+	/* save current hardware state */
+	void (*fb_save_state)(struct fb_info *info);
+
+	/* restore saved state */
+	void (*fb_restore_state)(struct fb_info *info);
 };
 
 #ifdef CONFIG_FB_TILEBLITTING