diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2015-04-02 08:55:19 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2015-04-02 08:55:19 +0100 |
commit | f63f739fecf925d3765006a46b8b021d0008a041 (patch) | |
tree | 35c1e2065adec96a86ccdd069129981b60b4bcb0 | |
parent | e47eb0c5e588a6cfc4e6f12824814f11e802ed51 (diff) |
sna: Do not call an extra busy ioctl for scanout flushs
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_accel.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index a11a77d5..2626988f 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -3271,7 +3271,9 @@ __sna_pixmap_for_gpu(struct sna *sna, PixmapPtr pixmap, unsigned flags) return priv; } -inline static void sna_pixmap_unclean(struct sna *sna, struct sna_pixmap *priv) +inline static void sna_pixmap_unclean(struct sna *sna, + struct sna_pixmap *priv, + unsigned flags) { struct drm_i915_gem_busy busy; @@ -3283,6 +3285,9 @@ inline static void sna_pixmap_unclean(struct sna *sna, struct sna_pixmap *priv) sna_damage_destroy(&priv->cpu_damage); list_del(&priv->flush_list); + if (flags & (__MOVE_DRI | __MOVE_SCANOUT)) + return; + if (!priv->flush || priv->gpu_bo->exec) return; @@ -3382,7 +3387,7 @@ sna_pixmap_move_area_to_gpu(PixmapPtr pixmap, const BoxRec *box, unsigned int fl pixmap->drawable.width, pixmap->drawable.height)) { DBG(("%s: already all-damaged\n", __FUNCTION__)); - sna_pixmap_unclean(sna, priv); + sna_pixmap_unclean(sna, priv, flags); goto done; } @@ -4200,7 +4205,7 @@ sna_pixmap_move_to_gpu(PixmapPtr pixmap, unsigned flags) pixmap->drawable.width, pixmap->drawable.height)) { DBG(("%s: already all-damaged\n", __FUNCTION__)); - sna_pixmap_unclean(sna, priv); + sna_pixmap_unclean(sna, priv, flags); goto active; } |