Hi Xavier,

Okay, at least some progress.
I was guessing that LVDS1 was still at IGA1, so switching to IGA2 will correct 
the problem, but I guess there were still some missing pieces.
Based on what you reported, I wrote a patch that should now correctly 
initialize LVDS1 for VX855 and VX900 chipsets.
It appears that these only have one LVDS channel as opposed to CX700/VX700 and 
VX800 chipsets which appear to have two LVDS channels, to which one of them can 
be used as DVI.
I hope the patch works.

Regards,

Kevin Brace
The OpenChrome Project maintainer / developer


> Sent: Tuesday, March 14, 2017 at 9:06 AM
> From: "Xavier Bachelot" <xav...@bachelot.org>
> To: "Kevin Brace" <kevinbr...@gmx.com>, openchrome-devel@lists.freedesktop.org
> Subject: Re: [Openchrome-devel] openchrome 0.6.0 regressions on VX900 laptop
>
> Hi Kevin,
> 
> On 14/03/2017 04:42, Kevin Brace wrote:
> > The register dump was helpful, and I think the cause of the FP not working 
> > is due to LVDS1 (The VIA datasheet calls it LVDS Channel 0 sometimes, but I 
> > will call it LVDS Channel 1. Accordingly, LVDS2 will be called LVDS Channel 
> > 2.) sending IGA1 display stream, not IGA2.
> > When the computer boots, it probably sets LVDS1 display stream source to 
> > IGA1, and the register dump indicates this.
> > If you manually switch the LVDS1 to IGA2, that should solve the bug.
> > 
> > $ cd tools
> > $ sudo ./via_regs_dump -r 3d5.99
> > 
> > The screen according to your Version 0.6 + your panel index fix patch 
> > returned 0x01.
> > Now, write 0x11 to 3X5.99
> > 
> > $ sudo ./via_regs_dump -w 3d5.99 11
> > 
> > Bit 4 of 3X5.99 determines the display source.
> > 0 for IGA1 and 1 for IGA2.
> > I hope this experiment will get the screen back.
> > It appears that the LCDCK PLL is set correctly, so hopefully this fix will 
> > work.
> 
> That helps a bit, but does not fully fix the problem. A very distorted
> image of what should be displayed is now showing in the upper half or
> third of the FP. The remaining of the screen seems like uninitialized
> memory.
> 
> Btw, via_regs_dump gets installed into /usr/sbin and also I'm here for
> long enough to know how to build the driver and use the regs dumper, no
> need to go into too much details. Actually, I did import the regs dumper
> into the openchrome tree and even fixed a couple things in it.
> For the record, the Epia M10K CLE266-based board that brought me to
> Unichrome then Openchrome in 2004 just died, and I'm maintaining a
> package for the driver for Fedora, unofficially then officially, since I
> bought it. I still have a couple others VIA boards to play with (KM400A,
> CN400, CN700, CX700, VX800, VX855 and VX900 based, some in a bad shape
> though) possibly including another Epia M, I just need to find and
> rescue it from a dusty shelf somewhere.
> 
> Regards,
> Xavier
> 
diff --git a/src/via_fp.c b/src/via_fp.c
index dea6ec9..32053c6 100644
--- a/src/via_fp.c
+++ b/src/via_fp.c
@@ -1281,8 +1281,6 @@ via_lvds_mode_set(xf86OutputPtr output, DisplayModePtr mode,
             break;
         case VIA_CX700:
         case VIA_VX800:
-        case VIA_VX855:
-        case VIA_VX900:
             viaLVDS2SetDisplaySource(pScrn, iga->index ? 0x01 : 0x00);
 
             /* Set LVDS2 output color dithering. */
@@ -1294,6 +1292,19 @@ via_lvds_mode_set(xf86OutputPtr output, DisplayModePtr mode,
             /* Set LVDS2 output to OPENLDI mode. */
             viaLVDS2SetFormat(pScrn, 0x01);
             break;
+        case VIA_VX855:
+        case VIA_VX900:
+            viaLVDS1SetDisplaySource(pScrn, iga->index ? 0x01 : 0x00);
+
+            /* Set LVDS1 output color dithering. */
+            viaLVDS1SetDithering(pScrn, Panel->useDithering ? TRUE : FALSE);
+
+            /* Set LVDS1 output format to sequential mode. */
+            viaLVDS1SetOutputFormat(pScrn, 0x01);
+
+            /* Set LVDS1 output to OPENLDI mode. */
+            viaLVDS1SetFormat(pScrn, 0x01);
+            break;
         default:
             break;
         }
_______________________________________________
Openchrome-devel mailing list
Openchrome-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/openchrome-devel

Reply via email to