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

Kevin Brace kevinbrace at kemper.freedesktop.org
Fri May 20 05:31:25 UTC 2016


 src/via_display.c |   98 +++++++++++++++++++++---------------------------------
 src/via_ums.h     |    2 -
 2 files changed, 39 insertions(+), 61 deletions(-)

New commits:
commit cfa95bfa383f3021a4a6183e56cbc7e18f298981
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Thu May 19 22:25:37 2016 -0700

    Discontinuing the use of viaIGA2SetMode
    
    The equivalent functionality was moved over to iga2_crtc_mode_set
    function.
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_display.c b/src/via_display.c
index b585dcc..e179c8c 100644
--- a/src/via_display.c
+++ b/src/via_display.c
@@ -1609,29 +1609,6 @@ viaIGA2ModeValid(ScrnInfoPtr pScrn, DisplayModePtr mode)
 }
 
 void
-viaIGA2SetMode(ScrnInfoPtr pScrn, DisplayModePtr mode)
-{
-    VIAPtr pVia = VIAPTR(pScrn);
-    VIABIOSInfoPtr pBIOSInfo = pVia->pBIOSInfo;
-    vgaHWPtr hwp = VGAHWPTR(pScrn);
-
-    DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                        "Entered viaIGA2SetMode.\n"));
-
-    viaIGA2SetDisplayRegister(pScrn, mode);
-    ViaSetSecondaryFIFO(pScrn, mode);
-    pBIOSInfo->Clock = ViaModeDotClockTranslate(pScrn, mode);
-    pBIOSInfo->ClockExternal = FALSE;
-    ViaSetSecondaryDotclock(pScrn, pBIOSInfo->Clock);
-    ViaSetUseExternalClock(hwp);
-
-    hwp->disablePalette(hwp);
-
-    DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                        "Exiting viaIGA2SetMode.\n"));
-}
-
-void
 viaIGA2Save(ScrnInfoPtr pScrn)
 {
     vgaHWPtr hwp = VGAHWPTR(pScrn);
@@ -2604,7 +2581,9 @@ iga2_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode,
                     DisplayModePtr adjusted_mode, int x, int y)
 {
     ScrnInfoPtr pScrn = crtc->scrn;
+    vgaHWPtr hwp = VGAHWPTR(pScrn);
     VIAPtr pVia = VIAPTR(pScrn);
+    VIABIOSInfoPtr pBIOSInfo = pVia->pBIOSInfo;
 
     DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
                         "Entered iga2_crtc_mode_set.\n"));
@@ -2622,7 +2601,16 @@ iga2_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode,
 
     viaIGAInitCommon(pScrn);
     ViaCRTCInit(pScrn);
-    viaIGA2SetMode(pScrn, adjusted_mode);
+
+    viaIGA2SetDisplayRegister(pScrn, adjusted_mode);
+    ViaSetSecondaryFIFO(pScrn, adjusted_mode);
+    pBIOSInfo->Clock = ViaModeDotClockTranslate(pScrn, adjusted_mode);
+    pBIOSInfo->ClockExternal = FALSE;
+    ViaSetSecondaryDotclock(pScrn, pBIOSInfo->Clock);
+    ViaSetUseExternalClock(hwp);
+
+    hwp->disablePalette(hwp);
+
     viaIGA2DisplayChannel(pScrn, TRUE);
 
     if (pVia->pBIOSInfo->SimultaneousEnabled)
diff --git a/src/via_ums.h b/src/via_ums.h
index 098dd7c..18da726 100644
--- a/src/via_ums.h
+++ b/src/via_ums.h
@@ -223,7 +223,6 @@ void viaIGA1Save(ScrnInfoPtr pScrn);
 void viaIGA1Restore(ScrnInfoPtr pScrn);
 void viaIGA2SetFBStartingAddress(xf86CrtcPtr crtc, int x, int y);
 void viaIGA2SetDisplayRegister(ScrnInfoPtr pScrn, DisplayModePtr mode);
-void viaIGA2SetMode(ScrnInfoPtr pScrn, DisplayModePtr mode);
 void viaIGA2Save(ScrnInfoPtr pScrn);
 void viaIGA2Restore(ScrnInfoPtr pScrn);
 void ViaShadowCRTCSetMode(ScrnInfoPtr pScrn, DisplayModePtr mode);
commit 1fbbf0d5573243959c41dedc38c8bf8760296462
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Thu May 19 21:10:42 2016 -0700

    Discontinuing the use of viaIGA1SetMode
    
    The equivalent functionality was moved over to iga1_crtc_mode_set
    function.
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_display.c b/src/via_display.c
index db61209..b585dcc 100644
--- a/src/via_display.c
+++ b/src/via_display.c
@@ -666,38 +666,6 @@ viaIGA1ModeValid(ScrnInfoPtr pScrn, DisplayModePtr mode)
 }
 
 void
-viaIGA1SetMode(ScrnInfoPtr pScrn, DisplayModePtr mode)
-{
-    xf86DrvMsg(pScrn->scrnIndex, X_INFO, "viaIGA1SetMode\n");
-    vgaHWPtr hwp = VGAHWPTR(pScrn);
-    VIAPtr pVia = VIAPTR(pScrn);
-    VIABIOSInfoPtr pBIOSInfo = pVia->pBIOSInfo;
-
-    /* Turn off Screen */
-    ViaCrtcMask(hwp, 0x17, 0x00, 0x80);
-
-    /* Disable IGA1 */
-    ViaSeqMask(hwp, 0x59, 0x00, 0x80);
-
-    viaIGA1SetDisplayRegister(pScrn, mode);
-    ViaSetPrimaryFIFO(pScrn, mode);
-
-    pBIOSInfo->Clock = ViaModeDotClockTranslate(pScrn, mode);
-    pBIOSInfo->ClockExternal = FALSE;
-    ViaSetPrimaryDotclock(pScrn, pBIOSInfo->Clock);
-    ViaSetUseExternalClock(hwp);
-    ViaCrtcMask(hwp, 0x6B, 0x00, 0x01);
-
-    hwp->disablePalette(hwp);
-
-    /* Enable IGA1 */
-    ViaSeqMask(hwp, 0x59, 0x80, 0x80);
-
-    /* Turn on Screen */
-    ViaCrtcMask(hwp, 0x17, 0x80, 0x80);
-}
-
-void
 viaIGA1Save(ScrnInfoPtr pScrn)
 {
     vgaHWPtr hwp = VGAHWPTR(pScrn);
@@ -2178,11 +2146,13 @@ iga1_crtc_set_origin(xf86CrtcPtr crtc, int x, int y)
 
 static void
 iga1_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode,
-					DisplayModePtr adjusted_mode,
-					int x, int y)
+                    DisplayModePtr adjusted_mode,
+                    int x, int y)
 {
     ScrnInfoPtr pScrn = crtc->scrn;
+    vgaHWPtr hwp = VGAHWPTR(pScrn);
     VIAPtr pVia = VIAPTR(pScrn);
+    VIABIOSInfoPtr pBIOSInfo = pVia->pBIOSInfo;
 
     DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
                         "Entered iga1_crtc_mode_set.\n"));
@@ -2200,7 +2170,29 @@ iga1_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode,
 
     viaIGAInitCommon(pScrn);
     ViaCRTCInit(pScrn);
-    viaIGA1SetMode(pScrn, adjusted_mode);
+
+    /* Turn off Screen */
+    ViaCrtcMask(hwp, 0x17, 0x00, 0x80);
+
+    /* Disable IGA1 */
+    ViaSeqMask(hwp, 0x59, 0x00, 0x80);
+
+    viaIGA1SetDisplayRegister(pScrn, adjusted_mode);
+    ViaSetPrimaryFIFO(pScrn, adjusted_mode);
+
+    pBIOSInfo->Clock = ViaModeDotClockTranslate(pScrn, adjusted_mode);
+    pBIOSInfo->ClockExternal = FALSE;
+    ViaSetPrimaryDotclock(pScrn, pBIOSInfo->Clock);
+    ViaSetUseExternalClock(hwp);
+    ViaCrtcMask(hwp, 0x6B, 0x00, 0x01);
+
+    hwp->disablePalette(hwp);
+
+    /* Enable IGA1 */
+    ViaSeqMask(hwp, 0x59, 0x80, 0x80);
+
+    /* Turn on Screen */
+    ViaCrtcMask(hwp, 0x17, 0x80, 0x80);
 
     if (pVia->pBIOSInfo->SimultaneousEnabled)
         ViaDisplayEnableSimultaneous(pScrn);
diff --git a/src/via_ums.h b/src/via_ums.h
index 541757b..098dd7c 100644
--- a/src/via_ums.h
+++ b/src/via_ums.h
@@ -219,7 +219,6 @@ void ViaCRTCInit(ScrnInfoPtr pScrn);
 void viaIGAInitCommon(ScrnInfoPtr pScrn);
 void viaIGA1SetFBStartingAddress(xf86CrtcPtr crtc, int x, int y);
 void viaIGA1SetDisplayRegister(ScrnInfoPtr pScrn, DisplayModePtr mode);
-void viaIGA1SetMode(ScrnInfoPtr pScrn, DisplayModePtr mode);
 void viaIGA1Save(ScrnInfoPtr pScrn);
 void viaIGA1Restore(ScrnInfoPtr pScrn);
 void viaIGA2SetFBStartingAddress(xf86CrtcPtr crtc, int x, int y);


More information about the Openchrome-devel mailing list