vmwgfx_cursor_bypass(ms->fd, 0, 0);
vmwgfx_disable_scanout(pScrn);
+ vmwgfx_saa_drop_master(pScrn->pScreen);
if (drmDropMaster(ms->fd))
xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
if (!drv_set_master(pScrn))
return FALSE;
+ vmwgfx_saa_set_master(pScrn->pScreen);
+
if (!xf86SetDesiredModes(pScrn))
return FALSE;
WSBMINITLISTHEAD(&vpix->sync_x_head);
WSBMINITLISTHEAD(&vpix->scanout_list);
+ WSBMINITLISTHEAD(&vpix->pixmap_list);
return TRUE;
}
*/
vmwgfx_pixmap_remove_present(vpix);
+ WSBMLISTDELINIT(&vpix->pixmap_list);
WSBMLISTDELINIT(&vpix->sync_x_head);
if (vpix->hw_is_dri2_fronts)
int bpp, int devkind, void *pixdata)
{
struct vmwgfx_saa_pixmap *vpix = vmwgfx_saa_pixmap(pixmap);
+ ScreenPtr pScreen = pixmap->drawable.pScreen;
+ struct vmwgfx_saa *vsaa = to_vmwgfx_saa(saa_get_driver(pScreen));
unsigned int old_height;
unsigned int old_width;
unsigned int old_pitch;
vmwgfx_pix_resize(pixmap, old_pitch, old_height, old_width);
vmwgfx_pixmap_free_storage(vpix);
+ WSBMLISTADDTAIL(&vpix->pixmap_list, &vsaa->pixmaps);
+
return TRUE;
out_no_modify:
Bool has_valid_hw;
if (!vsaa->xat || !SAA_PM_IS_SOLID(&dst_pixmap->drawable, plane_mask) ||
- alu != GXcopy)
+ alu != GXcopy || !vsaa->is_master)
return FALSE;
src_vpix = vmwgfx_saa_pixmap(src_pixmap);
RegionRec empty;
struct xa_composite *xa_comp;
+ if (!vsaa->is_master)
+ return FALSE;
+
REGION_NULL(pScreen, &empty);
/*
vsaa->use_present_opt = direct_presents;
vsaa->only_hw_presents = only_hw_presents;
vsaa->rendercheck = rendercheck;
+ vsaa->is_master = TRUE;
WSBMINITLISTHEAD(&vsaa->sync_x_list);
+ WSBMINITLISTHEAD(&vsaa->pixmaps);
vsaa->driver = vmwgfx_saa_driver;
vsaa->vcomp = vmwgfx_alloc_composite();
entry->pixmap = NULL;
pixmap->drawable.pScreen->DestroyPixmap(pixmap);
}
+
+void
+vmwgfx_saa_set_master(ScreenPtr pScreen)
+{
+ struct vmwgfx_saa *vsaa = to_vmwgfx_saa(saa_get_driver(pScreen));
+
+ vsaa->is_master = TRUE;
+}
+
+void
+vmwgfx_saa_drop_master(ScreenPtr pScreen)
+{
+ struct vmwgfx_saa *vsaa = to_vmwgfx_saa(saa_get_driver(pScreen));
+ struct _WsbmListHead *list;
+ struct vmwgfx_saa_pixmap *vpix;
+ struct saa_pixmap *spix;
+
+ WSBMLISTFOREACH(list, &vsaa->pixmaps) {
+ vpix = WSBMLISTENTRY(list, struct vmwgfx_saa_pixmap, pixmap_list);
+ spix = &vpix->base;
+
+ if (!vpix->hw)
+ continue;
+
+ (void) vmwgfx_download_from_hw(&vsaa->driver, spix->pixmap,
+ &spix->dirty_hw);
+ REGION_EMPTY(draw->pScreen, &spix->dirty_hw);
+ }
+
+ vsaa->is_master = FALSE;
+}
int hw_is_dri2_fronts;
struct _WsbmListHead sync_x_head;
struct _WsbmListHead scanout_list;
+ struct _WsbmListHead pixmap_list;
uint32_t xa_flags;
uint32_t staging_add_flags;
vmwgfx_hw_accel_validate(PixmapPtr pixmap, unsigned int depth,
uint32_t add_flags, uint32_t remove_flags,
RegionPtr region);
+
+void
+vmwgfx_saa_set_master(ScreenPtr pScreen);
+
+void
+vmwgfx_saa_drop_master(ScreenPtr pScreen);
+
#endif