i810 patch to swap Xinerama screens using mergedfb

Emilio Scalise emisca.ml at gmail.com
Fri Jan 5 02:11:02 PST 2007


I've made a simple patch to swap logical screens exported by the fake
xinerama exposed by mergedfb. It's similar to the setting present in
the radeon driver "MergedXineramaCRT2IsScreen0". I've used a notation
similar to i810 option's names.
Now that I've found where to get latest agpgart modules, I will try it
using Ross Burton source debian packages (thanks Ross for those.. ;-)
).

This is the patch.. it works well for me........ (it's against 1.7.2
version, main branch, but it should apply also on newer versions).
Please merge it (if you like it)....

--- i830_driver.c       2006-10-13 13:52:26.000000000 +0200
+++ /home/emi/i810drivnew.c     2007-01-03 13:42:23.000000000 +0100
@@ -268,6 +268,7 @@
    OPTION_SECONDHSYNC,
    OPTION_SECONDVREFRESH,
    OPTION_SECONDPOSITION,
+   OPTION_SECONDISSCRN0,
    OPTION_INTELXINERAMA
 } I830Opts;

@@ -295,6 +296,7 @@
    {OPTION_SECONDHSYNC,        "SecondMonitorHorizSync",OPTV_STRING,
 {0}, FALSE },
    {OPTION_SECONDVREFRESH,"SecondMonitorVertRefresh",OPTV_STRING,{0}, FALSE },
    {OPTION_SECONDPOSITION,"SecondPosition",OPTV_STRING,        {0},    FALSE },
+   {OPTION_SECONDISSCRN0,"MergedXineramaSecondIsScreen0",
OPTV_BOOLEAN, {0}, FALSE },
    {OPTION_INTELXINERAMA,"MergedXinerama",OPTV_BOOLEAN,        {0},    TRUE},
    {-1,                        NULL,           OPTV_NONE,      {0},    FALSE}
 };
@@ -4685,6 +4687,13 @@
          }
          xfree(tempstr);
       }
+
+      /* If OPTION_SECONDISSCRN0 is true then swap screens */
+      if(xf86GetOptValBool(pI830->Options, OPTION_SECONDISSCRN0, TRUE)) {
+        if (pI830->SecondIsScrn0) pI830->SecondIsScrn0= FALSE;
+        else pI830->SecondIsScrn0= TRUE;
+      }
+
       if((s = (char *)xf86GetOptValString(pI830->Options, OPTION_METAMODES))) {
          pI830->MetaModes = xalloc(strlen(s) + 1);
         if(pI830->MetaModes)



More information about the xorg mailing list