xf86-video-intel: Branch 'modesetting' - 2 commits - src/i830_display.c src/i830_modes.c

Eric Anholt anholt at kemper.freedesktop.org
Thu Jul 6 02:08:44 EEST 2006


 src/i830_display.c |   13 +++++++++++--
 src/i830_modes.c   |    4 +++-
 2 files changed, 14 insertions(+), 3 deletions(-)

New commits:
diff-tree e1064f52b0ff69ea7937897b8c951cc3e32cd752 (from ffa6ecc18bc54151061d9956f1d12575fc057da3)
Author: Eric Anholt <anholt at FreeBSD.org>
Date:   Wed Jul 5 16:00:03 2006 -0700

    Don't try to probe modes on an SDVO device with NULL sdvo_drv.

diff --git a/src/i830_modes.c b/src/i830_modes.c
index cb50523..bb097b8 100644
--- a/src/i830_modes.c
+++ b/src/i830_modes.c
@@ -733,7 +733,9 @@ I830ReprobePipeModeList(ScrnInfoPtr pScr
 	    }
 	    break;
 	case I830_OUTPUT_SDVO:
-	    if (outputs & PIPE_DFP) {
+	    if (outputs & PIPE_DFP &&
+		pI830->output[i].sdvo_drv != NULL)
+	    {
 		output_index = i;
 	    }
 	    break;
diff-tree ffa6ecc18bc54151061d9956f1d12575fc057da3 (from dfd7fef457c048c9f0d826e37d91453d9e1485b9)
Author: Eric Anholt <anholt at FreeBSD.org>
Date:   Wed Jul 5 14:41:08 2006 -0700

    More fixes to "choose closest mode for the pipe" code to select correct refresh.

diff --git a/src/i830_display.c b/src/i830_display.c
index b5461c2..d31c100 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -275,12 +275,19 @@ i830PipeSetMode(ScrnInfoPtr pScrn, Displ
 	for (pScan = pI830->pipeMon[pipe]->Modes; pScan != NULL;
 	     pScan = pScan->next)
 	{
+	    /* If there's an exact match, we're done. */
+	    if (I830ModesEqual(pScan, pMode)) {
+		pBest = pMode;
+		break;
+	    }
+
 	    /* Reject if it's larger than the desired mode. */
 	    if (pScan->HDisplay > pMode->HDisplay ||
 		pScan->VDisplay > pMode->VDisplay)
 	    {
 		continue;
 	    }
+
 	    if (pBest == NULL) {
 		pBest = pScan;
 	        continue;
@@ -288,8 +295,10 @@ i830PipeSetMode(ScrnInfoPtr pScrn, Displ
 	    /* Find if it's closer to the right size than the current best
 	     * option.
 	     */
-	    if (pScan->HDisplay >= pBest->HDisplay && 
-		pScan->VDisplay >= pBest->VDisplay)
+	    if ((pScan->HDisplay > pBest->HDisplay && 
+		pScan->VDisplay >= pBest->VDisplay) ||
+	        (pScan->HDisplay >= pBest->HDisplay && 
+		pScan->VDisplay > pBest->VDisplay))
 	    {
 		pBest = pScan;
 		continue;



More information about the xorg-commit mailing list