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

Kevin Brace kevinbrace at kemper.freedesktop.org
Mon Apr 18 03:02:56 UTC 2016


 configure.ac      |    2 +-
 src/via_display.c |   35 ++++++++++++-----------------------
 src/via_ums.h     |    1 -
 3 files changed, 13 insertions(+), 25 deletions(-)

New commits:
commit 45d550cfe7e5013c8491a9d5624874742815b3fc
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Sun Apr 17 20:02:33 2016 -0700

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

diff --git a/configure.ac b/configure.ac
index 0480e4d..6633865 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ(2.57)
 AC_INIT([xf86-video-openchrome],
-        [0.4.121],
+        [0.4.122],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/openchrome],
         [xf86-video-openchrome])
 
commit 928611b4c6480c1d56705308eaed65dd0fbd95ec
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Sun Apr 17 19:54:27 2016 -0700

    Discontinuing ViaSecondCRTCHorizontalQWCount
    
    The code within this function was transferred to viaIGA2SetDisplayRegister
    function inside via_display.c.
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_display.c b/src/via_display.c
index 054715d..17ba151 100644
--- a/src/via_display.c
+++ b/src/via_display.c
@@ -611,23 +611,6 @@ viaIGA2SetFBStartingAddress(xf86CrtcPtr crtc, int x, int y)
 }
 
 void
-ViaSecondCRTCHorizontalQWCount(ScrnInfoPtr pScrn, int width)
-{
-    vgaHWPtr hwp = VGAHWPTR(pScrn);
-    CARD16 temp;
-
-    /* fetch count */
-    temp = (width * (pScrn->bitsPerPixel >> 3)) >> 3;
-    /* Make sure that this is 32-byte aligned. */
-    if (temp & 0x03) {
-        temp += 0x03;
-        temp &= ~0x03;
-    }
-    hwp->writeCrtc(hwp, 0x65, (temp >> 1) & 0xFF);
-    ViaCrtcMask(hwp, 0x67, temp >> 7, 0x0C);
-}
-
-void
 viaIGA2SetDisplayRegister(ScrnInfoPtr pScrn, DisplayModePtr mode)
 {
     VIAPtr pVia = VIAPTR(pScrn);
@@ -756,6 +739,18 @@ viaIGA2SetDisplayRegister(ScrnInfoPtr pScrn, DisplayModePtr mode)
     hwp->writeCrtc(hwp, 0x66, temp & 0xFF);
     ViaCrtcMask(hwp, 0x67, temp >> 8, 0x03);
 
+    /* Fix LCD scaling. */
+    /* fetch count */
+    temp = (mode->CrtcHDisplay * (pScrn->bitsPerPixel >> 3)) >> 3;
+    /* Make sure that this is 32-byte aligned. */
+    if (temp & 0x03) {
+        temp += 0x03;
+        temp &= ~0x03;
+    }
+
+    hwp->writeCrtc(hwp, 0x65, (temp >> 1) & 0xFF);
+    ViaCrtcMask(hwp, 0x67, temp >> 7, 0x0C);
+
     switch (pVia->ChipId) {
         case VIA_CX700:
         case VIA_K8M890:
@@ -771,9 +766,6 @@ viaIGA2SetDisplayRegister(ScrnInfoPtr pScrn, DisplayModePtr mode)
             ViaCrtcMask(hwp, 0x33, 0, 0xC8);
             break;
     }
-
-    /* Fix LCD scaling */
-    ViaSecondCRTCHorizontalQWCount(pScrn, mode->CrtcHDisplay);
 }
 
 void
diff --git a/src/via_ums.h b/src/via_ums.h
index 2f0536e..a4a1a0f 100644
--- a/src/via_ums.h
+++ b/src/via_ums.h
@@ -215,7 +215,6 @@ void viaIGA1SetFBStartingAddress(xf86CrtcPtr crtc, int x, int y);
 void viaIGA1SetDisplayRegister(ScrnInfoPtr pScrn, DisplayModePtr mode);
 void viaIGA1SetMode(ScrnInfoPtr pScrn, DisplayModePtr mode);
 void viaIGA2SetFBStartingAddress(xf86CrtcPtr crtc, int x, int y);
-void ViaSecondCRTCHorizontalQWCount(ScrnInfoPtr pScrn, int width);
 void viaIGA2SetDisplayRegister(ScrnInfoPtr pScrn, DisplayModePtr mode);
 void viaIGA2SetMode(ScrnInfoPtr pScrn, DisplayModePtr mode);
 void ViaShadowCRTCSetMode(ScrnInfoPtr pScrn, DisplayModePtr mode);
commit 774b37de3dc3ce4c258e2dab99fa39dbeaed3010
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Sun Apr 17 19:29:48 2016 -0700

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

diff --git a/configure.ac b/configure.ac
index ce3f2af..0480e4d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ(2.57)
 AC_INIT([xf86-video-openchrome],
-        [0.4.120],
+        [0.4.121],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/openchrome],
         [xf86-video-openchrome])
 
commit 45487a3a9dfccc1424c478b5f2bac5f03d55fa0e
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Sun Apr 17 19:23:45 2016 -0700

    Removing unnecessary double calling of ViaSecondCRTCHorizontalQWCount
    
    ViaSecondCRTCHorizontalQWCount was being called twice, and this probably
    is unnecessary. This function is inside via_display.c.
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_display.c b/src/via_display.c
index c4c8a39..054715d 100644
--- a/src/via_display.c
+++ b/src/via_display.c
@@ -772,6 +772,7 @@ viaIGA2SetDisplayRegister(ScrnInfoPtr pScrn, DisplayModePtr mode)
             break;
     }
 
+    /* Fix LCD scaling */
     ViaSecondCRTCHorizontalQWCount(pScrn, mode->CrtcHDisplay);
 }
 
@@ -788,10 +789,6 @@ viaIGA2SetMode(ScrnInfoPtr pScrn, DisplayModePtr mode)
     viaIGA2SetDisplayRegister(pScrn, realMode);
     ViaSetSecondaryFIFO(pScrn, realMode);
     pBIOSInfo->Clock = ViaModeDotClockTranslate(pScrn, realMode);
-
-    /* Fix LCD scaling */
-    ViaSecondCRTCHorizontalQWCount(pScrn, mode->CrtcHDisplay);
-
     pBIOSInfo->ClockExternal = FALSE;
     ViaSetSecondaryDotclock(pScrn, pBIOSInfo->Clock);
     ViaSetUseExternalClock(hwp);


More information about the Openchrome-devel mailing list