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

Reply via email to