[Openchrome-devel] xf86-video-openchrome: 4 commits - configure.ac src/via_display.c

Kevin Brace kevinbrace at kemper.freedesktop.org
Mon Apr 25 01:44:24 UTC 2016


 configure.ac      |    2 +-
 src/via_display.c |   13 +++++++++----
 2 files changed, 10 insertions(+), 5 deletions(-)

New commits:
commit 2300eebd0f9b38a110a563c27f2568c10e2656d1
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Sun Apr 24 18:35:15 2016 -0700

    Version bumped to 0.4.134
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/configure.ac b/configure.ac
index c2dcacc..e07dde8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ(2.57)
 AC_INIT([xf86-video-openchrome],
-        [0.4.133],
+        [0.4.134],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/openchrome],
         [xf86-video-openchrome])
 
commit 56aaa87a495603b084a1a91a57f7ec0216df99fc
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Sun Apr 24 18:31:51 2016 -0700

    Activating IGA2 specific screen mode setting validation function
    
    For whatever reason, viaIGA2ModeValid function was not used to check
    IGA2 screen mode setting validity, and instead, the one for IGA1 was
    also used for IGA2. Since IGA1 and IGA2 have different capabilities,
    this is not desirable.
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_display.c b/src/via_display.c
index 140e81f..2b26208 100644
--- a/src/via_display.c
+++ b/src/via_display.c
@@ -1552,7 +1552,7 @@ iga2_crtc_mode_fixup(xf86CrtcPtr crtc, DisplayModePtr mode,
         return FALSE;
     }
 
-    modestatus = viaIGA1ModeValid(pScrn, mode);
+    modestatus = viaIGA2ModeValid(pScrn, mode);
     if (modestatus != MODE_OK) {
         xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Not using mode \"%s\" : %s.\n",
                    mode->name, xf86ModeStatusToString(modestatus));
commit 9d2e2c193fd18cd14bcdbdd2d96d5712f9649a6b
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Sun Apr 24 18:23:38 2016 -0700

    IGA2 vertical synchronization end maximum is 32
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_display.c b/src/via_display.c
index d90657a..140e81f 100644
--- a/src/via_display.c
+++ b/src/via_display.c
@@ -885,10 +885,10 @@ viaIGA2SetDisplayRegister(ScrnInfoPtr pScrn, DisplayModePtr mode)
 
 
     /* Set IGA2 vertical synchronization end. */
-    /* Vertical Retrace End: 511 (max) */
+    /* Vertical Retrace End: 32 (max) */
     DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
                         "IGA2 CrtcVSyncEnd: %d\n", mode->CrtcVSyncEnd));
-    temp = mode->CrtcVSyncEnd - mode->CrtcVSyncStart;
+    temp = mode->CrtcVSyncEnd - mode->CrtcVSyncStart - 1;
 
     /*3X5.5F[4:0]: Vertical Retrace End[4:0] */
     ViaCrtcMask(hwp, 0x5F, temp & 0x1F, 0x1F);
commit 90ff984a0afcbe539c2bbc8cfc0c7bb622be7787
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Sun Apr 24 18:15:25 2016 -0700

    Limiting CrtcHSyncStart to at or below 2048 for CLE266 and KM400 family
    
    Horizontal Retrace Start Bits register is only 11 bits for CLE266
    and KM400 family (UniChrome), but is 12 bits for the newer devices
    (UniChrome Pro and Chrome9). When the screen mode setting validity
    is tested, this will have to be taken into consideration.
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_display.c b/src/via_display.c
index 81be558..d90657a 100644
--- a/src/via_display.c
+++ b/src/via_display.c
@@ -951,6 +951,8 @@ viaIGA2SetDisplayRegister(ScrnInfoPtr pScrn, DisplayModePtr mode)
 static ModeStatus
 viaIGA2ModeValid(ScrnInfoPtr pScrn, DisplayModePtr mode)
 {
+    VIAPtr pVia = VIAPTR(pScrn);
+
     DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
                         "Entered viaIGA2ModeValid.\n"));
 
@@ -966,7 +968,10 @@ viaIGA2ModeValid(ScrnInfoPtr pScrn, DisplayModePtr mode)
     if (mode->CrtcHBlankEnd > 4096)
         return MODE_HBLANK_WIDE;
 
-    if (mode->CrtcHSyncStart > 2047)
+    if ((((pVia->Chipset == VIA_CLE266) || (pVia->Chipset == VIA_KM400))
+            && (mode->CrtcHSyncStart > 2048))
+        || (((pVia->Chipset != VIA_CLE266) && (pVia->Chipset != VIA_KM400))
+            && (mode->CrtcHSyncStart > 4096)))
         return MODE_BAD_HVALUE;
 
     if ((mode->CrtcHSyncEnd - mode->CrtcHSyncStart) > 512)


More information about the Openchrome-devel mailing list