summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2020-11-16 15:09:14 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2020-11-16 15:11:19 +0000
commit4e8ae05f20e43c56ee7b15bbc66a472d4361a777 (patch)
tree048f18f501eb41e0345b1bab626ef1a1eb94ab9f
parent67f15b36faf8c4aa902d953067df0faf43387208 (diff)
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 <chris@chris-wilson.co.uk>
-rw-r--r--src/compat-api.h6
-rw-r--r--src/sna/sna_accel.c6
-rw-r--r--src/uxa/intel_driver.c10
3 files changed, 14 insertions, 8 deletions
diff --git a/src/compat-api.h b/src/compat-api.h
index 05797a08..336698d3 100644
--- a/src/compat-api.h
+++ b/src/compat-api.h
@@ -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
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 4c067ae8..6d2fb352 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -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);
diff --git a/src/uxa/intel_driver.c b/src/uxa/intel_driver.c
index 77c0dc00..ffd35db4 100644
--- a/src/uxa/intel_driver.c
+++ b/src/uxa/intel_driver.c
@@ -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;
}