From 0e9a7ed0cc0b7fd8fe546d751ec553cba1683077 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Sun, 22 Feb 2009 02:51:52 +0100 Subject: Add proper VT switching. Save and restore hardware registers. This should fix suspend/resume. --- src/glamo.h | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) (limited to 'src/glamo.h') diff --git a/src/glamo.h b/src/glamo.h index f14224a..84cba3d 100644 --- a/src/glamo.h +++ b/src/glamo.h @@ -78,7 +78,7 @@ typedef volatile CARD16 VOL16; typedef struct _MemBuf { int size; int used; - void *address; + char data[1]; } MemBuf; typedef struct { @@ -111,11 +111,22 @@ typedef struct { /* linux framebuffer */ int fb_fd; + struct fb_var_screeninfo fb_saved_var; struct fb_var_screeninfo fb_var; struct fb_fix_screeninfo fb_fix; unsigned char *fbstart; unsigned char *fbmem; int fboff; + + /* save hardware registers */ + short saved_clock_2d; + short saved_clock_isp; + short saved_clock_gen5_1; + short saved_clock_gen5_2; + short saved_hostbus_2; + + /* Use hardware acceleration */ + Bool accel; } GlamoRec, *GlamoPtr; #define GlamoPTR(p) ((GlamoPtr)((p)->driverPrivate)) @@ -136,22 +147,16 @@ MMIOSetBitMask(volatile char *mmio, CARD32 reg, CARD16 mask, CARD16 val) /* glamo_draw.c */ Bool -GLAMODrawInit(ScreenPtr pScreen); - -void -GLAMODrawSetup(GlamoPtr pGlamo); +GLAMODrawInit(ScrnInfoPtr pScrn); -void -GLAMODrawEnable(GlamoPtr pScreen); +Bool +GLAMODrawEnable(ScrnInfoPtr pScrn); void -GLAMODrawDisable(ScreenPtr pScreen); +GLAMODrawDisable(ScrnInfoPtr pScrn); void -GLAMODrawFini(ScreenPtr pScreen); - -Bool -GLAMODrawExaInit(ScreenPtr pScreen, ScrnInfoPtr pScrn); +GLAMODrawFini(ScrnInfoPtr pScrn); /* glamo-display.h */ Bool -- cgit v1.2.3