diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2018-10-24 15:59:35 +0100 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2018-10-24 15:59:35 +0100 |
commit | 8076029c5ca81dee348126cd7fe199b248b7809b (patch) | |
tree | 13c0f76a8100980c37397d29d4725cecc6d3ab83 /hw/xfree86/drivers/modesetting/driver.c | |
parent | 7d416f031b61d6d6be376ba45018b135505980a7 (diff) | |
parent | 2a0c6c15c35cd262e7cdb86dcc43cb1aeb714c8e (diff) |
Merge tag 'xorg-server-1.20.2' into cygwin-release-1.20xserver-cygwin-1.20.2-1
xorg-server-1.20.2
Diffstat (limited to 'hw/xfree86/drivers/modesetting/driver.c')
-rw-r--r-- | hw/xfree86/drivers/modesetting/driver.c | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c index 9362370c3..8d29b130f 100644 --- a/hw/xfree86/drivers/modesetting/driver.c +++ b/hw/xfree86/drivers/modesetting/driver.c @@ -640,19 +640,21 @@ ms_dirty_update(ScreenPtr screen, int *timeout) xorg_list_for_each_entry(ent, &screen->pixmap_dirty_list, ent) { region = DamageRegion(ent->damage); if (RegionNotEmpty(region)) { - msPixmapPrivPtr ppriv = - msGetPixmapPriv(&ms->drmmode, ent->slave_dst); + if (!screen->isGPU) { + msPixmapPrivPtr ppriv = + msGetPixmapPriv(&ms->drmmode, ent->slave_dst->master_pixmap); - if (ppriv->notify_on_damage) { - ppriv->notify_on_damage = FALSE; + if (ppriv->notify_on_damage) { + ppriv->notify_on_damage = FALSE; - ent->slave_dst->drawable.pScreen-> - SharedPixmapNotifyDamage(ent->slave_dst); - } + ent->slave_dst->drawable.pScreen-> + SharedPixmapNotifyDamage(ent->slave_dst); + } - /* Requested manual updating */ - if (ppriv->defer_dirty_update) - continue; + /* Requested manual updating */ + if (ppriv->defer_dirty_update) + continue; + } redisplay_dirty(screen, ent, timeout); DamageEmpty(ent->damage); @@ -898,8 +900,6 @@ PreInit(ScrnInfoPtr pScrn, int flags) if (pScrn->numEntities != 1) return FALSE; - pEnt = xf86GetEntityInfo(pScrn->entityList[0]); - if (flags & PROBE_DETECT) { return FALSE; } @@ -908,6 +908,8 @@ PreInit(ScrnInfoPtr pScrn, int flags) if (!GetRec(pScrn)) return FALSE; + pEnt = xf86GetEntityInfo(pScrn->entityList[0]); + ms = modesettingPTR(pScrn); ms->SaveGeneration = -1; ms->pEnt = pEnt; @@ -1251,8 +1253,8 @@ msStartFlippingPixmapTracking(RRCrtcPtr crtc, DrawablePtr src, ScreenPtr pScreen = src->pScreen; modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(pScreen)); - msPixmapPrivPtr ppriv1 = msGetPixmapPriv(&ms->drmmode, slave_dst1), - ppriv2 = msGetPixmapPriv(&ms->drmmode, slave_dst2); + msPixmapPrivPtr ppriv1 = msGetPixmapPriv(&ms->drmmode, slave_dst1->master_pixmap), + ppriv2 = msGetPixmapPriv(&ms->drmmode, slave_dst2->master_pixmap); if (!PixmapStartDirtyTracking(src, slave_dst1, x, y, dst_x, dst_y, rotation)) { @@ -1280,10 +1282,10 @@ msStartFlippingPixmapTracking(RRCrtcPtr crtc, DrawablePtr src, static Bool msPresentSharedPixmap(PixmapPtr slave_dst) { - ScreenPtr pScreen = slave_dst->drawable.pScreen; + ScreenPtr pScreen = slave_dst->master_pixmap->drawable.pScreen; modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(pScreen)); - msPixmapPrivPtr ppriv = msGetPixmapPriv(&ms->drmmode, slave_dst); + msPixmapPrivPtr ppriv = msGetPixmapPriv(&ms->drmmode, slave_dst->master_pixmap); RegionPtr region = DamageRegion(ppriv->dirty->damage); @@ -1304,8 +1306,8 @@ msStopFlippingPixmapTracking(DrawablePtr src, ScreenPtr pScreen = src->pScreen; modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(pScreen)); - msPixmapPrivPtr ppriv1 = msGetPixmapPriv(&ms->drmmode, slave_dst1), - ppriv2 = msGetPixmapPriv(&ms->drmmode, slave_dst2); + msPixmapPrivPtr ppriv1 = msGetPixmapPriv(&ms->drmmode, slave_dst1->master_pixmap), + ppriv2 = msGetPixmapPriv(&ms->drmmode, slave_dst2->master_pixmap); Bool ret = TRUE; @@ -1471,7 +1473,7 @@ msRequestSharedPixmapNotifyDamage(PixmapPtr ppix) ScrnInfoPtr scrn = xf86ScreenToScrn(screen); modesettingPtr ms = modesettingPTR(scrn); - msPixmapPrivPtr ppriv = msGetPixmapPriv(&ms->drmmode, ppix); + msPixmapPrivPtr ppriv = msGetPixmapPriv(&ms->drmmode, ppix->master_pixmap); ppriv->notify_on_damage = TRUE; |