Lines Matching refs:ds
194 DRI2ScreenPtr ds; in GetScreenPrime() local
199 ds = DRI2GetScreen(slave); in GetScreenPrime()
200 if (ds == NULL) in GetScreenPrime()
203 if (ds->prime_id == prime_id) in GetScreenPrime()
237 DRI2ScreenPtr ds = DRI2GetScreen(pDraw->pScreen); in DRI2AllocateDrawable() local
247 pPriv->dri2_screen = ds; in DRI2AllocateDrawable()
258 if (!ds->GetMSC || !(*ds->GetMSC) (pDraw, &ust, &pPriv->last_swap_target)) in DRI2AllocateDrawable()
285 DRI2ScreenPtr ds; in DRI2SwapLimit() local
290 ds = pPriv->dri2_screen; in DRI2SwapLimit()
292 if (!ds->SwapLimitValidate || !ds->SwapLimitValidate(pDraw, swap_limit)) in DRI2SwapLimit()
460 create_buffer(DRI2ScreenPtr ds, DrawablePtr pDraw, in create_buffer() argument
464 if (ds->CreateBuffer2) in create_buffer()
465 buffer = (*ds->CreateBuffer2)(GetScreenPrime(pDraw->pScreen, in create_buffer()
469 buffer = (*ds->CreateBuffer)(pDraw, attachment, format); in create_buffer()
477 DRI2ScreenPtr ds; in destroy_buffer() local
479 ds = DRI2GetScreen(primeScreen); in destroy_buffer()
480 if (ds->DestroyBuffer2) in destroy_buffer()
481 (*ds->DestroyBuffer2)(primeScreen, pDraw, buffer); in destroy_buffer()
483 (*ds->DestroyBuffer)(pDraw, buffer); in destroy_buffer()
506 allocate_or_reuse_buffer(DrawablePtr pDraw, DRI2ScreenPtr ds, in allocate_or_reuse_buffer() argument
516 *buffer = create_buffer(ds, pDraw, attachment, format); in allocate_or_reuse_buffer()
523 if (ds->ReuseBufferNotify) in allocate_or_reuse_buffer()
524 (*ds->ReuseBufferNotify) (pDraw, *buffer); in allocate_or_reuse_buffer()
562 DRI2ScreenPtr ds; in do_get_buffers() local
579 ds = DRI2GetScreenPrime(pDraw->pScreen, pPriv->prime_id); in do_get_buffers()
592 if (allocate_or_reuse_buffer(pDraw, ds, pPriv, attachment, in do_get_buffers()
627 if (allocate_or_reuse_buffer(pDraw, ds, pPriv, DRI2BufferFrontLeft, in do_get_buffers()
638 if (allocate_or_reuse_buffer(pDraw, ds, pPriv, DRI2BufferFakeFrontLeft, in do_get_buffers()
891 DRI2ScreenPtr ds; in dri2_copy_region() local
895 ds = DRI2GetScreen(primeScreen); in dri2_copy_region()
897 if (ds->CopyRegion2) in dri2_copy_region()
898 (*ds->CopyRegion2)(primeScreen, pDraw, pRegion, pDest, pSrc); in dri2_copy_region()
900 (*ds->CopyRegion) (pDraw, pRegion, pDest, pSrc); in dri2_copy_region()
1100 DRI2ScreenPtr ds = DRI2GetScreen(pDraw->pScreen); in DRI2SwapBuffers() local
1134 if (!ds->ScheduleSwap || !pPriv->swap_interval || pPriv->prime_id) { in DRI2SwapBuffers()
1164 if (ds->GetMSC) { in DRI2SwapBuffers()
1165 if (!(*ds->GetMSC) (pDraw, &ust, ¤t_msc)) in DRI2SwapBuffers()
1183 ret = (*ds->ScheduleSwap) (client, pDraw, pDestBuffer, pSrcBuffer, in DRI2SwapBuffers()
1219 DRI2ScreenPtr ds = DRI2GetScreen(pDraw->pScreen); in DRI2GetMSC() local
1230 if (!ds->GetMSC) { in DRI2GetMSC()
1242 ret = (*ds->GetMSC) (pDraw, ust, msc); in DRI2GetMSC()
1255 DRI2ScreenPtr ds = DRI2GetScreen(pDraw->pScreen); in DRI2WaitMSC() local
1264 if (!ds->ScheduleWaitMSC) { in DRI2WaitMSC()
1271 (*ds->ScheduleWaitMSC) (client, pDraw, target_msc, divisor, remainder); in DRI2WaitMSC()
1316 DRI2ScreenPtr ds = DRI2GetScreen(pScreen); in DRI2HasSwapControl() local
1318 return ds->ScheduleSwap && ds->GetMSC; in DRI2HasSwapControl()
1326 DRI2ScreenPtr ds; in DRI2Connect() local
1333 ds = DRI2GetScreenPrime(pScreen, prime_id); in DRI2Connect()
1334 if (ds == NULL) in DRI2Connect()
1337 if (driver_id >= ds->numDrivers || in DRI2Connect()
1338 !ds->driverNames[driver_id]) in DRI2Connect()
1341 *driverName = ds->driverNames[driver_id]; in DRI2Connect()
1342 *deviceName = ds->deviceName; in DRI2Connect()
1343 *fd = ds->fd; in DRI2Connect()
1357 DRI2ScreenPtr ds = DRI2GetScreen(pScreen); in DRI2AuthMagic() local
1358 if (ds == NULL) in DRI2AuthMagic()
1361 return (*ds->LegacyAuthMagic) (ds->fd, magic); in DRI2AuthMagic()
1367 DRI2ScreenPtr ds; in DRI2Authenticate() local
1371 ds = DRI2GetScreenPrime(pScreen, dri2_client->prime_id); in DRI2Authenticate()
1372 if (ds == NULL) in DRI2Authenticate()
1376 if ((*ds->AuthMagic)(primescreen, magic)) in DRI2Authenticate()
1387 DRI2ScreenPtr ds = DRI2GetScreen(pScreen); in DRI2ConfigNotify() local
1391 if (ds->ConfigNotify) { in DRI2ConfigNotify()
1392 pScreen->ConfigNotify = ds->ConfigNotify; in DRI2ConfigNotify()
1396 ds->ConfigNotify = pScreen->ConfigNotify; in DRI2ConfigNotify()
1413 DRI2ScreenPtr ds = DRI2GetScreen(pScreen); in DRI2SetWindowPixmap() local
1415 pScreen->SetWindowPixmap = ds->SetWindowPixmap; in DRI2SetWindowPixmap()
1417 ds->SetWindowPixmap = pScreen->SetWindowPixmap; in DRI2SetWindowPixmap()
1501 DRI2ScreenPtr ds; in DRI2ScreenInit() local
1531 ds = calloc(1, sizeof *ds); in DRI2ScreenInit()
1532 if (!ds) in DRI2ScreenInit()
1535 ds->screen = pScreen; in DRI2ScreenInit()
1536 ds->fd = info->fd; in DRI2ScreenInit()
1537 ds->deviceName = info->deviceName; in DRI2ScreenInit()
1540 ds->CreateBuffer = info->CreateBuffer; in DRI2ScreenInit()
1541 ds->DestroyBuffer = info->DestroyBuffer; in DRI2ScreenInit()
1542 ds->CopyRegion = info->CopyRegion; in DRI2ScreenInit()
1546 ds->ScheduleSwap = info->ScheduleSwap; in DRI2ScreenInit()
1547 ds->ScheduleWaitMSC = info->ScheduleWaitMSC; in DRI2ScreenInit()
1548 ds->GetMSC = info->GetMSC; in DRI2ScreenInit()
1553 ds->LegacyAuthMagic = info->AuthMagic; in DRI2ScreenInit()
1557 ds->ReuseBufferNotify = info->ReuseBufferNotify; in DRI2ScreenInit()
1558 ds->SwapLimitValidate = info->SwapLimitValidate; in DRI2ScreenInit()
1562 ds->GetParam = info->GetParam; in DRI2ScreenInit()
1567 ds->AuthMagic = info->AuthMagic2; in DRI2ScreenInit()
1571 ds->CreateBuffer2 = info->CreateBuffer2; in DRI2ScreenInit()
1573 ds->prime_id = get_prime_id(); in DRI2ScreenInit()
1574 if (ds->prime_id == -1) { in DRI2ScreenInit()
1575 free(ds); in DRI2ScreenInit()
1579 ds->DestroyBuffer2 = info->DestroyBuffer2; in DRI2ScreenInit()
1580 ds->CopyRegion2 = info->CopyRegion2; in DRI2ScreenInit()
1587 if (!ds->AuthMagic) { in DRI2ScreenInit()
1588 ds->AuthMagic = DRI2AuthMagic; in DRI2ScreenInit()
1593 if (!ds->LegacyAuthMagic) in DRI2ScreenInit()
1595 ds->LegacyAuthMagic = drmAuthMagic; in DRI2ScreenInit()
1607 ds->numDrivers = info->driverName ? 1 : 2; in DRI2ScreenInit()
1608 ds->driverNames = xallocarray(ds->numDrivers, sizeof(*ds->driverNames)); in DRI2ScreenInit()
1609 if (!ds->driverNames) in DRI2ScreenInit()
1613 ds->driverNames[0] = info->driverName; in DRI2ScreenInit()
1615 ds->driverName = dri2_probe_driver_name(pScreen, info); in DRI2ScreenInit()
1616 ds->driverNames[0] = ds->driverNames[1] = ds->driverName; in DRI2ScreenInit()
1617 if (!ds->driverNames[0]) in DRI2ScreenInit()
1622 ds->numDrivers = info->numDrivers; in DRI2ScreenInit()
1623 ds->driverNames = xallocarray(info->numDrivers, sizeof(*ds->driverNames)); in DRI2ScreenInit()
1624 if (!ds->driverNames) in DRI2ScreenInit()
1626 memcpy(ds->driverNames, info->driverNames, in DRI2ScreenInit()
1627 info->numDrivers * sizeof(*ds->driverNames)); in DRI2ScreenInit()
1630 dixSetPrivate(&pScreen->devPrivates, dri2ScreenPrivateKey, ds); in DRI2ScreenInit()
1632 ds->ConfigNotify = pScreen->ConfigNotify; in DRI2ScreenInit()
1635 ds->SetWindowPixmap = pScreen->SetWindowPixmap; in DRI2ScreenInit()
1640 if (i < ds->numDrivers && ds->driverNames[i]) { in DRI2ScreenInit()
1642 driverTypeNames[i], ds->driverNames[i]); in DRI2ScreenInit()
1652 free(ds); in DRI2ScreenInit()
1659 DRI2ScreenPtr ds = DRI2GetScreen(pScreen); in DRI2CloseScreen() local
1661 pScreen->ConfigNotify = ds->ConfigNotify; in DRI2CloseScreen()
1662 pScreen->SetWindowPixmap = ds->SetWindowPixmap; in DRI2CloseScreen()
1664 if (ds->prime_id) in DRI2CloseScreen()
1665 prime_id_allocate_bitmask &= ~(1 << ds->prime_id); in DRI2CloseScreen()
1666 free(ds->driverNames); in DRI2CloseScreen()
1667 free((char *)ds->driverName); in DRI2CloseScreen()
1668 free(ds); in DRI2CloseScreen()
1700 DRI2ScreenPtr ds = DRI2GetScreen(drawable->pScreen); in DRI2GetParam() local
1711 if (ds->GetParam) in DRI2GetParam()
1712 return ds->GetParam(client, drawable, param, in DRI2GetParam()