[Xpert]Trident RGB overlay fix

2002-09-18 Thread Alastair Robinson

Hi everyone,

I now have a fix for the RGB overlay support in the current Trident driver 
(note: the problem has been observed on, and this fix tested on my integrated 
CyberBlade i1 - I have no other trident hardware for testing...)

The problem was caused by the driver not disabling the Colour Space Converter 
for the RGB mode.

As patched, the driver provides a working RV16 (565 RGB) colour mode, tested 
with my XMame Xv patch), and removes the RV15 format altogether; this was 
done because the CyberBlade i1 doesn't support RV15, and AFAICT the driver 
doesn't make any distinction between RV15 and RV16 when setting registers 
anyway.

Could someone more knowledgable about Trident chipsets in general confirm 
whether any of them support RV15 (555 RGB) overlays, and if so, how they are 
enabled...

Here's the patch:
--- cut here ---
diff -ur trident.old/trident_video.c trident.rgbfix/trident_video.c
--- trident.old/trident_video.c Wed Sep 18 18:02:35 2002
+++ trident.rgbfix/trident_video.c  Wed Sep 18 17:56:49 2002
@@ -170,10 +170,11 @@
 {XvSettable | XvGettable, 0, 7,   "XV_CONTRAST"}
 };

-#define NUM_IMAGES 4
+#define NUM_IMAGES 3

 static XF86ImageRec Images[NUM_IMAGES] =
 {
+#if 0
{
0x35315652,
 XvRGB,
@@ -191,6 +192,7 @@
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
XvTopToBottom
},
+#endif
{
0x36315652,
 XvRGB,
@@ -200,7 +202,7 @@
16,
XvPacked,
1,
-   16, 0x001F, 0x07E0, 0xF800,
+   16, 0xF800, 0x07E0, 0x001F,
0, 0, 0,
0, 0, 0,
0, 0, 0,
@@ -767,7 +769,10 @@
 case 0x35315652:   /* RGB15 */
 case 0x36315652:   /* RGB16 */
if (pTrident->Chipset >= CYBER9397) {
-   OUTW(vgaIOBase + 4, 0x22BF);
+OUTW(vgaIOBase + 4, 0x22BF);
+OUTW(vgaIOBase + 4, 0xD48E);
+OUTW(vgaIOBase + 4, 0x248F); /* Need CSC Disable */
+
} else {
OUTW(vgaIOBase + 4, 0x118F);
}
@@ -776,7 +781,9 @@
 case FOURCC_YUY2:  /* YUY2 */
 default:
if (pTrident->Chipset >= CYBER9397) {
-   OUTW(vgaIOBase + 4, 0x00BF);
+OUTW(vgaIOBase + 4, 0x00BF);
+OUTW(vgaIOBase + 4, 0xD48E);
+OUTW(vgaIOBase + 4, 0x208F);
} else {
OUTW(vgaIOBase + 4, 0x108F);
}
@@ -892,8 +899,6 @@
OUTW(vgaIOBase + 4, 0xFFBC);
OUTW(vgaIOBase + 4, 0xFFBD);
OUTW(vgaIOBase + 4, 0x04BE);
-   OUTW(vgaIOBase + 4, 0xD48E);
-   OUTW(vgaIOBase + 4, 0x208F);
 } else {

OUTW(vgaIOBase + 4, id == FOURCC_YV12) || (id == FOURCC_YUY2))
--- cut here ---

All the best,
-- 
Alastair M. Robinson
Email: [EMAIL PROTECTED]

Fairy Tale, n.: A horror story to prepare children for the newspapers.

___
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert



[Xpert]Guidance with Trident driver and XAA

2002-09-17 Thread Alastair Robinson

Hi everyone,

I'm trying to reduce the impact that the current trident driver has on my 
EPIA-5000 motherboard (integrated shared-mem CyberBlade I1).

Currently, using solid window dragging causes severe sound distortion as (I 
presume) the soundcard's PCI air-supply is cut off...  This doesn't happen if 
I use the vesa driver.

I've experimented with the Trident driver, and found that dropping a 
usleep(1); into the end of BladeSubsequentScreenToScreenCopy() solves the 
audio problem at a stroke, but of course impacts the driver performance.

Can anyone suggest a better way of solving this problem?

All the best,
-- 
Alastair M. Robinson
Email: [EMAIL PROTECTED]

640K ought to be enough for anybody. -- Bill Gates, 1981
___
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert



Re: [Xpert]Trident Cyberblade RGB overlays

2002-09-12 Thread Alastair Robinson

Hi Paul,

On Thursday 12 September 2002 8:00 pm, you wrote:

> Here is the link to the Northbridge chipset datasheet:
> 
> http://www.viavpsd.com/product/6/15/DS8601A182.pdf

Many thanks for this link - I obviously didn't look hard enough :)

All the best,
-- 
Alastair M. Robinson
Email: [EMAIL PROTECTED]

Beware of Geeks Bearing .GIF's...
___
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert



[Xpert]Trident Cyberblade RGB overlays

2002-09-11 Thread Alastair Robinson

Hi Everyone,

I've just bought a VIA EPIA-5000 motherboard, which has an integrated Trident 
Blade 3D.

I've been playing around with the Xv extension recently, most notably to add 
support for it to the XMAME arcade machine emulator - for this purpose RGB 
overlays are more suited than YUV.

The integrated Blade 3D, according to xvinfo, supports RV15 and RV16, which 
are supposedly 15- and 16-bit RGB - however, my tests suggest that these 
formats are not RGB - they're not YUV either, in fact they seem to be a 
bizarre mixture of the two, with the so-called green channel adjusting grey, 
and the other two interacting weirdly with it.

Anyway, does anyone have any hardware information for this chipset, so I can 
have a go at fixing the problem?

All the best,
-- 
Alastair M. Robinson
Email: [EMAIL PROTECTED]

What's the difference between a bad archer and a constipated owl?
One shoots but can't hit...
___
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert