sna: Prevent accessing an uninitialised region in move_area_to_gpu()
If we skip the migration, we need to avoid using the unitialiased region. There is no bad consequence as both branches of the if are no-ops, but it does silence the static checkers and should make the predicate cheaper. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
b4871f1dac
commit
8eaafdb439
|
|
@ -2651,7 +2651,8 @@ done:
|
|||
if (flags & MOVE_WRITE) {
|
||||
priv->clear = false;
|
||||
priv->cpu = false;
|
||||
if (priv->cpu_damage == NULL &&
|
||||
if (!DAMAGE_IS_ALL(priv->gpu_damage) &&
|
||||
priv->cpu_damage == NULL &&
|
||||
box_inplace(pixmap, &r.extents)) {
|
||||
DBG(("%s: large operation on undamaged, promoting to full GPU\n",
|
||||
__FUNCTION__));
|
||||
|
|
|
|||
Loading…
Reference in New Issue