From d42f3960514f1c410863ac6c09c5638b5ddeae20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Mon, 28 Dec 2009 16:48:18 +0100 Subject: [PATCH] EXA: Allow optimized migration to be enabled with mixed pixmaps. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This was always the intention, I only recently realized it wasn't the case yet... Signed-off-by: Michel Dänzer Acked-by: Maarten Maathuis Signed-off-by: Keith Packard --- hw/xfree86/exa/examodule.c | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/hw/xfree86/exa/examodule.c b/hw/xfree86/exa/examodule.c index 601288c73..bcb6a405c 100644 --- a/hw/xfree86/exa/examodule.c +++ b/hw/xfree86/exa/examodule.c @@ -122,24 +122,25 @@ exaDDXDriverInit(ScreenPtr pScreen) memcpy(pScreenPriv->options, EXAOptions, sizeof(EXAOptions)); xf86ProcessOptions (pScrn->scrnIndex, pScrn->options, pScreenPriv->options); - if ((pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS) && - pExaScr->info->offScreenBase < pExaScr->info->memorySize) - { - char *heuristicName; + if (pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS) { + if (!(pExaScr->info->flags & EXA_HANDLES_PIXMAPS) && + pExaScr->info->offScreenBase < pExaScr->info->memorySize) { + char *heuristicName; - heuristicName = xf86GetOptValString (pScreenPriv->options, - EXAOPT_MIGRATION_HEURISTIC); - if (heuristicName != NULL) { - if (strcmp(heuristicName, "greedy") == 0) - pExaScr->migration = ExaMigrationGreedy; - else if (strcmp(heuristicName, "always") == 0) - pExaScr->migration = ExaMigrationAlways; - else if (strcmp(heuristicName, "smart") == 0) - pExaScr->migration = ExaMigrationSmart; - else { - xf86DrvMsg (pScreen->myNum, X_WARNING, - "EXA: unknown migration heuristic %s\n", - heuristicName); + heuristicName = xf86GetOptValString (pScreenPriv->options, + EXAOPT_MIGRATION_HEURISTIC); + if (heuristicName != NULL) { + if (strcmp(heuristicName, "greedy") == 0) + pExaScr->migration = ExaMigrationGreedy; + else if (strcmp(heuristicName, "always") == 0) + pExaScr->migration = ExaMigrationAlways; + else if (strcmp(heuristicName, "smart") == 0) + pExaScr->migration = ExaMigrationSmart; + else { + xf86DrvMsg (pScreen->myNum, X_WARNING, + "EXA: unknown migration heuristic %s\n", + heuristicName); + } } }