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

Kevin Brace kevinbrace at kemper.freedesktop.org
Wed Mar 30 05:18:51 UTC 2016


 src/via_driver.c |    1 -
 src/via_lvds.c   |   50 +-------------------------------------------------
 2 files changed, 1 insertion(+), 50 deletions(-)

New commits:
commit d73b7a639ab0bbaf42dadc1dc48e5c1b66a47339
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Tue Mar 29 22:08:05 2016 -0700

    Removal of PanelSize option
    
    Since a non-I2C bus flat panel can now be detected automatically,
    PanelSize option for use in xorg.conf is discontinued.
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_driver.c b/src/via_driver.c
index 671fe21..dcff12a 100644
--- a/src/via_driver.c
+++ b/src/via_driver.c
@@ -179,7 +179,6 @@ typedef enum
     OPTION_I2CDEVICES,
     OPTION_BUSWIDTH,
     OPTION_CENTER,
-    OPTION_PANELSIZE,
     OPTION_TVDOTCRAWL,
     OPTION_TVTYPE,
     OPTION_TVOUTPUT,
diff --git a/src/via_lvds.c b/src/via_lvds.c
index dfe2c77..4aa2eac 100644
--- a/src/via_lvds.c
+++ b/src/via_lvds.c
@@ -41,15 +41,13 @@
  */
 enum ViaPanelOpts {
     OPTION_BUSWIDTH,
-    OPTION_CENTER,
-    OPTION_PANELSIZE
+    OPTION_CENTER
 };
 
 static OptionInfoRec ViaPanelOptions[] =
 {
     {OPTION_BUSWIDTH,   "BusWidth",     OPTV_ANYSTR,    {0},    FALSE},
     {OPTION_CENTER,     "Center",       OPTV_BOOLEAN,   {0},    FALSE},
-    {OPTION_PANELSIZE,  "PanelSize",    OPTV_ANYSTR,    {0},    FALSE},
     {-1,                NULL,           OPTV_NONE,      {0},    FALSE}
 };
 
@@ -997,34 +995,6 @@ static const xf86OutputFuncsRec via_lvds_funcs = {
     .destroy            = via_lvds_destroy,
 };
 
-/*
- * Sets the panel dimensions from the configuration
- * using name with format "9999x9999".
- */
-static void
-ViaPanelGetNativeModeFromOption(ScrnInfoPtr pScrn, ViaPanelInfoPtr panel,
-								const char *name)
-{
-    char aux[strlen(name) + 1];
-    CARD8 length, index;
-
-    DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                     "ViaPanelGetNativeModeFromOption\n"));
-
-    panel->NativeModeIndex = VIA_PANEL_INVALID;
-    length = sizeof(ViaPanelNativeModes) / sizeof(ViaPanelModeRec);
-
-    for (index = 0; index < length; index++) {
-        sprintf(aux, "%dx%d", ViaPanelNativeModes[index].Width,
-                ViaPanelNativeModes[index].Height);
-        if (!xf86NameCmp(name, aux)) {
-            panel->NativeModeIndex = index;
-            panel->NativeWidth = ViaPanelNativeModes[index].Width;
-            panel->NativeHeight = ViaPanelNativeModes[index].Height;
-            break;
-        }
-    }
-}
 
 void
 via_lvds_init(ScrnInfoPtr pScrn)
@@ -1081,24 +1051,6 @@ via_lvds_init(ScrnInfoPtr pScrn)
     xf86DrvMsg(pScrn->scrnIndex, from, "LVDS-0 : DVI Center is %s.\n",
                Panel->Center ? "enabled" : "disabled");
 
-    /* Panel Size Option */
-    if ((s = xf86GetOptValString(Options, OPTION_PANELSIZE))) {
-        ViaPanelGetNativeModeFromOption(pScrn, Panel, s);
-        if (Panel->NativeModeIndex != VIA_PANEL_INVALID) {
-            DEBUG(xf86DrvMsg
-                  (pScrn->scrnIndex, X_CONFIG, "LVDS Panel mode index is %d\n",
-                   Panel->NativeModeIndex));
-            xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
-                       "Selected Panel Size is %dx%d\n", Panel->NativeWidth,
-                       Panel->NativeHeight);
-        } else
-            xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
-                        "%s is not a valid panel size.\n", s);
-    } else {
-        xf86DrvMsg(pScrn->scrnIndex, X_DEFAULT,
-                   "Panel size is not selected from config file.\n");
-    }
-
     output = xf86OutputCreate(pScrn, &via_lvds_funcs, "LVDS-1");
 
     if (output)  {


More information about the Openchrome-devel mailing list