[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#178600: xfree86: Support for the S3Trio64V2



Package: xfree86
Version: unavailable; reported 2003-01-27
Severity: wishlist
Tags: patch

Hi!

We have made this dummy patch so that the S3 Trio64V2 is recogniced by XFree
4.2.1 we have tested it a bit on our machine, the card seems to work ok and
we don't think it wil break anything as the code changes are really small.

I think it would be good if you if you could forward this upstream if you
feel like the patch is ok, if so tell me. I suppose that to get full support
of this card (we don't have any specs or anything) more specific code should
be written, but this allows X 4.2.1 to run on this card, which couldn't be
done before.

Well, hope this helps people with this cards.

Regards!

-- System Information:
Debian Release: 3.0
Architecture: i386
Kernel: Linux clandestino 2.4.20 #1 Mon Dec 2 09:30:53 CET 2002 i686
Locale: LANG=es_ES@euro, LC_CTYPE=es_ES@euro

--------------------------- s3trio64v2.diff --------------------------------

Patch to add dummy support for the S3 Trio64V2 DX or GX
By Santiago Garcia Mantinan and Javier Moran Rua

--- xc/programs/Xserver/hw/xfree86/drivers/s3/s3_driver.c.orig	Fri Jan 24 14:40:44 2003
+++ xc/programs/Xserver/hw/xfree86/drivers/s3/s3_driver.c	Fri Jan 24 14:48:06 2003
@@ -131,6 +131,7 @@
 	{ PCI_CHIP_968,		"968" },
 	{ PCI_CHIP_TRIO, 	"Trio32/64" },
 	{ PCI_CHIP_AURORA64VP,	"Aurora64V+" },
+	{ PCI_CHIP_TRIO64V2_DXGX, "Trio64V2/DX or /GX" },
 	{ -1, NULL }
 };
 
@@ -141,6 +142,7 @@
 	{ PCI_CHIP_968, 	PCI_CHIP_968, 		RES_SHARED_VGA },
 	{ PCI_CHIP_TRIO, 	PCI_CHIP_TRIO, 		RES_SHARED_VGA },
 	{ PCI_CHIP_AURORA64VP,	PCI_CHIP_AURORA64VP, 	RES_SHARED_VGA },
+	{ PCI_CHIP_TRIO64V2_DXGX,PCI_CHIP_TRIO64V2_DXGX,RES_SHARED_VGA },
 	{ -1,			-1,	      		RES_UNDEFINED }
 };
 
@@ -526,6 +528,7 @@
 	case PCI_CHIP_964_0:
 	case PCI_CHIP_964_1:
 	case PCI_CHIP_TRIO:
+	case PCI_CHIP_TRIO64V2_DXGX:
 	case PCI_CHIP_AURORA64VP:		/* ??? */
 		pS3->S3NewMMIO = FALSE;
 		break;
@@ -652,6 +655,18 @@
 #if 0
 		pS3->CursorInit = S3_CursorInit;	/* FIXME broken */
 #endif
+		if (pS3->Chipset == PCI_CHIP_TRIO64V2_DXGX)
+		switch(pScrn->bitsPerPixel) {
+		case 8:
+		case 16:
+			pS3->MaxClock = 170000;
+			break;
+		case 24:
+		case 32:
+			pS3->MaxClock = 135000;
+			break;
+		}
+		else
 		switch(pScrn->bitsPerPixel) {
 		case 8:
 			pS3->MaxClock = 135000;
@@ -1106,7 +1121,7 @@
 
 	if (pS3->Chipset == PCI_CHIP_968)
 		shift = 1;	/* XXX IBMRGB */
-	else if (pS3->Chipset == PCI_CHIP_TRIO)
+	else if ((pS3->Chipset == PCI_CHIP_TRIO) || (pS3->Chipset == PCI_CHIP_TRIO64V2_DXGX ))
 		shift = -(pS3->s3Bpp >> 1);
 
 	return shift;
--- xc/programs/Xserver/hw/xfree86/drivers/s3/s3.h.orig	Fri Jan 24 14:40:23 2003
+++ xc/programs/Xserver/hw/xfree86/drivers/s3/s3.h	Fri Jan 24 14:18:45 2003
@@ -240,6 +240,7 @@
 #define S3_964_SERIES()		((pS3->Chipset == PCI_CHIP_964_0) ||	\
 			 	 (pS3->Chipset == PCI_CHIP_964_1))
 #define	S3_TRIO_SERIES()	((pS3->Chipset == PCI_CHIP_TRIO) ||	\
-			 	 (pS3->Chipset == PCI_CHIP_AURORA64VP))
+			 	 (pS3->Chipset == PCI_CHIP_AURORA64VP) || \
+				 (pS3->Chipset == PCI_CHIP_TRIO64V2_DXGX))
 
 #endif /* _S3_H */





Reply to: