diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-06-07 16:32:40 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-06-07 16:36:40 +0100 |
commit | b584162e387187a7cdb7f46a3a151e00e7d3de58 (patch) | |
tree | a5f0229793fe7641ac32d16c7c81a9e188c9f594 /src/sna/sna_accel.c | |
parent | 7151e437df4437df35a67ae125607e665c66353c (diff) |
sna: Set the needs_flush flag on the bo when the scanout is dirty
Since the call to the busy_ioctl is predicated on whether the bo needs
to be flushed by us, therefore when forcing the call to the busy_ioctl
to flush the GTT we need to mark it as requiring needs_flush.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_accel.c')
-rw-r--r-- | src/sna/sna_accel.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 1b16bc56..bf5832b3 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -14199,8 +14199,10 @@ static bool start_flush(struct sna *sna, struct sna_pixmap *scanout) if (!scanout) return false; - if (sna->flags & SNA_FLUSH_GTT && scanout->gtt_dirty) + if (sna->flags & SNA_FLUSH_GTT && scanout->gtt_dirty) { + scanout->gpu_bo->needs_flush = true; return true; + } return scanout->cpu_damage || scanout->gpu_bo->exec; } @@ -14223,8 +14225,10 @@ static bool stop_flush(struct sna *sna, struct sna_pixmap *scanout) if (!scanout) return false; - if (sna->flags & SNA_FLUSH_GTT && scanout->gtt_dirty) + if (sna->flags & SNA_FLUSH_GTT && scanout->gtt_dirty) { + scanout->gpu_bo->needs_flush = true; return true; + } return scanout->cpu_damage || scanout->gpu_bo->needs_flush; } |