Hi Xavier,

> Sent: Tuesday, March 21, 2017 at 1:49 AM
> From: "Xavier Bachelot" <xav...@bachelot.org>
> To: "Kevin Brace" <kevinbr...@gmx.com>
> Cc: openchrome-devel@lists.freedesktop.org
> Subject: Re: [Openchrome-devel] openchrome 0.6.0 regressions on VX900 laptop
>
> FP does work with vanilla 0.6.0 + the panel fix for 1366x768, if and
> only if VGA is connected. VGA on the other hand doesn't work in this setup.
> Sorry again for sending wrong information in the first place, and being
> inaccurate.
> 

Okay, you can also get 1024 x 768 by changing the screen resolution of the VGA 
output.
Runtime screen resolution change bug was fixed by me (James Simmons appears to 
have introduced this bug inadvertently starting with Version 0.3.3) in Version 
0.5.


> I will retry with git master, but it didn't work properly with version 2
> of your patch, even with VGA connected. In this case, FP is showing the
> distorted picture, and VGA is reported as using an incorrect resolution,
> so there is still something to fix.
> 
> That may be related to panel scaling, which you said is only available
> on IGA2, and is reported as enabled by via_reg_dump.
> 

Okay, we may have to turn off panel scaling since the code to support it has 
been broken since Version 0.3.0.
It appeared to work fine in Version 0.2.906.
Currently, I do not think it is being turned off manually 
Since I have been asked by two users who wish to have this feature back 
eventually, I have not been eager to remove the code that handles panel scaling.
This is the reason why unused function warning should be turned off, but other 
warnings can be activated.


> If you look at the regs dumps for 0.6 + panel fix with FP + VGA, you'll
> see the vertical resolution for IGA1/VGA is the one from the FP (768),
> not the one from the external screen (1024). 1280x768 is most probably
> not a supported resolution, which would explain.
> 

Just for trying to understand the situation, can you read out 3X5.89 and 3X5.FD 
manually?

$ sudo ./via_regs_dump -r 3d5.89
$ sudo ./via_regs_dump -r 3d5.fd


You may want to play around with 3X5.89[0] (It should be set to 0. Not 
3X5.89[1] since this appears to be a mistake.) and 3X5.FD[7] (0 = Scaling down 
CRTC for IGA2, 1 = Scaling down CRTC for IGA1).
These registers do not show up with "via_regs_dump -d".
3X5.89[0] appears to be set to 0 by ViaPanelScaleDisable function located 
inside via_fp.c, so this might be a non-issue.


> If you have the time, please send a patch adding the use of software
> power sequence, I'll check if it helps or not.
> 

I attached two patches.
The first one is VX855 and VX900 software power turn on / off.
The second one swaps IGA1 and IGA2 for VGA and FP.
If the first patch (software power on / off) does not cause side effects, then 
I can push it into the master branch.
Two patches are independent of each other.


> I'll push them myself after adding your reviewed-by.
> I will not push the last one which is adding -Wno-unused-functions.
> Instead, I'll send a proper patch removing the unused-functions warning
> for you to review. I don't want to risk removing functions that may
> still have some use later, without you first double-checking that's it's
> ok, or even hiding an otherwise useful warning.
> 

Yes, I did not intentionally remove panel scaling related code, although most 
of them are unused currently.


> Regards,
> Xavier
> 

That's all for now.

Regards,

Kevin Brace
The OpenChrome Project maintainer / developer
diff --git a/src/via_analog.c b/src/via_analog.c
index 682ae20..4a1dda1 100644
--- a/src/via_analog.c
+++ b/src/via_analog.c
@@ -406,15 +406,8 @@ via_analog_init(ScrnInfoPtr pScrn)
     sprintf(outputNameBuffer, "VGA-%d", (pVia->numberVGA + 1));
     output = xf86OutputCreate(pScrn, &via_analog_funcs, outputNameBuffer);
 
-    /* While there are two (2) display controllers registered with the
-     * X.Org Server, it is often desirable to fix the analog VGA output
-     * to IGA1 since LVDS FP (Flat Panel) typically prefers IGA2. (While
-     * it is not used at this point, only IGA2 contains panel resolution
-     * scaling functionality. IGA1 does not have this.)
-     * With this arrangement, DVI should end up getting assigned to IGA2
-     * since DVI can go to either display controller without limitations.
-     * This should be the case for TV as well. */
-    output->possible_crtcs = (1 << 0);
+    /* Assign VGA to IGA2. */
+    output->possible_crtcs = 1 << 1;
 
     output->possible_clones = 0;
     output->interlaceAllowed = TRUE;
diff --git a/src/via_fp.c b/src/via_fp.c
index 7811d93..8e62235 100644
--- a/src/via_fp.c
+++ b/src/via_fp.c
@@ -1554,11 +1554,8 @@ via_lvds_init(ScrnInfoPtr pScrn)
     if (output)  {
         output->driver_private = Panel;
 
-        /* While there are two (2) display controllers registered with the
-         * X.Org Server, it is often desirable to fix FP (Flat Panel) to
-         * IGA2 since only IGA2 contains panel resolution scaling
-         * functionality. IGA1 does not have this. */
-        output->possible_crtcs = 1 << 1;
+        /* Assign FP to IGA1. */
+        output->possible_crtcs = 1 << 0;
 
         output->possible_clones = 0;
         output->interlaceAllowed = FALSE;
diff --git a/src/via_fp.c b/src/via_fp.c
index 7811d93..2abfdf3 100644
--- a/src/via_fp.c
+++ b/src/via_fp.c
@@ -775,29 +775,16 @@ ViaLVDSPower(ScrnInfoPtr pScrn, Bool Power_On)
         /* Is the integrated TMDS transmitter (DVI) not in use? */
         crd2 = hwp->readCrtc(hwp, 0xD2);
         if (((pVia->Chipset == VIA_CX700)
-                || (pVia->Chipset == VIA_VX800)
-                || (pVia->Chipset == VIA_VX855)
-                || (pVia->Chipset == VIA_VX900))
+                || (pVia->Chipset == VIA_VX800))
             && (!(crd2 & 0x10))) {
             ViaLVDSSoftwarePowerFirstSequence(pScrn, Power_On);
         }
 
         ViaLVDSSoftwarePowerSecondSequence(pScrn, Power_On);
         break;
-
     case VIA_VX855:
     case VIA_VX900:
-        /* Is the integrated TMDS transmitter (DVI) not in use? */
-        crd2 = hwp->readCrtc(hwp, 0xD2);
-        if (((pVia->Chipset == VIA_CX700)
-                || (pVia->Chipset == VIA_VX800)
-                || (pVia->Chipset == VIA_VX855)
-                || (pVia->Chipset == VIA_VX900))
-            && (!(crd2 & 0x10))) {
-            ViaLVDSHardwarePowerFirstSequence(pScrn, Power_On);
-        }
-
-        ViaLVDSHardwarePowerSecondSequence(pScrn, Power_On);
+        ViaLVDSSoftwarePowerFirstSequence(pScrn, Power_On);
         break;
     default:
         ViaLVDSHardwarePowerFirstSequence(pScrn, Power_On);
_______________________________________________
Openchrome-devel mailing list
Openchrome-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/openchrome-devel

Reply via email to