# # Updated but not checked in: # (will commit) # # modified: exa/exa_offscreen.c # # # Untracked files: # (use "git add" to add to commit) # # hw/xprint/etc/init.d/xprint # hw/xprint/etc/init.d/xprint.pre diff --git a/exa/exa_offscreen.c b/exa/exa_offscreen.c index 9e0aa5d..e124bdd 100644 --- a/exa/exa_offscreen.c +++ b/exa/exa_offscreen.c @@ -251,42 +251,44 @@ #endif ExaOffscreenValidate (pScreen); - DBG_OFFSCREEN (("Alloc 0x%x -> 0x%x (0x%x)\n", size, - area->base_offset, area->offset)); + DBG_OFFSCREEN (("Alloc 0x%x -> 0x%x (0x%x) locked %d\n", size, + area->base_offset, area->offset, area->state == ExaOffscreenLocked)); return area; } void ExaOffscreenSwapOut (ScreenPtr pScreen) { + ExaOffscreenArea *nextArea; ExaScreenPriv (pScreen); + ExaOffscreenArea *area = pExaScr->info->offScreenAreas; ExaOffscreenValidate (pScreen); - /* loop until a single free area spans the space */ + for (;;) { - ExaOffscreenArea *area = pExaScr->info->offScreenAreas; - if (!area) break; - if (area->state == ExaOffscreenAvail) + if (area->state == ExaOffscreenAvail || + area->state == ExaOffscreenLocked) { area = area->next; - if (!area) - break; + continue; } - assert (area->state != ExaOffscreenAvail); + + nextArea = area->next; (void) ExaOffscreenKickOut (pScreen, area); ExaOffscreenValidate (pScreen); + area = nextArea; } ExaOffscreenValidate (pScreen); - ExaOffscreenFini (pScreen); + ; } void ExaOffscreenSwapIn (ScreenPtr pScreen) { - exaOffscreenInit (pScreen); + ; } void