[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Git][xorg-team/xserver/xorg-server][upstream-unstable] 7 commits: Fix RandR leasing for more than 1 simultaneously active lease.



Title: GitLab

Timo Aaltonen pushed to branch upstream-unstable at X Strike Force / xserver / xorg-server

Commits:

10 changed files:

Changes:

  • Xext/saver.c
    ... ... @@ -1351,8 +1351,8 @@ SProcScreenSaverSuspend(ClientPtr client)
    1351 1351
         REQUEST(xScreenSaverSuspendReq);
    
    1352 1352
     
    
    1353 1353
         swaps(&stuff->length);
    
    1354
    -    swapl(&stuff->suspend);
    
    1355 1354
         REQUEST_SIZE_MATCH(xScreenSaverSuspendReq);
    
    1355
    +    swapl(&stuff->suspend);
    
    1356 1356
         return ProcScreenSaverSuspend(client);
    
    1357 1357
     }
    
    1358 1358
     
    

  • configure.ac
    ... ... @@ -26,8 +26,8 @@ dnl
    26 26
     dnl Process this file with autoconf to create configure.
    
    27 27
     
    
    28 28
     AC_PREREQ(2.60)
    
    29
    -AC_INIT([xorg-server], 1.20.13, [https://gitlab.freedesktop.org/xorg/xserver/issues], xorg-server)
    
    30
    -RELEASE_DATE="2021-07-29"
    
    29
    +AC_INIT([xorg-server], 1.20.14, [https://gitlab.freedesktop.org/xorg/xserver/issues], xorg-server)
    
    30
    +RELEASE_DATE="2021-12-15"
    
    31 31
     RELEASE_NAME="Lemon Pepper Chicken"
    
    32 32
     AC_CONFIG_SRCDIR([Makefile.am])
    
    33 33
     AC_CONFIG_MACRO_DIR([m4])
    

  • hw/xfree86/drivers/modesetting/driver.c
    ... ... @@ -1040,6 +1040,14 @@ PreInit(ScrnInfoPtr pScrn, int flags)
    1040 1040
     #endif
    
    1041 1041
         }
    
    1042 1042
     
    
    1043
    +    /*
    
    1044
    +     * Use "atomic modesetting disable" request to detect if the kms driver is
    
    1045
    +     * atomic capable, regardless if we will actually use atomic modesetting.
    
    1046
    +     * This is effectively a no-op, we only care about the return status code.
    
    1047
    +     */
    
    1048
    +    ret = drmSetClientCap(ms->fd, DRM_CLIENT_CAP_ATOMIC, 0);
    
    1049
    +    ms->atomic_modeset_capable = (ret == 0);
    
    1050
    +
    
    1043 1051
         if (xf86ReturnOptValBool(ms->drmmode.Options, OPTION_ATOMIC, FALSE)) {
    
    1044 1052
             ret = drmSetClientCap(ms->fd, DRM_CLIENT_CAP_ATOMIC, 1);
    
    1045 1053
             ms->atomic_modeset = (ret == 0);
    

  • hw/xfree86/drivers/modesetting/driver.h
    ... ... @@ -108,6 +108,7 @@ typedef struct _modesettingRec {
    108 108
          * Page flipping stuff.
    
    109 109
          *  @{
    
    110 110
          */
    
    111
    +    Bool atomic_modeset_capable;
    
    111 112
         Bool atomic_modeset;
    
    112 113
         Bool pending_modeset;
    
    113 114
         /** @} */
    

  • hw/xfree86/drivers/modesetting/present.c
    ... ... @@ -252,8 +252,11 @@ ms_present_check_unflip(RRCrtcPtr crtc,
    252 252
         if (num_crtcs_on == 0)
    
    253 253
             return FALSE;
    
    254 254
     
    
    255
    -    /* Check stride, can't change that on flip */
    
    256
    -    if (!ms->atomic_modeset &&
    
    255
    +    /*
    
    256
    +     * Check stride, can't change that reliably on flip on some drivers, unless
    
    257
    +     * the kms driver is atomic_modeset_capable.
    
    258
    +     */
    
    259
    +    if (!ms->atomic_modeset_capable &&
    
    257 260
             pixmap->devKind != drmmode_bo_get_pitch(&ms->drmmode.front_bo))
    
    258 261
             return FALSE;
    
    259 262
     
    

  • meson.build
    ... ... @@ -3,7 +3,7 @@ project('xserver', 'c',
    3 3
                 'buildtype=debugoptimized',
    
    4 4
                 'c_std=gnu99',
    
    5 5
             ],
    
    6
    -        version: '1.20.13',
    
    6
    +        version: '1.20.14',
    
    7 7
             meson_version: '>= 0.42.0',
    
    8 8
     )
    
    9 9
     add_project_arguments('-DHAVE_DIX_CONFIG_H', language: 'c')
    

  • randr/rrlease.c
    ... ... @@ -295,7 +295,7 @@ ProcRRCreateLease(ClientPtr client)
    295 295
         if (rc != Success)
    
    296 296
             goto bail_lease;
    
    297 297
     
    
    298
    -    xorg_list_add(&scr_priv->leases, &lease->list);
    
    298
    +    xorg_list_add(&lease->list, &scr_priv->leases);
    
    299 299
     
    
    300 300
         if (!AddResource(stuff->lid, RRLeaseType, lease)) {
    
    301 301
             close(fd);
    

  • record/record.c
    ... ... @@ -2515,8 +2515,8 @@ SwapCreateRegister(ClientPtr client, xRecordRegisterClientsReq * stuff)
    2515 2515
             swapl(pClientID);
    
    2516 2516
         }
    
    2517 2517
         if (stuff->nRanges >
    
    2518
    -        client->req_len - bytes_to_int32(sz_xRecordRegisterClientsReq)
    
    2519
    -        - stuff->nClients)
    
    2518
    +        (client->req_len - bytes_to_int32(sz_xRecordRegisterClientsReq)
    
    2519
    +        - stuff->nClients) / bytes_to_int32(sz_xRecordRange))
    
    2520 2520
             return BadLength;
    
    2521 2521
         RecordSwapRanges((xRecordRange *) pClientID, stuff->nRanges);
    
    2522 2522
         return Success;
    

  • render/render.c
    ... ... @@ -2309,6 +2309,9 @@ SProcRenderCompositeGlyphs(ClientPtr client)
    2309 2309
     
    
    2310 2310
             i = elt->len;
    
    2311 2311
             if (i == 0xff) {
    
    2312
    +            if (buffer + 4 > end) {
    
    2313
    +                return BadLength;
    
    2314
    +            }
    
    2312 2315
                 swapl((int *) buffer);
    
    2313 2316
                 buffer += 4;
    
    2314 2317
             }
    
    ... ... @@ -2319,12 +2322,18 @@ SProcRenderCompositeGlyphs(ClientPtr client)
    2319 2322
                     buffer += i;
    
    2320 2323
                     break;
    
    2321 2324
                 case 2:
    
    2325
    +                if (buffer + i * 2 > end) {
    
    2326
    +                    return BadLength;
    
    2327
    +                }
    
    2322 2328
                     while (i--) {
    
    2323 2329
                         swaps((short *) buffer);
    
    2324 2330
                         buffer += 2;
    
    2325 2331
                     }
    
    2326 2332
                     break;
    
    2327 2333
                 case 4:
    
    2334
    +                if (buffer + i * 4 > end) {
    
    2335
    +                    return BadLength;
    
    2336
    +                }
    
    2328 2337
                     while (i--) {
    
    2329 2338
                         swapl((int *) buffer);
    
    2330 2339
                         buffer += 4;
    

  • xfixes/cursor.c
    ... ... @@ -1010,7 +1010,8 @@ ProcXFixesCreatePointerBarrier(ClientPtr client)
    1010 1010
     {
    
    1011 1011
         REQUEST(xXFixesCreatePointerBarrierReq);
    
    1012 1012
     
    
    1013
    -    REQUEST_FIXED_SIZE(xXFixesCreatePointerBarrierReq, pad_to_int32(stuff->num_devices));
    
    1013
    +    REQUEST_FIXED_SIZE(xXFixesCreatePointerBarrierReq,
    
    1014
    +                       pad_to_int32(stuff->num_devices * sizeof(CARD16)));
    
    1014 1015
         LEGAL_NEW_RESOURCE(stuff->barrier, client);
    
    1015 1016
     
    
    1016 1017
         return XICreatePointerBarrier(client, stuff);
    
    ... ... @@ -1027,7 +1028,8 @@ SProcXFixesCreatePointerBarrier(ClientPtr client)
    1027 1028
     
    
    1028 1029
         swaps(&stuff->length);
    
    1029 1030
         swaps(&stuff->num_devices);
    
    1030
    -    REQUEST_FIXED_SIZE(xXFixesCreatePointerBarrierReq, pad_to_int32(stuff->num_devices));
    
    1031
    +    REQUEST_FIXED_SIZE(xXFixesCreatePointerBarrierReq,
    
    1032
    +                       pad_to_int32(stuff->num_devices * sizeof(CARD16)));
    
    1031 1033
     
    
    1032 1034
         swapl(&stuff->barrier);
    
    1033 1035
         swapl(&stuff->window);
    


  • Reply to: