xserver: Branch 'server-1.5-branch'

Adam Jackson ajax at kemper.freedesktop.org
Mon May 19 08:28:03 PDT 2008


 hw/xfree86/modes/xf86Crtc.c  |    9 ++++++++-
 hw/xfree86/modes/xf86Modes.c |   22 ++++++++++++++++++++++
 hw/xfree86/modes/xf86Modes.h |    3 +++
 3 files changed, 33 insertions(+), 1 deletion(-)

New commits:
commit 5efe36f7afde8b5bf4e853dd1dde2a6a027d613b
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon May 19 11:22:19 2008 -0400

    Fix reduced-blanking mode filtering in RANDR 1.2.
    
    If the monitor isn't reduced-blanking (either through EDID logic, or
    config file setting), then remove RB modes from the default pool.  Any
    RB modes from the driver and config file pools will stick around though;
    you asked for them, you got them.
    (cherry picked from commit 0178b6a4abed0df3e90ba393709ed566105e7c2c)

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index e857b07..855d646 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -1475,7 +1475,14 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY)
 	}
 	default_modes = xf86GetDefaultModes (output->interlaceAllowed,
 					     output->doubleScanAllowed);
-	
+
+	/*
+	 * If this is not an RB monitor, remove RB modes from the default
+	 * pool.  RB modes from the config or the monitor itself are fine.
+	 */
+	if (!mon_rec.reducedblanking)
+	    xf86ValidateModesReducedBlanking (scrn, default_modes);
+
 	if (sync_source == sync_config)
 	{
 	    /* 
diff --git a/hw/xfree86/modes/xf86Modes.c b/hw/xfree86/modes/xf86Modes.c
index a07eba9..ea398ad 100644
--- a/hw/xfree86/modes/xf86Modes.c
+++ b/hw/xfree86/modes/xf86Modes.c
@@ -514,6 +514,28 @@ xf86ValidateModesBandwidth(ScrnInfoPtr pScrn, DisplayModePtr modeList,
 }
 
 /**
+ * Marks as bad any reduced-blanking modes.
+ *
+ * \param modeList doubly-linked list of modes.
+ */
+_X_EXPORT void
+xf86ValidateModesReducedBlanking(ScrnInfoPtr pScrn, DisplayModePtr modeList)
+{
+    Bool mode_is_reduced = FALSE;
+    DisplayModePtr mode;
+
+    for (mode = modeList; mode != NULL; mode = mode->next) {
+	/* gratuitous duplication from pre-randr validation code */
+	if ((((mode->HDisplay * 5 / 4) & ~0x07) > mode->HTotal) &&
+	    ((mode->HTotal - mode->HDisplay) == 160) &&
+	    ((mode->HSyncEnd - mode->HDisplay) == 80) &&
+	    ((mode->HSyncEnd - mode->HSyncStart) == 32) &&
+	    ((mode->VSyncStart - mode->VDisplay) == 3))
+	    mode->status = MODE_NO_REDUCED;
+    }
+}
+
+/**
  * Frees any modes from the list with a status other than MODE_OK.
  *
  * \param modeList pointer to a doubly-linked or circular list of modes.
diff --git a/hw/xfree86/modes/xf86Modes.h b/hw/xfree86/modes/xf86Modes.h
index 5d49c93..acdea65 100644
--- a/hw/xfree86/modes/xf86Modes.h
+++ b/hw/xfree86/modes/xf86Modes.h
@@ -85,6 +85,9 @@ xf86ValidateModesBandwidth(ScrnInfoPtr pScrn, DisplayModePtr modeList,
 			   unsigned int bandwidth, int depth);
 
 void
+xf86ValidateModesReducedBlanking(ScrnInfoPtr pScrn, DisplayModePtr modeList);
+
+void
 xf86PruneInvalidModes(ScrnInfoPtr pScrn, DisplayModePtr *modeList,
 		      Bool verbose);
 


More information about the xorg-commit mailing list