Lines Matching +full:1 +full:ms

120     1,
137 {-1, NULL}
158 {-1, NULL, OPTV_NONE, {0}, FALSE}
161 int ms_entity_index = -1;
190 setupDone = 1; in Setup()
197 return (void *) 1; in Setup()
216 modesettingPtr ms = modesettingPTR(scrn); in ms_ent_priv() local
217 pPriv = xf86GetEntityPrivate(ms->pEnt->index, in ms_ent_priv()
226 xf86DrvMsg(-1, X_INFO, "Using passed DRM master file descriptor %d\n", xf86DRMMasterFd); in get_passed_fd()
229 return -1; in get_passed_fd()
237 if ((fd = get_passed_fd()) != -1) in open_hw()
244 if ((NULL == dev) || ((fd = open(dev, O_RDWR | O_CLOEXEC, 0)) == -1)) { in open_hw()
249 if (fd == -1) in open_hw()
250 xf86DrvMsg(-1, X_ERROR, "open %s: %s\n", dev, strerror(errno)); in open_hw()
288 if (fd == -1) in probe_hw()
295 if (fd != -1) { in probe_hw()
310 dev->domain, dev->bus, dev->dev, dev->func) == -1) in ms_DRICreatePCIBusID()
323 if (fd == -1) in probe_hw_pci()
326 sv.drm_di_major = 1; in probe_hw_pci()
328 sv.drm_dd_major = -1; in probe_hw_pci()
329 sv.drm_dd_minor = -1; in probe_hw_pci()
373 scrn->driverVersion = 1; in ms_setup_scrn_hooks()
395 if (ms_entity_index == -1) in ms_setup_entity()
401 xf86SetEntityInstanceForScreen(scrn, entity_num, xf86GetNumEntityInstances(entity_num) - 1); in ms_setup_entity()
404 pPriv->ptr = xnfcalloc(sizeof(modesettingEntRec), 1); in ms_setup_entity()
526 pScrn->driverPrivate = xnfcalloc(sizeof(modesettingRec), 1); in GetRec()
535 modesettingPtr ms = modesettingPTR(scrn); in dispatch_dirty_region() local
545 if (ms->drmmode.glamor) in dispatch_dirty_region()
566 ret = drmModeDirtyFB(ms->fd, fb_id, clip, num_cliprects); in dispatch_dirty_region()
571 if ((ret = drmModeDirtyFB(ms->fd, fb_id, &clip[i], 1)) < 0) in dispatch_dirty_region()
586 modesettingPtr ms = modesettingPTR(scrn); in dispatch_dirty() local
588 int fb_id = ms->drmmode.fb_id; in dispatch_dirty()
591 ret = dispatch_dirty_region(scrn, pixmap, ms->damage, fb_id); in dispatch_dirty()
593 ms->dirty_enabled = FALSE; in dispatch_dirty()
594 DamageUnregister(ms->damage); in dispatch_dirty()
595 DamageDestroy(ms->damage); in dispatch_dirty()
596 ms->damage = NULL; in dispatch_dirty()
606 modesettingPtr ms = modesettingPTR(scrn); in dispatch_dirty_pixmap() local
607 msPixmapPrivPtr ppriv = msGetPixmapPriv(&ms->drmmode, ppix); in dispatch_dirty_pixmap()
646 modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(screen)); in redisplay_dirty() local
653 if (ms->drmmode.glamor) in redisplay_dirty()
668 modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(screen)); in ms_dirty_update() local
681 msGetPixmapPriv(&ms->drmmode, ent->slave_dst->master_pixmap); in ms_dirty_update()
720 modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(pScreen)); in msBlockHandler() local
726 if (ms->warm_up) { in msBlockHandler()
727 ms->warm_up = FALSE; in msBlockHandler()
737 pScreen->BlockHandler = ms->BlockHandler; in msBlockHandler()
739 ms->BlockHandler = pScreen->BlockHandler; in msBlockHandler()
741 if (pScreen->isGPU && !ms->drmmode.reverse_prime_offload_mode) in msBlockHandler()
744 if (ms->dirty_enabled) in msBlockHandler()
755 drmmode_set_desired_modes(pScrn, &ms->drmmode, TRUE, FALSE); in msBlockHandler()
768 modesettingPtr ms = modesettingPTR(pScrn); in msBlockHandler_oneshot() local
773 drmmode_set_desired_modes(pScrn, &ms->drmmode, TRUE, FALSE); in msBlockHandler_oneshot()
779 modesettingPtr ms; in FreeRec() local
784 ms = modesettingPTR(pScrn); in FreeRec()
785 if (!ms) in FreeRec()
788 if (ms->fd > 0) { in FreeRec()
795 if (ms->pEnt->location.type == BUS_PCI) in FreeRec()
796 ret = drmClose(ms->fd); in FreeRec()
799 if (!(ms->pEnt->location.type == BUS_PLATFORM && in FreeRec()
800 (ms->pEnt->location.id.plat->flags & XF86_PDEV_SERVER_FD))) in FreeRec()
802 ret = close(ms->fd); in FreeRec()
808 free(ms->drmmode.Options); in FreeRec()
809 free(ms); in FreeRec()
816 modesettingPtr ms = modesettingPTR(pScrn); in try_enable_exa() local
821 if (ms->drmmode.exa) in try_enable_exa()
830 modesettingPtr ms = modesettingPTR(pScrn); in try_enable_glamor() local
831 const char *accel_method_str = xf86GetOptValString(ms->drmmode.Options, in try_enable_glamor()
836 ms->drmmode.glamor = FALSE; in try_enable_glamor()
839 if (ms->drmmode.force_24_32) { in try_enable_glamor()
850 if (glamor_egl_init(pScrn, ms->fd)) { in try_enable_glamor()
852 ms->drmmode.glamor = TRUE; in try_enable_glamor()
870 msShouldDoubleShadow(ScrnInfoPtr pScrn, modesettingPtr ms) in msShouldDoubleShadow() argument
876 if (!ms->drmmode.shadow_enable) in msShouldDoubleShadow()
879 v = drmGetVersion(ms->fd); in msShouldDoubleShadow()
886 asked = xf86GetOptValBool(ms->drmmode.Options, OPTION_DOUBLE_SHADOW, &ret); in msShouldDoubleShadow()
903 modesettingPtr ms; in ms_get_drm_master_fd() local
906 ms = modesettingPTR(pScrn); in ms_get_drm_master_fd()
909 pEnt = ms->pEnt; in ms_get_drm_master_fd()
914 ms->fd = ms_ent->fd; in ms_get_drm_master_fd()
919 ms->fd_passed = FALSE; in ms_get_drm_master_fd()
920 if ((ms->fd = get_passed_fd()) >= 0) { in ms_get_drm_master_fd()
921 ms->fd_passed = TRUE; in ms_get_drm_master_fd()
929 ms->fd = in ms_get_drm_master_fd()
938 ms->fd = open_hw(path); in ms_get_drm_master_fd()
948 PciInfo = xf86GetPciInfoForEntity(ms->pEnt->index); in ms_get_drm_master_fd()
951 ms->fd = drmOpen(NULL, BusID); in ms_get_drm_master_fd()
960 devicename = xf86FindOptionValue(ms->pEnt->device->options, "kmsdev"); in ms_get_drm_master_fd()
961 ms->fd = open_hw(devicename); in ms_get_drm_master_fd()
963 if (ms->fd < 0) in ms_get_drm_master_fd()
966 ms_ent->fd = ms->fd; in ms_get_drm_master_fd()
967 ms_ent->fd_ref = 1; in ms_get_drm_master_fd()
974 modesettingPtr ms; in PreInit() local
983 if (pScrn->numEntities != 1) in PreInit()
996 ms = modesettingPTR(pScrn); in PreInit()
997 ms->SaveGeneration = -1; in PreInit()
998 ms->pEnt = pEnt; in PreInit()
999 ms->drmmode.is_secondary = FALSE; in PreInit()
1004 ms->drmmode.is_secondary = TRUE; in PreInit()
1015 ms->drmmode.fd = ms->fd; in PreInit()
1017 if (!check_outputs(ms->fd, &connector_count)) in PreInit()
1020 drmmode_get_default_bpp(pScrn, &ms->drmmode, &defaultdepth, &defaultbpp); in PreInit()
1022 ms->drmmode.force_24_32 = TRUE; in PreInit()
1023 ms->drmmode.kbpp = 24; in PreInit()
1028 ms->drmmode.kbpp = 0; in PreInit()
1049 if (!ms->drmmode.kbpp) in PreInit()
1050 ms->drmmode.kbpp = pScrn->bitsPerPixel; in PreInit()
1054 if (!(ms->drmmode.Options = malloc(sizeof(Options)))) in PreInit()
1056 memcpy(ms->drmmode.Options, Options, sizeof(Options)); in PreInit()
1057 xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, ms->drmmode.Options); in PreInit()
1061 if (!xf86SetDefaultVisual(pScrn, -1)) in PreInit()
1064 if (xf86ReturnOptValBool(ms->drmmode.Options, OPTION_SW_CURSOR, FALSE)) { in PreInit()
1065 ms->drmmode.sw_cursor = TRUE; in PreInit()
1068 ms->cursor_width = 64; in PreInit()
1069 ms->cursor_height = 64; in PreInit()
1070 ret = drmGetCap(ms->fd, DRM_CAP_CURSOR_WIDTH, &value); in PreInit()
1072 ms->cursor_width = value; in PreInit()
1074 ret = drmGetCap(ms->fd, DRM_CAP_CURSOR_HEIGHT, &value); in PreInit()
1076 ms->cursor_height = value; in PreInit()
1081 if (!ms->drmmode.glamor) { in PreInit()
1084 if (ms->drmmode.force_24_32) { in PreInit()
1086 ms->drmmode.shadow_enable = TRUE; in PreInit()
1088 ret = drmGetCap(ms->fd, DRM_CAP_DUMB_PREFER_SHADOW, &value); in PreInit()
1093 ms->drmmode.shadow_enable = in PreInit()
1094 xf86ReturnOptValBool(ms->drmmode.Options, OPTION_SHADOW_FB, in PreInit()
1101 ms->drmmode.force_24_32 ? "FORCE" : in PreInit()
1102 ms->drmmode.shadow_enable ? "YES" : "NO"); in PreInit()
1104 ms->drmmode.shadow_enable2 = msShouldDoubleShadow(pScrn, ms); in PreInit()
1107 ms->drmmode.pageflip = in PreInit()
1108 xf86ReturnOptValBool(ms->drmmode.Options, OPTION_PAGEFLIP, TRUE); in PreInit()
1110 ms->drmmode.hotplug_reset = in PreInit()
1111 xf86ReturnOptValBool(ms->drmmode.Options, OPTION_HOTPLUG_RESET, TRUE); in PreInit()
1113 ms->warm_up = in PreInit()
1114 xf86ReturnOptValBool(ms->drmmode.Options, OPTION_WARM_UP, TRUE); in PreInit()
1116 str_value = xf86GetOptValString(ms->drmmode.Options, OPTION_FLIP_FB); in PreInit()
1118 ms->drmmode.fb_flip_mode = DRMMODE_FB_FLIP_TRANSFORMED; in PreInit()
1120 ms->drmmode.fb_flip_mode = DRMMODE_FB_FLIP_ALWAYS; in PreInit()
1122 ms->drmmode.fb_flip_mode = DRMMODE_FB_FLIP_NONE; in PreInit()
1124 ret = -1; in PreInit()
1125 xf86GetOptValInteger(ms->drmmode.Options, OPTION_FLIP_FB_RATE, &ret); in PreInit()
1126 ms->drmmode.fb_flip_rate = ret > 0 ? ret : 0; in PreInit()
1128 if (ms->drmmode.fb_flip_mode != DRMMODE_FB_FLIP_NONE) in PreInit()
1131 (ms->drmmode.fb_flip_mode == DRMMODE_FB_FLIP_ALWAYS ? in PreInit()
1132 "Always" : "Transformed"), ms->drmmode.fb_flip_rate ?: -1); in PreInit()
1135 ret = drmGetCap(ms->fd, DRM_CAP_PRIME, &value); in PreInit()
1139 if (ms->drmmode.glamor) in PreInit()
1143 if (value & DRM_PRIME_CAP_EXPORT && ms->drmmode.glamor) in PreInit()
1148 if (xf86ReturnOptValBool(ms->drmmode.Options, OPTION_ATOMIC, FALSE)) { in PreInit()
1149 ret = drmSetClientCap(ms->fd, DRM_CLIENT_CAP_ATOMIC, 1); in PreInit()
1150 ms->atomic_modeset = (ret == 0); in PreInit()
1152 ms->atomic_modeset = FALSE; in PreInit()
1156 ms->atomic_modeset = 0; in PreInit()
1159 drmSetClientCap(ms->fd, DRM_CLIENT_CAP_ATOMIC, 2); in PreInit()
1161 drmSetClientCap(ms->fd, DRM_CLIENT_CAP_UNIVERSAL_PLANES, 1); in PreInit()
1163 ms->async_pageflip = FALSE; in PreInit()
1164 ret = drmGetCap(ms->fd, DRM_CAP_ASYNC_PAGE_FLIP, &value); in PreInit()
1165 if (ret == 0 && value == 1) in PreInit()
1166 ms->async_pageflip = TRUE; in PreInit()
1169 ms->async_pageflip = FALSE; in PreInit()
1171 ms->kms_has_modifiers = FALSE; in PreInit()
1172 ret = drmGetCap(ms->fd, DRM_CAP_ADDFB2_MODIFIERS, &value); in PreInit()
1174 ms->kms_has_modifiers = TRUE; in PreInit()
1176 if (drmmode_pre_init(pScrn, &ms->drmmode, pScrn->bitsPerPixel / 8) == FALSE) { in PreInit()
1207 if (ms->drmmode.shadow_enable) { in PreInit()
1223 modesettingPtr ms = modesettingPTR(pScrn); in msShadowWindow() local
1226 stride = (pScrn->displayWidth * ms->drmmode.kbpp) / 8; in msShadowWindow()
1229 return ((uint8_t *) ms->drmmode.front_bo.dumb->ptr + row * stride + offset); in msShadowWindow()
1236 msUpdateIntersect(modesettingPtr ms, shadowBufPtr pBuf, BoxPtr box, in msUpdateIntersect() argument
1239 int i, dirty = 0, stride = pBuf->pPixmap->devKind, cpp = ms->drmmode.cpp; in msUpdateIntersect()
1243 old = ms->drmmode.shadow_fb2; in msUpdateIntersect()
1245 new = ms->drmmode.shadow_fb; in msUpdateIntersect()
1248 for (i = box->y2 - box->y1 - 1; i >= 0; i--) { in msUpdateIntersect()
1252 dirty = 1; in msUpdateIntersect()
1271 modesettingPtr ms = modesettingPTR(pScrn); in msUpdatePacked() local
1272 Bool use_3224 = ms->drmmode.force_24_32 && pScrn->bitsPerPixel == 32; in msUpdatePacked()
1274 if (ms->drmmode.shadow_enable2 && ms->drmmode.shadow_fb2) do { in msUpdatePacked()
1282 tx2 = (extents->x2 + TILE - 1) / TILE; in msUpdatePacked()
1284 ty2 = (extents->y2 + TILE - 1) / TILE; in msUpdatePacked()
1291 for (j = ty2 - 1; j >= ty1; j--) { in msUpdatePacked()
1292 for (i = tx2 - 1; i >= tx1; i--) { in msUpdatePacked()
1297 box.x2 = min((i+1) * TILE, extents->x2); in msUpdatePacked()
1298 box.y2 = min((j+1) * TILE, extents->y2); in msUpdatePacked()
1301 if (msUpdateIntersect(ms, pBuf, &box, prect + nrects)) { in msUpdatePacked()
1314 if (ms->drmmode.exa) in msUpdatePacked()
1322 if (ms->drmmode.exa) in msUpdatePacked()
1331 modesettingPtr ms = modesettingPTR(scrn); in msEnableSharedPixmapFlipping() local
1332 EntityInfoPtr pEnt = ms->pEnt; in msEnableSharedPixmapFlipping()
1339 if (!ms->drmmode.pageflip) in msEnableSharedPixmapFlipping()
1343 if (ms->drmmode.reverse_prime_offload_mode) in msEnableSharedPixmapFlipping()
1364 return drmmode_EnableSharedPixmapFlipping(xf86Crtc, &ms->drmmode, in msEnableSharedPixmapFlipping()
1373 modesettingPtr ms = modesettingPTR(scrn); in msDisableSharedPixmapFlipping() local
1377 drmmode_DisableSharedPixmapFlipping(xf86Crtc, &ms->drmmode); in msDisableSharedPixmapFlipping()
1387 modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(pScreen)); in msStartFlippingPixmapTracking() local
1389 msPixmapPrivPtr ppriv1 = msGetPixmapPriv(&ms->drmmode, slave_dst1->master_pixmap), in msStartFlippingPixmapTracking()
1390 ppriv2 = msGetPixmapPriv(&ms->drmmode, slave_dst2->master_pixmap); in msStartFlippingPixmapTracking()
1419 modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(pScreen)); in msPresentSharedPixmap() local
1421 msPixmapPrivPtr ppriv = msGetPixmapPriv(&ms->drmmode, slave_dst->master_pixmap); in msPresentSharedPixmap()
1440 modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(pScreen)); in msStopFlippingPixmapTracking() local
1442 msPixmapPrivPtr ppriv1 = msGetPixmapPriv(&ms->drmmode, slave_dst1->master_pixmap), in msStopFlippingPixmapTracking()
1443 ppriv2 = msGetPixmapPriv(&ms->drmmode, slave_dst2->master_pixmap); in msStopFlippingPixmapTracking()
1468 modesettingPtr ms = modesettingPTR(pScrn); in CreateScreenResources() local
1474 pScreen->CreateScreenResources = ms->createScreenResources; in CreateScreenResources()
1478 if (!drmmode_set_desired_modes(pScrn, &ms->drmmode, pScrn->is_gpu, FALSE)) in CreateScreenResources()
1481 if (!drmmode_handle_new_screen_pixmap(&ms->drmmode)) in CreateScreenResources()
1484 drmmode_uevent_init(pScrn, &ms->drmmode); in CreateScreenResources()
1486 if (!ms->drmmode.sw_cursor) in CreateScreenResources()
1487 drmmode_map_cursor_bos(pScrn, &ms->drmmode); in CreateScreenResources()
1489 if (!ms->drmmode.gbm && !ms->drmmode.exa) { in CreateScreenResources()
1490 pixels = drmmode_map_front_bo(&ms->drmmode); in CreateScreenResources()
1494 drmmode_handle_new_screen_pixmap(&ms->drmmode); in CreateScreenResources()
1499 if (ms->drmmode.shadow_enable) in CreateScreenResources()
1500 pixels = ms->drmmode.shadow_fb; in CreateScreenResources()
1502 if (ms->drmmode.shadow_enable2) { in CreateScreenResources()
1503ms->drmmode.shadow_fb2 = calloc(1, pScrn->displayWidth * pScrn->virtualY * ((pScrn->bitsPerPixel +… in CreateScreenResources()
1504 if (!ms->drmmode.shadow_fb2) in CreateScreenResources()
1505 ms->drmmode.shadow_enable2 = FALSE; in CreateScreenResources()
1508 if (!pScreen->ModifyPixmapHeader(rootPixmap, -1, -1, -1, -1, -1, pixels)) in CreateScreenResources()
1511 if (ms->drmmode.shadow_enable) { in CreateScreenResources()
1517 err = drmModeDirtyFB(ms->fd, ms->drmmode.fb_id, NULL, 0); in CreateScreenResources()
1520 ms->damage = DamageCreate(NULL, NULL, DamageReportNone, TRUE, in CreateScreenResources()
1523 if (ms->damage) { in CreateScreenResources()
1524 DamageRegister(&rootPixmap->drawable, ms->damage); in CreateScreenResources()
1525 ms->dirty_enabled = TRUE; in CreateScreenResources()
1559 int ret = -1; in msSharePixmapBacking()
1564 if (ret == -1) in msSharePixmapBacking()
1576 modesettingPtr ms = modesettingPTR(scrn); in msSetSharedPixmapBacking() local
1580 if (ihandle == -1) in msSetSharedPixmapBacking()
1581 if (!ms->drmmode.reverse_prime_offload_mode) in msSetSharedPixmapBacking()
1582 return drmmode_SetSlaveBO(ppix, &ms->drmmode, ihandle, 0, 0); in msSetSharedPixmapBacking()
1584 if (ms->drmmode.reverse_prime_offload_mode) { in msSetSharedPixmapBacking()
1592 ret = drmmode_SetSlaveBO(ppix, &ms->drmmode, ihandle, ppix->devKind, size); in msSetSharedPixmapBacking()
1605 modesettingPtr ms = modesettingPTR(scrn); in msRequestSharedPixmapNotifyDamage() local
1607 msPixmapPrivPtr ppriv = msGetPixmapPriv(&ms->drmmode, ppix->master_pixmap); in msRequestSharedPixmapNotifyDamage()
1622 modesettingPtr ms = modesettingPTR(scrn); in msSharedPixmapNotifyDamage() local
1625 msPixmapPrivPtr ppriv = msGetPixmapPriv(&ms->drmmode, ppix); in msSharedPixmapNotifyDamage()
1641 ret |= drmmode_SharedPixmapPresentOnVBlank(ppix, crtc, &ms->drmmode); in msSharedPixmapNotifyDamage()
1650 modesettingPtr ms = modesettingPTR(pScrn); in SetMaster() local
1654 if (ms->pEnt->location.type == BUS_PLATFORM && in SetMaster()
1655 (ms->pEnt->location.id.plat->flags & XF86_PDEV_SERVER_FD)) in SetMaster()
1659 if (ms->fd_passed) in SetMaster()
1662 ret = drmSetMaster(ms->fd); in SetMaster()
1678 modesettingPtr ms = modesettingPTR(pScrn); in CreateWindow_oneshot() local
1681 pScreen->CreateWindow = ms->CreateWindow; in CreateWindow_oneshot()
1685 drmmode_copy_fb(pScrn, &ms->drmmode); in CreateWindow_oneshot()
1693 modesettingPtr ms = modesettingPTR(pScrn); in ScreenInit() local
1705 if (ms->drmmode.glamor) in ScreenInit()
1706 ms->drmmode.gbm = glamor_egl_get_gbm_device(pScreen); in ScreenInit()
1711 if (!drmmode_create_initial_bos(pScrn, &ms->drmmode)) in ScreenInit()
1714 if (ms->drmmode.shadow_enable) { in ScreenInit()
1715 ms->drmmode.shadow_fb = in ScreenInit()
1716 calloc(1, in ScreenInit()
1719 if (!ms->drmmode.shadow_fb) in ScreenInit()
1720 ms->drmmode.shadow_enable = FALSE; in ScreenInit()
1734 (pScreen, &ms->drmmode.pixmapPrivateKeyRec, PRIVATE_PIXMAP, in ScreenInit()
1765 if (drmmode_init(pScrn, &ms->drmmode) == FALSE) { in ScreenInit()
1771 if (ms->drmmode.shadow_enable && !msShadowInit(pScreen)) { in ScreenInit()
1776 ms->createScreenResources = pScreen->CreateScreenResources; in ScreenInit()
1781 str_value = xf86GetOptValString(ms->drmmode.Options, in ScreenInit()
1792 if (ms->drmmode.pageflip) { in ScreenInit()
1796 if (!dixRegisterScreenPrivateKey(&ms->drmmode.spritePrivateKeyRec, in ScreenInit()
1801 ms->SpriteFuncs = PointPriv->spriteFuncs; in ScreenInit()
1806 if (!ms->drmmode.sw_cursor) in ScreenInit()
1807 xf86_cursors_init(pScreen, ms->cursor_width, ms->cursor_height, in ScreenInit()
1816 if (serverGeneration == 1 && bgNoneRoot) { in ScreenInit()
1817 ms->CreateWindow = pScreen->CreateWindow; in ScreenInit()
1822 ms->CloseScreen = pScreen->CloseScreen; in ScreenInit()
1825 ms->BlockHandler = pScreen->BlockHandler; in ScreenInit()
1846 if (ms->atomic_modeset) in ScreenInit()
1852 if (ms->drmmode.glamor) { in ScreenInit()
1853 ms->adaptor = glamor_xv_init(pScreen, 16); in ScreenInit()
1854 if (ms->adaptor != NULL) { in ScreenInit()
1855 xf86XVScreenInit(pScreen, &ms->adaptor, 1); in ScreenInit()
1863 if (ms->drmmode.exa) { in ScreenInit()
1864 ms->adaptor = ms_exa_xv_init(pScreen, 16); in ScreenInit()
1865 if (ms->adaptor != NULL) { in ScreenInit()
1866 xf86XVScreenInit(pScreen, &ms->adaptor, 1); in ScreenInit()
1873 if (serverGeneration == 1) in ScreenInit()
1882 if (ms->drmmode.glamor || ms->drmmode.exa) { in ScreenInit()
1883 if (!(ms->drmmode.dri2_enable = ms_dri2_screen_init(pScreen))) { in ScreenInit()
1888 if (!(ms->drmmode.present_enable = ms_present_screen_init(pScreen))) { in ScreenInit()
1898 ms->drmmode.reverse_prime_offload_mode = TRUE; in ScreenInit()
1901 if ((version = drmGetVersion(ms->drmmode.fd))) { in ScreenInit()
1903 ms->drmmode.reverse_prime_offload_mode = FALSE; in ScreenInit()
1911 if (ms->drmmode.exa) { in ScreenInit()
1920 if (ms->drmmode.exa) { in ScreenInit()
1943 modesettingPtr ms = modesettingPTR(pScrn); in AdjustFrame() local
1945 drmmode_adjust_frame(pScrn, &ms->drmmode, x, y); in AdjustFrame()
1957 modesettingPtr ms = modesettingPTR(pScrn); in LeaveVT() local
1964 if (ms->pEnt->location.type == BUS_PLATFORM && in LeaveVT()
1965 (ms->pEnt->location.id.plat->flags & XF86_PDEV_SERVER_FD)) in LeaveVT()
1969 if (!ms->fd_passed) in LeaveVT()
1970 drmDropMaster(ms->fd); in LeaveVT()
1979 modesettingPtr ms = modesettingPTR(pScrn); in EnterVT() local
1985 drmmode_update_kms_state(&ms->drmmode); in EnterVT()
1991 if (!drmmode_set_desired_modes(pScrn, &ms->drmmode, TRUE, TRUE)) { in EnterVT()
2018 modesettingPtr ms = modesettingPTR(pScrn); in CloseScreen() local
2034 if (ms->drmmode.dri3_device_name) { in CloseScreen()
2035 free(ms->drmmode.dri3_device_name); in CloseScreen()
2036 ms->drmmode.dri3_device_name = NULL; in CloseScreen()
2040 if (ms->drmmode.dri2_enable) { in CloseScreen()
2046 if (ms->damage) { in CloseScreen()
2047 DamageUnregister(ms->damage); in CloseScreen()
2048 DamageDestroy(ms->damage); in CloseScreen()
2049 ms->damage = NULL; in CloseScreen()
2052 if (ms->drmmode.shadow_enable) { in CloseScreen()
2054 free(ms->drmmode.shadow_fb); in CloseScreen()
2055 ms->drmmode.shadow_fb = NULL; in CloseScreen()
2056 free(ms->drmmode.shadow_fb2); in CloseScreen()
2057 ms->drmmode.shadow_fb2 = NULL; in CloseScreen()
2060 drmmode_uevent_fini(pScrn, &ms->drmmode); in CloseScreen()
2062 drmmode_free_bos(pScrn, &ms->drmmode); in CloseScreen()
2064 if (ms->drmmode.pageflip) { in CloseScreen()
2069 PointPriv->spriteFuncs = ms->SpriteFuncs; in CloseScreen()
2072 if (ms->adaptor) { in CloseScreen()
2073 free(ms->adaptor); in CloseScreen()
2074 ms->adaptor = NULL; in CloseScreen()
2081 if (ms->drmmode.exa) { in CloseScreen()
2094 pScreen->CreateScreenResources = ms->createScreenResources; in CloseScreen()
2095 pScreen->BlockHandler = ms->BlockHandler; in CloseScreen()
2100 pScreen->CloseScreen = ms->CloseScreen; in CloseScreen()
2115 modesettingPtr ms = modesettingPTR(scrn); in ms_exchange_buffers() local
2118 if (ms->drmmode.glamor) in ms_exchange_buffers()
2122 if (ms->drmmode.exa) in ms_exchange_buffers()
2135 modesettingPtr ms = modesettingPTR(scrn); in ms_back_pixmap_from_fd() local
2138 if (ms->drmmode.glamor) in ms_back_pixmap_from_fd()
2144 if (ms->drmmode.exa) in ms_back_pixmap_from_fd()
2159 modesettingPtr ms = modesettingPTR(scrn); in ms_shareable_fd_from_pixmap() local
2162 if (ms->drmmode.glamor) in ms_shareable_fd_from_pixmap()
2166 if (ms->drmmode.exa) in ms_shareable_fd_from_pixmap()
2169 return -1; in ms_shareable_fd_from_pixmap()
2178 modesettingPtr ms = modesettingPTR(scrn); in ms_name_from_pixmap() local
2182 if (ms->drmmode.glamor) in ms_name_from_pixmap()
2186 if (!ms->drmmode.exa) in ms_name_from_pixmap()
2187 return -1; in ms_name_from_pixmap()
2191 return -1; in ms_name_from_pixmap()
2196 return dumb_bo_get_name(ms->drmmode.fd, bo); in ms_name_from_pixmap()