diff options
author | Egbert Eich <eich@suse.de> | 2004-04-15 10:16:31 +0000 |
---|---|---|
committer | Egbert Eich <eich@suse.de> | 2004-04-15 10:16:31 +0000 |
commit | 77c81d0ca09142b91c3869b828c65b4cd029f4a4 (patch) | |
tree | ef3269805ab63bf330fca27a07d451fd59c2e076 | |
parent | 292218606289f5876ec4a283338fbec7f67420e2 (diff) |
Merged changes from RELEASE-1 branchbefore_20040421_xprint_branch_landingXORG-CURRENT-CLOSEDXORG-CURRENT
-rw-r--r-- | man/nsc.man | 6 | ||||
-rw-r--r-- | src/nsc_driver.c | 2 | ||||
-rw-r--r-- | src/nsc_gx1_video.c | 31 | ||||
-rw-r--r-- | src/nsc_gx2_video.c | 75 |
4 files changed, 60 insertions, 54 deletions
diff --git a/man/nsc.man b/man/nsc.man index 048abe9..d9addac 100644 --- a/man/nsc.man +++ b/man/nsc.man @@ -14,7 +14,7 @@ nsc \- Nsc video driver .fi .SH DESCRIPTION .B nsc -is an XFree86 driver for National Semiconductors GEODE processor family. +is an __xservername__ driver for National Semiconductors GEODE processor family. It uses the DURANGO kit provided by National Semiconductor. The driver is accelerated, and provides support for the following framebuffer depths: 8, 16 and 24. @@ -24,7 +24,7 @@ The driver supports GXLV (5530 companion chip), SC1200, SC1400 and GX2 (5535 companion chip). .SH CONFIGURATION DETAILS -Please refer to XF86Config(__filemansuffix__) for general configuration +Please refer to __xconfigfile__(__filemansuffix__) for general configuration details. This section only covers configuration details specific to this driver. .PP @@ -129,6 +129,6 @@ view on TV. The parameters xx: X-offset, yy: Y-offset, ww: Viewable width, hh: Viewable height. Default: no TV. .SH "SEE ALSO" -XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(__miscmansuffix__) +__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), xorgconfig(__appmansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__) .SH AUTHOR Author: Sarma V. Kolluru diff --git a/src/nsc_driver.c b/src/nsc_driver.c index bc49fc7..e312683 100644 --- a/src/nsc_driver.c +++ b/src/nsc_driver.c @@ -398,7 +398,7 @@ static XF86ModuleVersionInfo NscVersionRec = { MODULEVENDORSTRING, MODINFOSTRING1, MODINFOSTRING2, - XF86_VERSION_CURRENT, + XORG_VERSION_CURRENT, NSC_VERSION_MAJOR, NSC_VERSION_MINOR, NSC_PATCHLEVEL, ABI_CLASS_VIDEODRV, /* This is a video driver */ ABI_VIDEODRV_VERSION, diff --git a/src/nsc_gx1_video.c b/src/nsc_gx1_video.c index f5f994a..06e671e 100644 --- a/src/nsc_gx1_video.c +++ b/src/nsc_gx1_video.c @@ -243,6 +243,7 @@ GX1InitVideo(ScreenPtr pScreen) pGeode = GEODEPTR(pScreenInfo); + if (!pGeode->NoAccel) { ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; XF86VideoAdaptorPtr *adaptors, *newAdaptors = NULL; XF86VideoAdaptorPtr newAdaptor = NULL; @@ -277,6 +278,7 @@ GX1InitVideo(ScreenPtr pScreen) if (newAdaptors) xfree(newAdaptors); + } } /* client libraries expect an encoding */ @@ -411,15 +413,17 @@ GX1SetColorkey(ScrnInfoPtr pScrn, GeodePortPrivPtr pPriv) void GX1ResetVideo(ScrnInfoPtr pScrn) { - GeodePtr pGeode = GEODEPTR(pScrn); - - 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)); + GeodePtr pGeode = GEODEPTR(pScrn); + + if (!pGeode->NoAccel) { + 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)); + } } /*---------------------------------------------------------------------------- @@ -533,7 +537,7 @@ GX1StopVideo(ScrnInfoPtr pScrn, pointer data, Bool exit) DEBUGMSG(0, (0, X_NONE, "StopVideo\n")); REGION_EMPTY(pScrn->pScreen, &pPriv->clip); - if (!pGeode->NoAccel) GX1AccelSync(pScrn); + GX1AccelSync(pScrn); if (exit) { if (pPriv->videoStatus & CLIENT_VIDEO_ON) { GFX(set_video_enable(0)); @@ -576,9 +580,8 @@ GX1SetPortAttribute(ScrnInfoPtr pScrn, Atom attribute, INT32 value, pointer data) { GeodePortPrivPtr pPriv = (GeodePortPrivPtr) data; - GeodePtr pGeode = GEODEPTR(pScrn); - if (!pGeode->NoAccel) GX1AccelSync(pScrn); + GX1AccelSync(pScrn); if (attribute == xvColorKey) { pPriv->colorKey = value; GX1SetColorkey(pScrn, pPriv); @@ -999,7 +1002,7 @@ GX1DisplayVideo(ScrnInfoPtr pScrn, GeodePtr pGeode = GEODEPTR(pScrn); /* DisplayModePtr mode = pScrn->currentMode; */ - if (!pGeode->NoAccel) GX1AccelSync(pScrn); + GX1AccelSync(pScrn); GFX(set_video_enable(1)); @@ -1350,7 +1353,7 @@ GX1BlockHandler(int i, pointer blockData, pointer pTimeout, pointer pReadmask) (*pScreen->BlockHandler) (i, blockData, pTimeout, pReadmask); pScreen->BlockHandler = GX1BlockHandler; - if (!pGeode->NoAccel) GX1AccelSync(pScrn); + GX1AccelSync(pScrn); if (pPriv->videoStatus & TIMER_MASK) { UpdateCurrentTime(); if (pPriv->videoStatus & OFF_TIMER) { diff --git a/src/nsc_gx2_video.c b/src/nsc_gx2_video.c index 38bce24..2213f32 100644 --- a/src/nsc_gx2_video.c +++ b/src/nsc_gx2_video.c @@ -233,44 +233,46 @@ static Atom xvColorKey, xvColorKeyMode, xvFilter void GX2InitVideo(ScreenPtr pScreen) { - GeodePtr pGeode; - ScrnInfoPtr pScreenInfo = xf86Screens[pScreen->myNum]; + GeodePtr pGeode; + ScrnInfoPtr pScreenInfo = xf86Screens[pScreen->myNum]; - pGeode = GEODEPTR(pScreenInfo); + pGeode = GEODEPTR(pScreenInfo); - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; - XF86VideoAdaptorPtr *adaptors, *newAdaptors = NULL; - XF86VideoAdaptorPtr newAdaptor = NULL; + if (!pGeode->NoAccel) { + 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 */ @@ -414,14 +416,16 @@ GX2SetColorkey(ScrnInfoPtr pScrn, GeodePortPrivPtr pPriv) void GX2ResetVideo(ScrnInfoPtr pScrn) { - GeodePtr pGeode = GEODEPTR(pScrn); + GeodePtr pGeode = GEODEPTR(pScrn); - GeodePortPrivPtr pPriv = pGeode->adaptor->pPortPrivates[0].ptr; + if (!pGeode->NoAccel) { + GeodePortPrivPtr pPriv = pGeode->adaptor->pPortPrivates[0].ptr; - if (!pGeode->NoAccel) GX2AccelSync(pScrn); - GFX(set_video_palette(NULL)); - GX2SetColorkey(pScrn, pPriv); - GFX(set_video_filter(pPriv->filter, pPriv->filter)); + GX2AccelSync(pScrn); + GFX(set_video_palette(NULL)); + GX2SetColorkey(pScrn, pPriv); + GFX(set_video_filter(pPriv->filter, pPriv->filter)); + } } /*---------------------------------------------------------------------------- @@ -533,7 +537,7 @@ GX2StopVideo(ScrnInfoPtr pScrn, pointer data, Bool exit) REGION_EMPTY(pScrn->pScreen, &pPriv->clip); - if (!pGeode->NoAccel) GX2AccelSync(pScrn); + GX2AccelSync(pScrn); if (exit) { if (pPriv->videoStatus & CLIENT_VIDEO_ON) { GFX(set_video_enable(0)); @@ -576,9 +580,8 @@ GX2SetPortAttribute(ScrnInfoPtr pScrn, Atom attribute, INT32 value, pointer data) { GeodePortPrivPtr pPriv = (GeodePortPrivPtr) data; - GeodePtr pGeode = GEODEPTR(pScrn); - if (!pGeode->NoAccel) GX2AccelSync(pScrn); + GX2AccelSync(pScrn); if (attribute == xvColorKey) { pPriv->colorKey = value; GX2SetColorkey(pScrn, pPriv); @@ -938,7 +941,7 @@ GX2DisplayVideo(ScrnInfoPtr pScrn, { GeodePtr pGeode = GEODEPTR(pScrn); - if (!pGeode->NoAccel) GX2AccelSync(pScrn); + GX2AccelSync(pScrn); GFX(set_video_enable(1)); @@ -1295,7 +1298,7 @@ GX2BlockHandler(int i, pointer blockData, pointer pTimeout, pointer pReadmask) (*pScreen->BlockHandler) (i, blockData, pTimeout, pReadmask); pScreen->BlockHandler = GX2BlockHandler; - if (!pGeode->NoAccel) GX2AccelSync(pScrn); + GX2AccelSync(pScrn); if (pPriv->videoStatus & TIMER_MASK) { UpdateCurrentTime(); if (pPriv->videoStatus & OFF_TIMER) { |