[xorg-commit-diffs] xc/programs/Xserver/hw/xfree86/drivers/nsc nsc_gx1_video.c, 1.1.4.3, 1.1.4.4 nsc_gx2_video.c, 1.1.4.3, 1.1.4.4

Egbert Eich xorg-commit at pdx.freedesktop.org
Tue Mar 30 06:23:48 PST 2004


Committed by: eich

Update of /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/nsc
In directory pdx:/tmp/cvs-serv15785/programs/Xserver/hw/xfree86/drivers/nsc

Modified Files:
      Tag: XORG-CURRENT
	nsc_gx1_video.c nsc_gx2_video.c 
Log Message:
  36.  Conversion: __AMD64__ > __amd64__ (Egbert Eich).
  35.  Fixed stretching option and centering in C&T driver (Egbert Eich).
  34.  Added support for memory size tweaking in BIOS for i845 (Egbert Eich,
       thanks to Christian Ziez)
  33.  Removed video playback dependency on Accel in NSC drivers (Egbert
  3Eich).
  32.  Fix HW cursor state on Savage driver when entering VT as some
       BIOSes seem to enable it unconditionally (Egbert Eich).
  31.  Fixed Emulate3Button message to distinguish between 'hard' (ie.
       configured) and 'soft' (ie. automatic emulation that is disabled as
       soon as the  middle button is pressed) (Egbert Eich).
  30.  Free XrmDB in XCloseDisplay() only when implicitely allocated by
       XGetDefaults(). If Client allocates it itself it should free it also.
       Trying to free it for the client may result in segfault if the client
       has already freed it (Egbert Eich).



Index: nsc_gx1_video.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/nsc/nsc_gx1_video.c,v
retrieving revision 1.1.4.3
retrieving revision 1.1.4.4
diff -u -d -r1.1.4.3 -r1.1.4.4
--- a/nsc_gx1_video.c	5 Mar 2004 13:40:26 -0000	1.1.4.3
+++ b/nsc_gx1_video.c	30 Mar 2004 14:23:13 -0000	1.1.4.4
@@ -1,8 +1,8 @@
 /* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/nsc_gx1_video.c,v 1.7tsi Exp $ */
 /*
  * $Workfile: nsc_gx1_video.c $
- * $Revision$
- * $Author$
+ * $Revision: 1.1.4.3 $
+ * $Author: eich $
  *
  * File Contents: This file consists of main Xfree video supported routines.
  *
@@ -243,7 +243,6 @@
 
    pGeode = GEODEPTR(pScreenInfo);
 
-   if (!pGeode->NoAccel) {
       ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
       XF86VideoAdaptorPtr *adaptors, *newAdaptors = NULL;
       XF86VideoAdaptorPtr newAdaptor = NULL;
@@ -278,7 +277,6 @@
 
       if (newAdaptors)
 	 xfree(newAdaptors);
-   }
 }
 
 /* client libraries expect an encoding */
@@ -413,17 +411,15 @@
 void
 GX1ResetVideo(ScrnInfoPtr pScrn)
 {
-   GeodePtr pGeode = GEODEPTR(pScrn);
-
-   if (!pGeode->NoAccel) {
-      GeodePortPrivPtr pPriv = pGeode->adaptor->pPortPrivates[0].ptr;
+    GeodePtr pGeode = GEODEPTR(pScrn);
 
-      DEBUGMSG(0, (0, X_NONE, "ResetVideo\n"));
-      GX1AccelSync(pScrn);
-      GFX(set_video_palette(NULL));
-      GX1SetColorkey(pScrn, pPriv);
-      GFX(set_video_filter(pPriv->filter, pPriv->filter));
-   }
+    GeodePortPrivPtr pPriv = pGeode->adaptor->pPortPrivates[0].ptr;
+    
+    DEBUGMSG(0, (0, X_NONE, "ResetVideo\n"));
+    GX1AccelSync(pScrn);
+    GFX(set_video_palette(NULL));
+    GX1SetColorkey(pScrn, pPriv);
+    GFX(set_video_filter(pPriv->filter, pPriv->filter));
 }
 
 /*----------------------------------------------------------------------------
@@ -537,7 +533,7 @@
    DEBUGMSG(0, (0, X_NONE, "StopVideo\n"));
    REGION_EMPTY(pScrn->pScreen, &pPriv->clip);
 
-   GX1AccelSync(pScrn);
+   if (!pGeode->NoAccel) GX1AccelSync(pScrn);
    if (exit) {
       if (pPriv->videoStatus & CLIENT_VIDEO_ON) {
 	 GFX(set_video_enable(0));
@@ -580,8 +576,9 @@
 		    Atom attribute, INT32 value, pointer data)
 {
    GeodePortPrivPtr pPriv = (GeodePortPrivPtr) data;
+   GeodePtr pGeode = GEODEPTR(pScrn);
 
-   GX1AccelSync(pScrn);
+   if (!pGeode->NoAccel) GX1AccelSync(pScrn);
    if (attribute == xvColorKey) {
       pPriv->colorKey = value;
       GX1SetColorkey(pScrn, pPriv);
@@ -1002,7 +999,7 @@
    GeodePtr pGeode = GEODEPTR(pScrn);
 
    /*    DisplayModePtr mode = pScrn->currentMode; */
-   GX1AccelSync(pScrn);
+   if (!pGeode->NoAccel) GX1AccelSync(pScrn);
 
    GFX(set_video_enable(1));
 
@@ -1353,7 +1350,7 @@
    (*pScreen->BlockHandler) (i, blockData, pTimeout, pReadmask);
    pScreen->BlockHandler = GX1BlockHandler;
 
-   GX1AccelSync(pScrn);
+   if (!pGeode->NoAccel) GX1AccelSync(pScrn);
    if (pPriv->videoStatus & TIMER_MASK) {
       UpdateCurrentTime();
       if (pPriv->videoStatus & OFF_TIMER) {

Index: nsc_gx2_video.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/nsc/nsc_gx2_video.c,v
retrieving revision 1.1.4.3
retrieving revision 1.1.4.4
diff -u -d -r1.1.4.3 -r1.1.4.4
--- a/nsc_gx2_video.c	5 Mar 2004 13:40:26 -0000	1.1.4.3
+++ b/nsc_gx2_video.c	30 Mar 2004 14:23:13 -0000	1.1.4.4
@@ -1,8 +1,8 @@
 /* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/nsc_gx2_video.c,v 1.6tsi Exp $ */
 /*
  * $Workfile: nsc_gx2_video.c $
- * $Revision$
- * $Author$
+ * $Revision: 1.1.4.3 $
+ * $Author: eich $
  *
  * File Contents: This file consists of main Xfree video supported routines.
  *
@@ -233,46 +233,44 @@
 void
 GX2InitVideo(ScreenPtr pScreen)
 {
-   GeodePtr pGeode;
-   ScrnInfoPtr pScreenInfo = xf86Screens[pScreen->myNum];
+    GeodePtr pGeode;
+    ScrnInfoPtr pScreenInfo = xf86Screens[pScreen->myNum];
 
-   pGeode = GEODEPTR(pScreenInfo);
+    pGeode = GEODEPTR(pScreenInfo);
 
-   if (!pGeode->NoAccel) {
-      ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
-      XF86VideoAdaptorPtr *adaptors, *newAdaptors = NULL;
-      XF86VideoAdaptorPtr newAdaptor = NULL;
+    ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+    XF86VideoAdaptorPtr *adaptors, *newAdaptors = NULL;
+    XF86VideoAdaptorPtr newAdaptor = NULL;
 
-      int num_adaptors;
+    int num_adaptors;
 
-      newAdaptor = GX2SetupImageVideo(pScreen);
-      GX2InitOffscreenImages(pScreen);
+    newAdaptor = GX2SetupImageVideo(pScreen);
+    GX2InitOffscreenImages(pScreen);
 
-      num_adaptors = xf86XVListGenericAdaptors(pScrn, &adaptors);
+    num_adaptors = xf86XVListGenericAdaptors(pScrn, &adaptors);
 
-      if (newAdaptor) {
-	 if (!num_adaptors) {
+    if (newAdaptor) {
+	if (!num_adaptors) {
 	    num_adaptors = 1;
 	    adaptors = &newAdaptor;
-	 } else {
+	} else {
 	    newAdaptors =		/* need to free this someplace */
-		  xalloc((num_adaptors + 1) * sizeof(XF86VideoAdaptorPtr *));
+		xalloc((num_adaptors + 1) * sizeof(XF86VideoAdaptorPtr *));
 	    if (newAdaptors) {
-	       memcpy(newAdaptors, adaptors, num_adaptors *
-		      sizeof(XF86VideoAdaptorPtr));
-	       newAdaptors[num_adaptors] = newAdaptor;
-	       adaptors = newAdaptors;
-	       num_adaptors++;
+		memcpy(newAdaptors, adaptors, num_adaptors *
+		       sizeof(XF86VideoAdaptorPtr));
+		newAdaptors[num_adaptors] = newAdaptor;
+		adaptors = newAdaptors;
+		num_adaptors++;
 	    }
-	 }
-      }
+	}
+    }
 
-      if (num_adaptors)
-	 xf86XVScreenInit(pScreen, adaptors, num_adaptors);
+    if (num_adaptors)
+	xf86XVScreenInit(pScreen, adaptors, num_adaptors);
 
-      if (newAdaptors)
-	 xfree(newAdaptors);
-   }
+    if (newAdaptors)
+	xfree(newAdaptors);
 }
 
 /* client libraries expect an encoding */
@@ -416,16 +414,14 @@
 void
 GX2ResetVideo(ScrnInfoPtr pScrn)
 {
-   GeodePtr pGeode = GEODEPTR(pScrn);
+    GeodePtr pGeode = GEODEPTR(pScrn);
 
-   if (!pGeode->NoAccel) {
-      GeodePortPrivPtr pPriv = pGeode->adaptor->pPortPrivates[0].ptr;
+    GeodePortPrivPtr pPriv = pGeode->adaptor->pPortPrivates[0].ptr;
 
-      GX2AccelSync(pScrn);
-      GFX(set_video_palette(NULL));
-      GX2SetColorkey(pScrn, pPriv);
-      GFX(set_video_filter(pPriv->filter, pPriv->filter));
-   }
+    if (!pGeode->NoAccel) GX2AccelSync(pScrn);
+    GFX(set_video_palette(NULL));
+    GX2SetColorkey(pScrn, pPriv);
+    GFX(set_video_filter(pPriv->filter, pPriv->filter));
 }
 
 /*----------------------------------------------------------------------------
@@ -537,7 +533,7 @@
 
    REGION_EMPTY(pScrn->pScreen, &pPriv->clip);
 
-   GX2AccelSync(pScrn);
+   if (!pGeode->NoAccel) GX2AccelSync(pScrn);
    if (exit) {
       if (pPriv->videoStatus & CLIENT_VIDEO_ON) {
 	 GFX(set_video_enable(0));
@@ -580,8 +576,9 @@
 		    Atom attribute, INT32 value, pointer data)
 {
    GeodePortPrivPtr pPriv = (GeodePortPrivPtr) data;
+   GeodePtr pGeode = GEODEPTR(pScrn);
 
-   GX2AccelSync(pScrn);
+   if (!pGeode->NoAccel) GX2AccelSync(pScrn);
    if (attribute == xvColorKey) {
       pPriv->colorKey = value;
       GX2SetColorkey(pScrn, pPriv);
@@ -941,7 +938,7 @@
 {
    GeodePtr pGeode = GEODEPTR(pScrn);
 
-   GX2AccelSync(pScrn);
+   if (!pGeode->NoAccel) GX2AccelSync(pScrn);
 
    GFX(set_video_enable(1));
 
@@ -1298,7 +1295,7 @@
    (*pScreen->BlockHandler) (i, blockData, pTimeout, pReadmask);
    pScreen->BlockHandler = GX2BlockHandler;
 
-   GX2AccelSync(pScrn);
+   if (!pGeode->NoAccel) GX2AccelSync(pScrn);
    if (pPriv->videoStatus & TIMER_MASK) {
       UpdateCurrentTime();
       if (pPriv->videoStatus & OFF_TIMER) {




More information about the xorg-commit-diffs mailing list