Hi, The attached patch lets Xv work again after restoring a swsusp-frozen system.
Please Cc if necessary as I am not subscribed to Xpert mailing list. -- Best regards, Pierre Lombard [http://perso.wanadoo.fr/p-l-42/]
This patch restoes the Xv acceleration when resuming from a swsusp'ended state. The stuff is adapted from Charl P. Botha's patch for Radeon drivers. (http://cpbotha.net/dri_resume.html). diff -Naur xc/programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c xc-patched/programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c --- xc/programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c 2002-09-10 21:56:57.000000000 +0200 +++ xc-patched/programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c 2002-09-10 +17:35:29.000000000 +0200 @@ -597,11 +597,19 @@ NVEnterVT(int scrnIndex, int flags) { ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + NVPtr pNv = NVPTR(pScrn); DEBUG(xf86DrvMsg(scrnIndex, X_INFO, "NVEnterVT\n")); if (!NVModeInit(pScrn, pScrn->currentMode)) return FALSE; + + /* this will get XVideo going again, but only if XVideo was initialised + during server startup (hence the info->adaptor if). */ + if(pNv->overlayAdaptor) + NVResetVideo(pScrn); + + NVAdjustFrame(scrnIndex, pScrn->frameX0, pScrn->frameY0, 0); return TRUE; } diff -Naur -x '*.o' -x Makefile -x '*.bak' -x nv._man -x '*~' -x '*.orig' xc/programs/Xserver/hw/xfree86/drivers/nv/nv_proto.h xc-patched/programs/Xserver/hw/xfree86/drivers/nv/nv_proto.h --- xc/programs/Xserver/hw/xfree86/drivers/nv/nv_proto.h 2002-09-10 21:56:57.000000000 +0200 +++ xc-patched/programs/Xserver/hw/xfree86/drivers/nv/nv_proto.h 2002-09-10 +16:48:52.000000000 +0200 @@ -21,6 +21,7 @@ /* in nv_video.c */ void NVInitVideo(ScreenPtr); +void NVResetVideo(ScrnInfoPtr pScrn); /* in nv_setup.c */ void RivaEnterLeave(ScrnInfoPtr pScrn, Bool enter); diff -Naur -x '*.o' -x Makefile -x '*.bak' -x nv._man -x '*~' -x '*.orig' xc/programs/Xserver/hw/xfree86/drivers/nv/nv_video.c xc-patched/programs/Xserver/hw/xfree86/drivers/nv/nv_video.c --- xc/programs/Xserver/hw/xfree86/drivers/nv/nv_video.c 2002-09-10 21:56:57.000000000 +0200 +++ xc-patched/programs/Xserver/hw/xfree86/drivers/nv/nv_video.c 2002-09-10 +21:24:39.000000000 +0200 @@ -36,6 +36,7 @@ #ifndef XvExtension void NVInitVideo(ScreenPtr pScreen) {} +void NVResetVideo(ScrnInfoPtr Pscrn) {} #else typedef struct _NVPortPrivRec { @@ -60,7 +61,7 @@ static XF86VideoAdaptorPtr NVSetupImageVideo(ScreenPtr); -static void NVResetVideo(ScrnInfoPtr); +void NVResetVideo(ScrnInfoPtr); static void NVStopOverlay (ScrnInfoPtr); static void NVPutOverlayImage(ScrnInfoPtr pScrnInfo, @@ -158,7 +159,7 @@ } -static void +void NVResetVideo (ScrnInfoPtr pScrnInfo) { NVPtr pNv = NVPTR(pScrnInfo);
