[Xorg-driver-geode] [PATCH] Mode validation support on modeline in xorg.conf

Huang, FrankR FrankR.Huang at amd.com
Tue Sep 28 01:29:49 PDT 2010


From: Frank Huang <frankr.huang at amd.com>

*mode validation(lx_output_mode_valid) in geode driver should return
MODE_OK for all modes filtered out by previous process in this function.
Otherwise, new modelines(conf_modes) will be pruned by the Xserver function
Xf86PruneInvalidModes. The result is that the user can not set any resolution
they want. We comply with the code of ATI&&Intel mode_valid function to do this.
*For the mode that can not be supported in geode driver, it is better to give
the specific MODE_XXX(such as MODE_CLOCK_RANGE) instead of MODE_BAD.
*Fix a typo

Signed-off-by: Frank Huang <frankr.huang at amd.com>
---
 src/lx_output.c |    2 +-
 src/lx_panel.c  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lx_output.c b/src/lx_output.c
index 413d376..aa7687c 100644
--- a/src/lx_output.c
+++ b/src/lx_output.c
@@ -182,7 +182,7 @@ lx_output_mode_valid(xf86OutputPtr output, DisplayModePtr pMode)
     if (pMode->type & (M_T_DRIVER | M_T_PREFERRED))
         return MODE_OK;
 
-    return MODE_BAD;
+    return MODE_OK;
 }
 
 static Bool
diff --git a/src/lx_panel.c b/src/lx_panel.c
index f1d0686..2e076d4 100644
--- a/src/lx_panel.c
+++ b/src/lx_panel.c
@@ -63,7 +63,7 @@ DisplayModeRec lx_panel_modes[] = {
     {MODEPREFIX, 81600, 1152, 1216, 1336, 1520, 0, 864, 865, 868, 895, 0,
 	V_NHSYNC | V_NVSYNC, MODESUFFIX}
     ,				       /* 1152x864 at 60 */
-    {MODEPREFIX, 108000, 1028, 1328, 1440, 1688, 0, 1024, 1025, 1028, 1066, 0,
+    {MODEPREFIX, 108000, 1280, 1328, 1440, 1688, 0, 1024, 1025, 1028, 1066, 0,
 	V_NHSYNC | V_NVSYNC, MODESUFFIX}
     ,				       /* 1280x1024 at 60 */
     {MODEPREFIX, 162000, 1600, 1664, 1856, 2160, 0, 1200, 1201, 1204, 1250, 0,
-- 
1.7.1




More information about the Xorg-driver-geode mailing list