sna/gen2+: If we use the BLT to prepare the target, try using BLT for op
If we incurred a context switch to the BLT in order to prepare the target (uploading damage for instance), we should recheck whether we can continue the operation on the BLT rather than force a switch back to RENDER. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
507debe801
commit
dcfcf438a5
|
|
@ -1427,6 +1427,15 @@ gen2_render_composite(struct sna *sna,
|
|||
__FUNCTION__));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (mask == NULL && sna->kgem.mode == KGEM_BLT &&
|
||||
sna_blt_composite(sna, op,
|
||||
src, dst,
|
||||
src_x, src_y,
|
||||
dst_x, dst_y,
|
||||
width, height, tmp))
|
||||
return TRUE;
|
||||
|
||||
sna_render_reduce_damage(tmp, dst_x, dst_y, width, height);
|
||||
|
||||
tmp->op = op;
|
||||
|
|
|
|||
|
|
@ -2417,6 +2417,15 @@ gen3_render_composite(struct sna *sna,
|
|||
__FUNCTION__));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (mask == NULL && sna->kgem.mode == KGEM_BLT &&
|
||||
sna_blt_composite(sna, op,
|
||||
src, dst,
|
||||
src_x, src_y,
|
||||
dst_x, dst_y,
|
||||
width, height, tmp))
|
||||
return TRUE;
|
||||
|
||||
sna_render_reduce_damage(tmp, dst_x, dst_y, width, height);
|
||||
|
||||
tmp->op = op;
|
||||
|
|
|
|||
|
|
@ -2077,6 +2077,15 @@ gen5_render_composite(struct sna *sna,
|
|||
DBG(("%s: failed to set composite target\n", __FUNCTION__));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (mask == NULL && sna->kgem.mode == KGEM_BLT &&
|
||||
sna_blt_composite(sna, op,
|
||||
src, dst,
|
||||
src_x, src_y,
|
||||
dst_x, dst_y,
|
||||
width, height, tmp))
|
||||
return TRUE;
|
||||
|
||||
sna_render_reduce_damage(tmp, dst_x, dst_y, width, height);
|
||||
|
||||
if (tmp->dst.width > 8192 || tmp->dst.height > 8192) {
|
||||
|
|
|
|||
|
|
@ -2265,6 +2265,15 @@ gen6_render_composite(struct sna *sna,
|
|||
tmp->op = op;
|
||||
if (!gen6_composite_set_target(sna, tmp, dst))
|
||||
return FALSE;
|
||||
|
||||
if (mask == NULL && sna->kgem.mode == KGEM_BLT &&
|
||||
sna_blt_composite(sna, op,
|
||||
src, dst,
|
||||
src_x, src_y,
|
||||
dst_x, dst_y,
|
||||
width, height, tmp))
|
||||
return TRUE;
|
||||
|
||||
sna_render_reduce_damage(tmp, dst_x, dst_y, width, height);
|
||||
|
||||
if (too_large(tmp->dst.width, tmp->dst.height)) {
|
||||
|
|
|
|||
|
|
@ -2378,6 +2378,15 @@ gen7_render_composite(struct sna *sna,
|
|||
tmp->op = op;
|
||||
if (!gen7_composite_set_target(tmp, dst))
|
||||
return FALSE;
|
||||
|
||||
if (mask == NULL && sna->kgem.mode == KGEM_BLT &&
|
||||
sna_blt_composite(sna, op,
|
||||
src, dst,
|
||||
src_x, src_y,
|
||||
dst_x, dst_y,
|
||||
width, height, tmp))
|
||||
return TRUE;
|
||||
|
||||
sna_render_reduce_damage(tmp, dst_x, dst_y, width, height);
|
||||
|
||||
if (too_large(tmp->dst.width, tmp->dst.height)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue