diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/compat-api.h | 6 | ||||
-rw-r--r-- | src/sna/sna_accel.c | 6 | ||||
-rw-r--r-- | src/uxa/intel_driver.c | 10 |
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(®ion, dx, dy); - DamageRegionAppend(&dirty->slave_dst->drawable, ®ion); + DamageRegionAppend(&PixmapDirtyDst(dirty)->drawable, ®ion); 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(®ion); 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; } |