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>
This commit is contained in:
parent
7151e437df
commit
b584162e38
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue