Merge branch 'master' of git+ssh://people.freedesktop.org/~alanc/xserver into next
This commit is contained in:
		
						commit
						88517ced1f
					
				
							
								
								
									
										13
									
								
								Xext/sync.c
								
								
								
								
							
							
						
						
									
										13
									
								
								Xext/sync.c
								
								
								
								
							| 
						 | 
				
			
			@ -2747,7 +2747,6 @@ init_system_idle_counter(const char *name, int deviceid)
 | 
			
		|||
{
 | 
			
		||||
    CARD64 resolution;
 | 
			
		||||
    XSyncValue idle;
 | 
			
		||||
    IdleCounterPriv *priv = malloc(sizeof(IdleCounterPriv));
 | 
			
		||||
    SyncCounter *idle_time_counter;
 | 
			
		||||
 | 
			
		||||
    IdleTimeQueryValue(NULL, &idle);
 | 
			
		||||
| 
						 | 
				
			
			@ -2758,10 +2757,14 @@ init_system_idle_counter(const char *name, int deviceid)
 | 
			
		|||
                                                IdleTimeQueryValue,
 | 
			
		||||
                                                IdleTimeBracketValues);
 | 
			
		||||
 | 
			
		||||
    priv->deviceid = deviceid;
 | 
			
		||||
    priv->value_less = priv->value_greater = NULL;
 | 
			
		||||
    if (idle_time_counter != NULL) {
 | 
			
		||||
        IdleCounterPriv *priv = malloc(sizeof(IdleCounterPriv));
 | 
			
		||||
 | 
			
		||||
    idle_time_counter->pSysCounterInfo->private = priv;
 | 
			
		||||
        priv->value_less = priv->value_greater = NULL;
 | 
			
		||||
        priv->deviceid = deviceid;
 | 
			
		||||
 | 
			
		||||
        idle_time_counter->pSysCounterInfo->private = priv;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return idle_time_counter;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -2786,6 +2789,6 @@ void SyncRemoveDeviceIdleTime(SyncCounter *counter)
 | 
			
		|||
    /* FreeAllResources() frees all system counters before the devices are
 | 
			
		||||
       shut down, check if there are any left before freeing the device's
 | 
			
		||||
       counter */
 | 
			
		||||
    if (!xorg_list_is_empty(&SysCounterList))
 | 
			
		||||
    if (counter && !xorg_list_is_empty(&SysCounterList))
 | 
			
		||||
        xorg_list_del(&counter->pSysCounterInfo->entry);
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -803,6 +803,7 @@ PanoramiXCompositeGetOverlayWindow(ClientPtr client)
 | 
			
		|||
                                     RT_WINDOW, client, DixGetAttrAccess);
 | 
			
		||||
        if (rc != Success) {
 | 
			
		||||
            client->errorValue = stuff->window;
 | 
			
		||||
            free(overlayWin);
 | 
			
		||||
            return rc;
 | 
			
		||||
        }
 | 
			
		||||
        pScreen = pWin->drawable.pScreen;
 | 
			
		||||
| 
						 | 
				
			
			@ -812,8 +813,10 @@ PanoramiXCompositeGetOverlayWindow(ClientPtr client)
 | 
			
		|||
         * interest in the overlay window
 | 
			
		||||
         */
 | 
			
		||||
        pOc = compCreateOverlayClient(pScreen, client);
 | 
			
		||||
        if (pOc == NULL)
 | 
			
		||||
        if (pOc == NULL) {
 | 
			
		||||
            free(overlayWin);
 | 
			
		||||
            return BadAlloc;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /*
 | 
			
		||||
         * Make sure the overlay window exists
 | 
			
		||||
| 
						 | 
				
			
			@ -822,6 +825,7 @@ PanoramiXCompositeGetOverlayWindow(ClientPtr client)
 | 
			
		|||
        if (cs->pOverlayWin == NULL)
 | 
			
		||||
            if (!compCreateOverlayWindow(pScreen)) {
 | 
			
		||||
                FreeResource(pOc->resource, RT_NONE);
 | 
			
		||||
                free(overlayWin);
 | 
			
		||||
                return BadAlloc;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -831,6 +835,7 @@ PanoramiXCompositeGetOverlayWindow(ClientPtr client)
 | 
			
		|||
                      DixGetAttrAccess);
 | 
			
		||||
        if (rc != Success) {
 | 
			
		||||
            FreeResource(pOc->resource, RT_NONE);
 | 
			
		||||
            free(overlayWin);
 | 
			
		||||
            return rc;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -858,7 +858,7 @@ hostx_load_keymap(void)
 | 
			
		|||
                                         (max_keycode - min_keycode + 1) *
 | 
			
		||||
                                         width);
 | 
			
		||||
    if (!ephyrKeySyms.map)
 | 
			
		||||
        return;
 | 
			
		||||
        goto out;
 | 
			
		||||
 | 
			
		||||
    for (i = 0; i < (max_keycode - min_keycode + 1); i++)
 | 
			
		||||
        for (j = 0; j < width; j++)
 | 
			
		||||
| 
						 | 
				
			
			@ -871,6 +871,7 @@ hostx_load_keymap(void)
 | 
			
		|||
    ephyrKeySyms.maxKeyCode = max_keycode;
 | 
			
		||||
    ephyrKeySyms.mapWidth = width;
 | 
			
		||||
 | 
			
		||||
 out:
 | 
			
		||||
    XFree(keymap);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1370,7 +1370,6 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes,
 | 
			
		|||
    int saveType;
 | 
			
		||||
    PixmapFormatRec *BankFormat;
 | 
			
		||||
    ClockRangePtr cp;
 | 
			
		||||
    ClockRangePtr storeClockRanges;
 | 
			
		||||
    int numTimings = 0;
 | 
			
		||||
    range hsync[MAX_HSYNC];
 | 
			
		||||
    range vrefresh[MAX_VREFRESH];
 | 
			
		||||
| 
						 | 
				
			
			@ -1492,16 +1491,14 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes,
 | 
			
		|||
    /*
 | 
			
		||||
     * Store the clockRanges for later use by the VidMode extension.
 | 
			
		||||
     */
 | 
			
		||||
    storeClockRanges = scrp->clockRanges;
 | 
			
		||||
    while (storeClockRanges != NULL) {
 | 
			
		||||
        storeClockRanges = storeClockRanges->next;
 | 
			
		||||
    }
 | 
			
		||||
    for (cp = clockRanges; cp != NULL; cp = cp->next,
 | 
			
		||||
         storeClockRanges = storeClockRanges->next) {
 | 
			
		||||
        storeClockRanges = xnfalloc(sizeof(ClockRange));
 | 
			
		||||
    nt_list_for_each_entry(cp, clockRanges, next) {
 | 
			
		||||
        ClockRangePtr newCR = xnfalloc(sizeof(ClockRange));
 | 
			
		||||
        memcpy(newCR, cp, sizeof(ClockRange));
 | 
			
		||||
        newCR->next = NULL;
 | 
			
		||||
        if (scrp->clockRanges == NULL)
 | 
			
		||||
            scrp->clockRanges = storeClockRanges;
 | 
			
		||||
        memcpy(storeClockRanges, cp, sizeof(ClockRange));
 | 
			
		||||
            scrp->clockRanges = newCR;
 | 
			
		||||
        else
 | 
			
		||||
            nt_list_append(newCR, scrp->clockRanges, ClockRange, next);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /* Determine which pixmap format to pass to scanLineWidth() */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -743,7 +743,7 @@ xf86TokenToOptName(const OptionInfoRec * table, int token)
 | 
			
		|||
    const OptionInfoRec *p;
 | 
			
		||||
 | 
			
		||||
    p = xf86TokenToOptinfo(table, token);
 | 
			
		||||
    return p->name;
 | 
			
		||||
    return p ? p->name : NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
Bool
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -320,15 +320,17 @@ localRegisterFreeBoxCallback(ScreenPtr pScreen,
 | 
			
		|||
    newCallbacks = realloc(offman->FreeBoxesUpdateCallback,
 | 
			
		||||
                           sizeof(FreeBoxCallbackProcPtr) *
 | 
			
		||||
                           (offman->NumCallbacks + 1));
 | 
			
		||||
    if (!newCallbacks)
 | 
			
		||||
        return FALSE;
 | 
			
		||||
    else
 | 
			
		||||
        offman->FreeBoxesUpdateCallback = newCallbacks;
 | 
			
		||||
 | 
			
		||||
    newPrivates = realloc(offman->devPrivates,
 | 
			
		||||
                          sizeof(DevUnion) * (offman->NumCallbacks + 1));
 | 
			
		||||
 | 
			
		||||
    if (!newCallbacks || !newPrivates)
 | 
			
		||||
    if (!newPrivates)
 | 
			
		||||
        return FALSE;
 | 
			
		||||
 | 
			
		||||
    offman->FreeBoxesUpdateCallback = newCallbacks;
 | 
			
		||||
    offman->devPrivates = newPrivates;
 | 
			
		||||
    else
 | 
			
		||||
        offman->devPrivates = newPrivates;
 | 
			
		||||
 | 
			
		||||
    offman->FreeBoxesUpdateCallback[offman->NumCallbacks] = FreeBoxCallback;
 | 
			
		||||
    offman->devPrivates[offman->NumCallbacks].ptr = devPriv;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -158,8 +158,10 @@ xf86XvMCScreenInit(ScreenPtr pScreen,
 | 
			
		|||
    if (!(pAdapt = malloc(sizeof(XvMCAdaptorRec) * num_adaptors)))
 | 
			
		||||
        return FALSE;
 | 
			
		||||
 | 
			
		||||
    if (!dixRegisterPrivateKey(&XF86XvMCScreenKeyRec, PRIVATE_SCREEN, 0))
 | 
			
		||||
    if (!dixRegisterPrivateKey(&XF86XvMCScreenKeyRec, PRIVATE_SCREEN, 0)) {
 | 
			
		||||
        free(pAdapt);
 | 
			
		||||
        return FALSE;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (!(pScreenPriv = malloc(sizeof(xf86XvMCScreenRec)))) {
 | 
			
		||||
        free(pAdapt);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -91,15 +91,16 @@ resort(unsigned char *s_block)
 | 
			
		|||
    unsigned char *d_new, *d_ptr, *d_end, *s_ptr, *s_end;
 | 
			
		||||
    unsigned char tmp;
 | 
			
		||||
 | 
			
		||||
    s_ptr = find_header(s_block);
 | 
			
		||||
    if (!s_ptr)
 | 
			
		||||
        return NULL;
 | 
			
		||||
    s_end = s_block + EDID1_LEN;
 | 
			
		||||
 | 
			
		||||
    d_new = malloc(EDID1_LEN);
 | 
			
		||||
    if (!d_new)
 | 
			
		||||
        return NULL;
 | 
			
		||||
    d_end = d_new + EDID1_LEN;
 | 
			
		||||
 | 
			
		||||
    s_ptr = find_header(s_block);
 | 
			
		||||
    if (!s_ptr)
 | 
			
		||||
        return NULL;
 | 
			
		||||
    for (d_ptr = d_new; d_ptr < d_end; d_ptr++) {
 | 
			
		||||
        tmp = *(s_ptr++);
 | 
			
		||||
        *d_ptr = tmp;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue