Commit 4e8ae05f authored by Chris Wilson's avatar Chris Wilson 🤔

Track ABI changes for ABI_VIDEODRV_VERSION 25.2

Several structs had fields renamed, and so we must update our usage.
Signed-off-by: Chris Wilson's avatarChris Wilson <chris@chris-wilson.co.uk>
parent 67f15b36
......@@ -260,4 +260,10 @@ static inline void FreePixmap(PixmapPtr pixmap)
#define RemoveNotifyFd(fd) RemoveGeneralSocket(fd)
#endif
#if ABI_VIDEODRV_VERSION >= SET_ABI_VERSION(25, 2)
#define PixmapDirtyDst(d) ((d)->secondary_dst)
#else
#define PixmapDirtyDst(d) ((d)->slave_dst)
#endif
#endif
......@@ -17696,7 +17696,7 @@ static void sna_accel_post_damage(struct sna *sna)
#else
src = dirty->src;
#endif
dst = dirty->slave_dst->master_pixmap;
dst = PixmapDirtyDst(dirty)->master_pixmap;
region.extents.x1 = dirty->x;
region.extents.x2 = dirty->x + dst->drawable.width;
......@@ -17723,7 +17723,7 @@ static void sna_accel_post_damage(struct sna *sna)
dy += dirty->dst_y;
#endif
RegionTranslate(&region, dx, dy);
DamageRegionAppend(&dirty->slave_dst->drawable, &region);
DamageRegionAppend(&PixmapDirtyDst(dirty)->drawable, &region);
DBG(("%s: slave: ((%d, %d), (%d, %d))x%d\n", __FUNCTION__,
region.extents.x1, region.extents.y1,
......@@ -17800,7 +17800,7 @@ fallback:
kgem_bo_sync__gtt(&sna->kgem, __sna_pixmap_get_bo(dst));
}
DamageRegionProcessPending(&dirty->slave_dst->drawable);
DamageRegionProcessPending(&PixmapDirtyDst(dirty)->drawable);
skip:
RegionUninit(&region);
DamageEmpty(dirty->damage);
......
......@@ -624,30 +624,30 @@ redisplay_dirty(ScreenPtr screen, PixmapDirtyUpdatePtr dirty)
RegionRec pixregion;
int was_blocked;
PixmapRegionInit(&pixregion, dirty->slave_dst->master_pixmap);
PixmapRegionInit(&pixregion, PixmapDirtyDst(dirty)->master_pixmap);
RegionTranslate(&pixregion, dirty->x, dirty->y);
RegionIntersect(&pixregion, &pixregion, DamageRegion(dirty->damage));
RegionTranslate(&pixregion, -dirty->x, -dirty->y);
was_blocked = RegionNil(&pixregion);
DamageRegionAppend(&dirty->slave_dst->drawable, &pixregion);
DamageRegionAppend(&PixmapDirtyDst(dirty)->drawable, &pixregion);
RegionUninit(&pixregion);
if (was_blocked)
return;
PixmapRegionInit(&pixregion, dirty->slave_dst->master_pixmap);
PixmapRegionInit(&pixregion, PixmapDirtyDst(dirty)->master_pixmap);
PixmapSyncDirtyHelper(dirty, &pixregion);
RegionUninit(&pixregion);
intel_flush(intel);
if (!intel->has_prime_vmap_flush) {
drm_intel_bo *bo = intel_uxa_get_pixmap_bo(dirty->slave_dst->master_pixmap);
drm_intel_bo *bo = intel_uxa_get_pixmap_bo(PixmapDirtyDst(dirty)->master_pixmap);
was_blocked = xf86BlockSIGIO();
drm_intel_bo_map(bo, FALSE);
drm_intel_bo_unmap(bo);
xf86UnblockSIGIO(was_blocked);
}
DamageRegionProcessPending(&dirty->slave_dst->drawable);
DamageRegionProcessPending(&PixmapDirtyDst(dirty)->drawable);
return;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment