[Openchrome-devel] xf86-video-openchrome: src/via_lvds.c

Kevin Brace kevinbrace at kemper.freedesktop.org
Tue Mar 29 10:41:13 UTC 2016


 src/via_lvds.c |   42 ------------------------------------------
 1 file changed, 42 deletions(-)

New commits:
commit 6375a34fa3c8e413aafb6f161a19195571da1434
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Tue Mar 29 03:26:40 2016 -0700

    Removal of backdoor flat panel screen resolution detection algorithm
    
    For those models that do not have their flat panel connected to an
    I2C bus, flat panel detection code was referencing their CRTC
    horizontal and vertical active data period (screen resolution)
    registers to "guess" what their flat panel native screen resolution
    is. While this poorly conceived algorithm works fine with certain
    models, it causes problems with many other models. Thus, the use of
    this detection algorithm is discontinued.
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_lvds.c b/src/via_lvds.c
index 44ddb6b..79e0667 100644
--- a/src/via_lvds.c
+++ b/src/via_lvds.c
@@ -862,48 +862,6 @@ via_lvds_detect(xf86OutputPtr output)
                 status = XF86OutputStatusConnected;
             }
         } else {
-            CARD8 CR6A = hwp->readCrtc(hwp, 0x6A);
-            CARD8 CR6B = hwp->readCrtc(hwp, 0x6B);
-            CARD8 CR97 = hwp->readCrtc(hwp, 0x97);
-            CARD8 CR99 = hwp->readCrtc(hwp, 0x99);
-
-            /* First test CRTC2 is out of reset and if its enabled or
-             * simultaneous mode is enabled. Also avoid the secondary
-             * DFP source */
-            if ((((CR6A & 0xC0) == 0xC0) || (((CR6A & 0xC0) == 0x40) &&
-                (CR6B & 0x08))) && (CR97 & 0x10) && (CR99 & 0x10)) {
-                    /* Use Vertical addreess register of IGA 2 */
-                    panel->NativeWidth  = (hwp->readCrtc(hwp, 0x51) |
-                                                ((hwp->readCrtc(hwp, 0x55) & 0x70) << 4)) + 1;
-                    panel->NativeHeight = (hwp->readCrtc(hwp, 0x59) |
-                                                ((hwp->readCrtc(hwp, 0x5D) & 0x38) << 5)) + 1;
-                    panel->NativeModeIndex = VIA_PANEL6X4;
-
-                    xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Panel Mode probed %dx%d from IGA 2\n",
-                               panel->NativeWidth, panel->NativeHeight);
-
-                    status = XF86OutputStatusConnected;
-            } else if (!(CR97 & 0x10) && !(CR99 & 0x10)) {
-                    CARD8 val;
-
-                    /* IGA1 Horizontal Overscan register */
-                    panel->NativeWidth = (hwp->readCrtc(hwp, 0x01) + 1) * 8;
-                    /* IGA1 default Vertical Overscan register is
-                     * incorrect on some devices so use VBlank start */
-                    panel->NativeHeight = (hwp->readCrtc(hwp, 0x15) + 1);
-                    val = hwp->readCrtc(hwp, 0x07);
-                    panel->NativeHeight |= ((val >> 3) & 0x1) << 8;
-                    panel->NativeHeight |= ((val >> 5) & 0x1) << 9;
-                    val = hwp->readCrtc(hwp, 0x35);
-                    panel->NativeHeight |= ((val >> 3) & 0x1) << 10;
-                    panel->NativeModeIndex = VIA_PANEL6X4;
-
-                    xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Panel Mode probed %dx%d from IGA 1\n",
-                                panel->NativeWidth,
-                                panel->NativeHeight);
-                    status = XF86OutputStatusConnected;
-            }
-
             if (!panel->NativeWidth || !panel->NativeHeight)
                 ViaPanelGetNativeModeFromScratchPad(output);
 


More information about the Openchrome-devel mailing list