diff options
-rw-r--r-- | CALLMAP | 2 | ||||
-rw-r--r-- | README | 2 | ||||
-rw-r--r-- | Release.txt | 2 | ||||
-rw-r--r-- | man/siliconmotion.man | 2 | ||||
-rw-r--r-- | src/regsmi.h | 2 | ||||
-rw-r--r-- | src/smi.h | 2 | ||||
-rw-r--r-- | src/smi_accel.c | 2 | ||||
-rw-r--r-- | src/smi_dac.c | 2 | ||||
-rw-r--r-- | src/smi_dga.c | 2 | ||||
-rw-r--r-- | src/smi_driver.c | 2 | ||||
-rw-r--r-- | src/smi_hwcurs.c | 2 | ||||
-rw-r--r-- | src/smi_i2c.c | 2 | ||||
-rw-r--r-- | src/smi_shadow.c | 2 | ||||
-rw-r--r-- | src/smi_video.c | 111 | ||||
-rw-r--r-- | src/smi_video.h | 2 |
15 files changed, 40 insertions, 99 deletions
@@ -19,4 +19,4 @@ ChipScreenInit Header: \\Mercury\Projects\archives\XFree86 4.0\CALLMAP.-arc 1.1 13 Jul 2000 18:16:58 Frido $ -$XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/CALLMAP,v 1.1 2000/11/28 20:59:18 dawes Exp $ +$XFree86$ @@ -73,4 +73,4 @@ Debug: Header: //Mercury/Projects/archives/XFree86/4.0/README.-arc 1.2 14 Sep 2000 12:28:36 Frido $ -$XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/README,v 1.3 2001/02/15 18:20:33 dawes Exp $ +$XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/README,v 1.2 2000/12/05 21:18:37 dawes Exp $ diff --git a/Release.txt b/Release.txt index 204dba7..820d13a 100644 --- a/Release.txt +++ b/Release.txt @@ -228,4 +228,4 @@ frido@siliconmotion.com. Header: //Mercury/Projects/archives/XFree86/4.0/Release.txt-arc 1.33 13 Dec 2000 09:52:48 Frido $ -$XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/Release.txt,v 1.7 2001/12/20 21:35:37 eich Exp $ +$XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/Release.txt,v 1.5 2001/02/15 18:20:33 dawes Exp $ diff --git a/man/siliconmotion.man b/man/siliconmotion.man index acaec8d..b9614bb 100644 --- a/man/siliconmotion.man +++ b/man/siliconmotion.man @@ -1,5 +1,5 @@ .\" Header: //Mercury/Projects/archives/XFree86/4.0/siliconmotion.cpp-arc 1.4 29 Nov 2000 14:12:56 Frido $ -.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/siliconmotion.man,v 1.5 2003/10/08 11:13:01 eich Exp $ +.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/siliconmotion.man,v 1.2 2001/01/27 18:20:52 dawes Exp $ .\" shorthand for double quote that works everywhere. .ds q \N'34' .TH siliconmotion __drivermansuffix__ __vendorversion__ diff --git a/src/regsmi.h b/src/regsmi.h index da0f659..d2dc840 100644 --- a/src/regsmi.h +++ b/src/regsmi.h @@ -26,7 +26,7 @@ Silicon Motion shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the XFree86 Project and SIlicon Motion. */ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/regsmi.h,v 1.3 2003/10/08 11:13:01 eich Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/regsmi.h,v 1.1 2000/11/28 20:59:19 dawes Exp $ */ #ifndef _REGSMI_H #define _REGSMI_H @@ -26,7 +26,7 @@ Silicon Motion shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the XFree86 Project and Silicon Motion. */ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/smi.h,v 1.14 2003/10/08 11:13:01 eich Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/smi.h,v 1.12tsi Exp $ */ #ifndef _SMI_H #define _SMI_H diff --git a/src/smi_accel.c b/src/smi_accel.c index 70e369b..d55ad6e 100644 --- a/src/smi_accel.c +++ b/src/smi_accel.c @@ -26,7 +26,7 @@ Silicon Motion shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the XFree86 Project and silicon Motion. */ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/smi_accel.c,v 1.9 2003/10/08 11:13:01 eich Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/smi_accel.c,v 1.7tsi Exp $ */ #include "smi.h" diff --git a/src/smi_dac.c b/src/smi_dac.c index 627b892..c606712 100644 --- a/src/smi_dac.c +++ b/src/smi_dac.c @@ -26,7 +26,7 @@ Silicon Motion shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the XFree86 Project and Silicon Motion. */ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/smi_dac.c,v 1.2 2001/11/30 12:11:59 eich Exp $ */ +/* $XFree86$ */ #include "smi.h" diff --git a/src/smi_dga.c b/src/smi_dga.c index 9f090b9..7ee542e 100644 --- a/src/smi_dga.c +++ b/src/smi_dga.c @@ -26,7 +26,7 @@ Silicon Motion shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the XFree86 Project and Silicon Motion. */ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/smi_dga.c,v 1.2 2001/02/15 18:20:33 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/smi_dga.c,v 1.1 2000/11/28 20:59:19 dawes Exp $ */ #include "xf86.h" #include "xf86_OSproc.h" diff --git a/src/smi_driver.c b/src/smi_driver.c index 1d25f80..a75ea59 100644 --- a/src/smi_driver.c +++ b/src/smi_driver.c @@ -26,7 +26,7 @@ Silicon Motion shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The XFree86 Project or Silicon Motion. */ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/smi_driver.c,v 1.37 2003/11/06 18:38:08 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/smi_driver.c,v 1.36tsi Exp $ */ #include "xf86Resources.h" #include "xf86RAC.h" diff --git a/src/smi_hwcurs.c b/src/smi_hwcurs.c index 2c8c63f..fb89969 100644 --- a/src/smi_hwcurs.c +++ b/src/smi_hwcurs.c @@ -26,7 +26,7 @@ Silicon Motion shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the XFree86 Project and Silicon Motion. */ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/smi_hwcurs.c,v 1.3 2003/10/08 11:13:01 eich Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/smi_hwcurs.c,v 1.1 2000/11/28 20:59:20 dawes Exp $ */ #include "cursorstr.h" #include "smi.h" diff --git a/src/smi_i2c.c b/src/smi_i2c.c index 3a73ced..f395df4 100644 --- a/src/smi_i2c.c +++ b/src/smi_i2c.c @@ -26,7 +26,7 @@ Silicon Motion shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the XFree86 Project and Silicon Motion. */ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/smi_i2c.c,v 1.2 2001/12/20 21:35:39 eich Exp $ */ +/* $XFree86$ */ #include "xf86.h" #include "xf86_OSproc.h" diff --git a/src/smi_shadow.c b/src/smi_shadow.c index ed7372b..32bd1ce 100644 --- a/src/smi_shadow.c +++ b/src/smi_shadow.c @@ -26,7 +26,7 @@ Silicon Motion shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the XFree86 Project and Silicon Motion. */ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/smi_shadow.c,v 1.3 2003/10/08 11:13:01 eich Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/smi_shadow.c,v 1.1 2000/11/28 20:59:20 dawes Exp $ */ #include "xf86.h" #include "xf86_OSproc.h" diff --git a/src/smi_video.c b/src/smi_video.c index 06dcc3a..6254916 100644 --- a/src/smi_video.c +++ b/src/smi_video.c @@ -41,6 +41,7 @@ Author of changes: Corvin Zahn <zahn@zac.de> Date: 2.11.2001 */ +/* $XdotOrg: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/smi_video.c,v 1.1.4.2.4.2 2004/03/04 20:16:31 kaleb Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/smi_video.c,v 1.13 2003/11/10 18:22:26 tsi Exp $ */ #include "smi.h" @@ -133,11 +134,6 @@ static void SMI_WaitForSync(ScrnInfoPtr pScrn); static void SMI_InitOffscreenImages(ScreenPtr pScreen); static FBAreaPtr SMI_AllocateMemory(ScrnInfoPtr pScrn, FBAreaPtr area, int numLines); -static void SMI_CopyData(unsigned char *src, unsigned char *dst, int srcPitch, - int dstPitch, int height, int width); -static void SMI_CopyYV12Data(unsigned char *src1, unsigned char *src2, - unsigned char *src3, unsigned char *dst, int srcPitch1, int srcPitch2, - int dstPitch, int height, int width); static int SMI_AllocSurface(ScrnInfoPtr pScrn, int id, unsigned short width, unsigned short height, @@ -1690,27 +1686,31 @@ SMI_PutImage( offset = (pPort->area->box.y1 * fbPitch) + (top * dstPitch); dstStart = pSmi->FBBase + offset + left; - switch (id) - { - case FOURCC_YV12: - case FOURCC_I420: - top &= ~1; - tmp = ((top >> 1) * srcPitch2) + (left >> 2); - offset2 += tmp; - offset3 += tmp; - nLines = ((((y2 + 0xFFFF) >> 16) + 1) & ~1) - top; - SMI_CopyYV12Data(buf + (top * srcPitch) + (left >> 1), - buf + offset2, buf + offset3, dstStart, srcPitch, srcPitch2, - dstPitch, nLines, nPixels); - break; - - default: - buf += (top * srcPitch) + left; - nLines = ((y2 + 0xFFFF) >> 16) - top; - SMI_CopyData(buf, dstStart, srcPitch, dstPitch, nLines, - nPixels * bpp); - break; - } + switch(id) { + case FOURCC_YV12: + case FOURCC_I420: + top &= ~1; + tmp = ((top >> 1) * srcPitch2) + (left >> 2); + offset2 += tmp; + offset3 += tmp; + if(id == FOURCC_I420) { + tmp = offset2; + offset2 = offset3; + offset3 = tmp; + } + nLines = ((((y2 + 0xffff) >> 16) + 1) & ~1) - top; + xf86XVCopyYUV12ToPacked(buf + (top * srcPitch) + (left >> 1), + buf + offset2, buf + offset3, dstStart, + srcPitch, srcPitch2, dstPitch, nLines, nPixels); + break; + case FOURCC_UYVY: + case FOURCC_YUY2: + default: + buf += (top * srcPitch) + left; + nLines = ((y2 + 0xffff) >> 16) - top; + xf86XVCopyPacked(buf, dstStart, srcPitch, dstPitch, nLines, nPixels); + break; + } #if XF86_VERSION_CURRENT < XF86_VERSION_NUMERIC(4,3,99,0,0) if (!RegionsEqual(&pPort->clip, clipBoxes)) @@ -2349,65 +2349,6 @@ SMI_AllocateMemory( return(area); } -static void -SMI_CopyData( - unsigned char *src, - unsigned char *dst, - int srcPitch, - int dstPitch, - int height, - int width -) -{ - ENTER_PROC("SMI_CopyData"); - - while (height-- > 0) - { - memcpy(dst, src, width); - src += srcPitch; - dst += dstPitch; - } - - LEAVE_PROC("SMI_CopyData"); -} - -static void -SMI_CopyYV12Data( - unsigned char *src1, - unsigned char *src2, - unsigned char *src3, - unsigned char *dst, - int srcPitch1, - int srcPitch2, - int dstPitch, - int height, - int width -) -{ - CARD32 *pDst = (CARD32 *) dst; - int i, j; - - ENTER_PROC("SMI_CopyYV12Data"); - - for (j = 0; j < height; j++) - { - for (i =0; i < width; i++) - { - pDst[i] = src1[i << 1] | (src1[(i << 1) + 1] << 16) | - (src3[i] << 8) | (src2[i] << 24); - } - pDst += dstPitch >> 2; - src1 += srcPitch1; - if (j & 1) - { - src2 += srcPitch2; - src3 += srcPitch2; - } - } - - LEAVE_PROC("SMI_CopyYV12Data"); -} - static int SMI_AllocSurface( ScrnInfoPtr pScrn, diff --git a/src/smi_video.h b/src/smi_video.h index b63e4bc..270e0fe 100644 --- a/src/smi_video.h +++ b/src/smi_video.h @@ -26,7 +26,7 @@ Silicon Motion shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the XFree86 Project and silicon Motion. */ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/smi_video.h,v 1.4 2002/09/16 18:06:01 eich Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/smi_video.h,v 1.1 2000/11/28 20:59:20 dawes Exp $ */ #ifndef _SMI_VIDEO_H #define _SMI_VIDEO_H |