Module Name: xsrc Committed By: macallan Date: Thu Apr 14 01:37:22 UTC 2011
Modified Files: xsrc/external/mit/xf86-video-suncg14/dist/src: cg14.h cg14_driver.c Log Message: use ioctl(FBIOSVIDEO) in CG14SaveScreen(), now the Xserver can actually turn the monitor off TODO: hw cursor To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 xsrc/external/mit/xf86-video-suncg14/dist/src/cg14.h cvs rdiff -u -r1.4 -r1.5 \ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: xsrc/external/mit/xf86-video-suncg14/dist/src/cg14.h diff -u xsrc/external/mit/xf86-video-suncg14/dist/src/cg14.h:1.2 xsrc/external/mit/xf86-video-suncg14/dist/src/cg14.h:1.3 --- xsrc/external/mit/xf86-video-suncg14/dist/src/cg14.h:1.2 Thu Jun 10 13:26:46 2010 +++ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14.h Thu Apr 14 01:37:22 2011 @@ -69,6 +69,7 @@ * '/usr/include/sys/cg14io.h'. */ #ifdef __NetBSD__ +#include <dev/sun/fbio.h> #include <sys/ioccom.h> #define CG14_SET_PIXELMODE _IOW('M', 3, int) #else Index: xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c diff -u xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c:1.4 xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c:1.5 --- xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c:1.4 Thu Jun 17 04:50:43 2010 +++ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c Thu Apr 14 01:37:22 2011 @@ -643,10 +643,24 @@ /* Mandatory */ static Bool CG14SaveScreen(ScreenPtr pScreen, int mode) - /* this function should blank the screen when unblank is FALSE and - unblank it when unblank is TRUE -- it doesn't actually seem to be - used for much though */ { + ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + Cg14Ptr pCg14 = GET_CG14_FROM_SCRN(pScrn); + int state; + switch(mode) { + case SCREEN_SAVER_ON: + case SCREEN_SAVER_CYCLE: + state = FBVIDEO_OFF; + ioctl(pCg14->psdp->fd, FBIOSVIDEO, &state); + break; + case SCREEN_SAVER_OFF: + case SCREEN_SAVER_FORCER: + state = FBVIDEO_ON; + ioctl(pCg14->psdp->fd, FBIOSVIDEO, &state); + break; + default: + return FALSE; + } return TRUE; } @@ -686,4 +700,4 @@ int bpp = 8; ioctl (pCg14->psdp->fd, CG14_SET_PIXELMODE, &bpp); -} +}