Lines Matching refs:drmmode
545 if (ms->drmmode.glamor) in dispatch_dirty_region()
588 int fb_id = ms->drmmode.fb_id; in dispatch_dirty()
607 msPixmapPrivPtr ppriv = msGetPixmapPriv(&ms->drmmode, ppix); in dispatch_dirty_pixmap()
653 if (ms->drmmode.glamor) in redisplay_dirty()
681 msGetPixmapPriv(&ms->drmmode, ent->slave_dst->master_pixmap); in ms_dirty_update()
741 if (pScreen->isGPU && !ms->drmmode.reverse_prime_offload_mode) in msBlockHandler()
755 drmmode_set_desired_modes(pScrn, &ms->drmmode, TRUE, FALSE); in msBlockHandler()
773 drmmode_set_desired_modes(pScrn, &ms->drmmode, TRUE, FALSE); in msBlockHandler_oneshot()
808 free(ms->drmmode.Options); in FreeRec()
821 if (ms->drmmode.exa) in try_enable_exa()
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()
852 ms->drmmode.glamor = TRUE; in try_enable_glamor()
876 if (!ms->drmmode.shadow_enable) in msShouldDoubleShadow()
886 asked = xf86GetOptValBool(ms->drmmode.Options, OPTION_DOUBLE_SHADOW, &ret); in msShouldDoubleShadow()
999 ms->drmmode.is_secondary = FALSE; in PreInit()
1004 ms->drmmode.is_secondary = TRUE; in PreInit()
1015 ms->drmmode.fd = ms->fd; 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()
1064 if (xf86ReturnOptValBool(ms->drmmode.Options, OPTION_SW_CURSOR, FALSE)) { in PreInit()
1065 ms->drmmode.sw_cursor = TRUE; 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()
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()
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()
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()
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()
1176 if (drmmode_pre_init(pScrn, &ms->drmmode, pScrn->bitsPerPixel / 8) == FALSE) { in PreInit()
1207 if (ms->drmmode.shadow_enable) { in PreInit()
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()
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()
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()
1314 if (ms->drmmode.exa) in msUpdatePacked()
1322 if (ms->drmmode.exa) in msUpdatePacked()
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()
1377 drmmode_DisableSharedPixmapFlipping(xf86Crtc, &ms->drmmode); in msDisableSharedPixmapFlipping()
1389 msPixmapPrivPtr ppriv1 = msGetPixmapPriv(&ms->drmmode, slave_dst1->master_pixmap), in msStartFlippingPixmapTracking()
1390 ppriv2 = msGetPixmapPriv(&ms->drmmode, slave_dst2->master_pixmap); in msStartFlippingPixmapTracking()
1421 msPixmapPrivPtr ppriv = msGetPixmapPriv(&ms->drmmode, slave_dst->master_pixmap); in msPresentSharedPixmap()
1442 msPixmapPrivPtr ppriv1 = msGetPixmapPriv(&ms->drmmode, slave_dst1->master_pixmap), in msStopFlippingPixmapTracking()
1443 ppriv2 = msGetPixmapPriv(&ms->drmmode, slave_dst2->master_pixmap); in msStopFlippingPixmapTracking()
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()
1503 …ms->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()
1511 if (ms->drmmode.shadow_enable) { in CreateScreenResources()
1517 err = drmModeDirtyFB(ms->fd, ms->drmmode.fb_id, NULL, 0); in CreateScreenResources()
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()
1607 msPixmapPrivPtr ppriv = msGetPixmapPriv(&ms->drmmode, ppix->master_pixmap); in msRequestSharedPixmapNotifyDamage()
1625 msPixmapPrivPtr ppriv = msGetPixmapPriv(&ms->drmmode, ppix); in msSharedPixmapNotifyDamage()
1641 ret |= drmmode_SharedPixmapPresentOnVBlank(ppix, crtc, &ms->drmmode); in msSharedPixmapNotifyDamage()
1685 drmmode_copy_fb(pScrn, &ms->drmmode); in CreateWindow_oneshot()
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()
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()
1781 str_value = xf86GetOptValString(ms->drmmode.Options, in ScreenInit()
1792 if (ms->drmmode.pageflip) { in ScreenInit()
1796 if (!dixRegisterScreenPrivateKey(&ms->drmmode.spritePrivateKeyRec, in ScreenInit()
1806 if (!ms->drmmode.sw_cursor) in ScreenInit()
1852 if (ms->drmmode.glamor) { in ScreenInit()
1863 if (ms->drmmode.exa) { 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()
1945 drmmode_adjust_frame(pScrn, &ms->drmmode, x, y); in AdjustFrame()
1985 drmmode_update_kms_state(&ms->drmmode); in EnterVT()
1991 if (!drmmode_set_desired_modes(pScrn, &ms->drmmode, TRUE, TRUE)) { in EnterVT()
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()
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()
2081 if (ms->drmmode.exa) { in CloseScreen()
2118 if (ms->drmmode.glamor) in ms_exchange_buffers()
2122 if (ms->drmmode.exa) in ms_exchange_buffers()
2138 if (ms->drmmode.glamor) in ms_back_pixmap_from_fd()
2144 if (ms->drmmode.exa) in ms_back_pixmap_from_fd()
2162 if (ms->drmmode.glamor) in ms_shareable_fd_from_pixmap()
2166 if (ms->drmmode.exa) in ms_shareable_fd_from_pixmap()
2182 if (ms->drmmode.glamor) in ms_name_from_pixmap()
2186 if (!ms->drmmode.exa) in ms_name_from_pixmap()
2196 return dumb_bo_get_name(ms->drmmode.fd, bo); in ms_name_from_pixmap()