sna: Only operate inplace if no existing CPU damage for a read
With a large object, we try harder to operate inplace (to avoid creating a second large CPU bo). This introduced an issue where we tried to read from the GPU bo when there was already existing damage in the CPU - triggering an assertion. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
7f901495cd
commit
f2f9019bae
|
|
@ -1848,6 +1848,11 @@ static inline bool operate_inplace(struct sna_pixmap *priv, unsigned flags)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (priv->cpu_damage && flags & MOVE_READ) {
|
||||
DBG(("%s: no, has CPU damage and requires readback\n", __FUNCTION__));
|
||||
return false;
|
||||
}
|
||||
|
||||
if (priv->cpu_bo && kgem_bo_is_busy(priv->cpu_bo)) {
|
||||
DBG(("%s: yes, CPU is busy\n", __FUNCTION__));
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue