[Openchrome-devel] xf86-video-openchrome: 3 commits - src/via_id.c

Xavier Bachelot xavierb at kemper.freedesktop.org
Sun Jan 18 03:18:02 PST 2015


 src/via_id.c |   21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

New commits:
commit 98d43c48d100a02819397cf951ae8061f1f6124c
Author: Xavier Bachelot <xavier at bachelot.org>
Date:   Sat Jan 17 13:00:00 2015 +0100

    Rewrap some lines below 80 chars
    
    Signed-off-by: Xavier Bachelot <Xavier at bachelot.org>
    Acked-by: James Simmons <jsimmons at infradead.org>

diff --git a/src/via_id.c b/src/via_id.c
index cc6e746..ba28f9d 100644
--- a/src/via_id.c
+++ b/src/via_id.c
@@ -301,13 +301,16 @@ ViaCheckCardId(ScrnInfoPtr pScrn)
     if ((SUBVENDOR_ID(pVia->PciInfo) == VENDOR_ID(pVia->PciInfo)) &&
         (SUBSYS_ID(pVia->PciInfo) == DEVICE_ID(pVia->PciInfo)))
         xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
-                   "Manufacturer plainly copied main PCI IDs to subsystem/card IDs.\n");
+                   "Manufacturer plainly copied main PCI IDs to"
+                   " subsystem/card IDs.\n");
 
     for (Id = ViaCardId; Id->String; Id++) {
         if ((Id->Chip == pVia->Chipset) &&
             (Id->Vendor == SUBVENDOR_ID(pVia->PciInfo)) &&
             (Id->Device == SUBSYS_ID(pVia->PciInfo))) {
-            xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Detected %s. Card-Ids (%4X|%4X)\n", Id->String, SUBVENDOR_ID(pVia->PciInfo), SUBSYS_ID(pVia->PciInfo));
+            xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
+                       "Detected %s. Card-Ids (%4X|%4X)\n", Id->String,
+                       SUBVENDOR_ID(pVia->PciInfo), SUBSYS_ID(pVia->PciInfo));
             pVia->ActiveDevice = Id->Outputs;
             pVia->Id = Id;
             return;
@@ -315,7 +318,9 @@ ViaCheckCardId(ScrnInfoPtr pScrn)
     }
 
     xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-               "Unknown Card-Ids (%4X|%4X|%4X), Chipset: %s; please report to openchrome-users at lists.freedesktop.org\n",
-               DEVICE_ID(pVia->PciInfo), SUBVENDOR_ID(pVia->PciInfo), SUBSYS_ID(pVia->PciInfo), pScrn->chipset);
+               "Unknown Card-Ids (%4X|%4X|%4X), Chipset: %s; please report to"
+               " openchrome-users at lists.freedesktop.org\n",
+               DEVICE_ID(pVia->PciInfo), SUBVENDOR_ID(pVia->PciInfo),
+               SUBSYS_ID(pVia->PciInfo), pScrn->chipset);
     pVia->Id = Id;
 }
commit dc485f2e0f432c2fe9d2e747259d999175dc834c
Author: Xavier Bachelot <xavier at bachelot.org>
Date:   Sat Jan 17 12:42:52 2015 +0100

    Move CLE266 revision check to a place it will actually be run.
    
    Signed-off-by: Xavier Bachelot <xavier at bachelot.org>
    Acked-by: James Simmons <jsimmons at infradead.org>

diff --git a/src/via_id.c b/src/via_id.c
index 4071ffe..cc6e746 100644
--- a/src/via_id.c
+++ b/src/via_id.c
@@ -295,6 +295,9 @@ ViaCheckCardId(ScrnInfoPtr pScrn)
     struct ViaCardIdStruct *Id;
     VIAPtr pVia = VIAPTR(pScrn);
 
+    if (pVia->Chipset == VIA_CLE266)
+        ViaDoubleCheckCLE266Revision(pScrn);
+
     if ((SUBVENDOR_ID(pVia->PciInfo) == VENDOR_ID(pVia->PciInfo)) &&
         (SUBSYS_ID(pVia->PciInfo) == DEVICE_ID(pVia->PciInfo)))
         xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
@@ -315,7 +318,4 @@ ViaCheckCardId(ScrnInfoPtr pScrn)
                "Unknown Card-Ids (%4X|%4X|%4X), Chipset: %s; please report to openchrome-users at lists.freedesktop.org\n",
                DEVICE_ID(pVia->PciInfo), SUBVENDOR_ID(pVia->PciInfo), SUBSYS_ID(pVia->PciInfo), pScrn->chipset);
     pVia->Id = Id;
-
-    if (pVia->Chipset == VIA_CLE266)
-        ViaDoubleCheckCLE266Revision(pScrn);
 }
commit ecb1695ac2de1d840c036f64b5b71602e0f522a4
Author: Xavier Bachelot <xavier at bachelot.org>
Date:   Sat Jan 17 12:42:06 2015 +0100

    Make sure pVia->Id is set even in case of an unknown board to prevent a segfault later
    
    Signed-off-by: Xavier Bachelot <xavier at bachelot.org>
    Acked-by: James Simmons <jsimmons at infradead.org>

diff --git a/src/via_id.c b/src/via_id.c
index a066819..4071ffe 100644
--- a/src/via_id.c
+++ b/src/via_id.c
@@ -314,7 +314,7 @@ ViaCheckCardId(ScrnInfoPtr pScrn)
     xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
                "Unknown Card-Ids (%4X|%4X|%4X), Chipset: %s; please report to openchrome-users at lists.freedesktop.org\n",
                DEVICE_ID(pVia->PciInfo), SUBVENDOR_ID(pVia->PciInfo), SUBSYS_ID(pVia->PciInfo), pScrn->chipset);
-    pVia->Id = NULL;
+    pVia->Id = Id;
 
     if (pVia->Chipset == VIA_CLE266)
         ViaDoubleCheckCLE266Revision(pScrn);


More information about the Openchrome-devel mailing list