From 8e10a5b348a37feadcf935ec7694e46cc0802bdf Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sun, 26 Aug 2012 14:53:12 +0100 Subject: [PATCH] sna/gen6+: Do not call sna_blt_composite() after prepping the composite op As sna_blt_composite() will overwrite parts of the composite op as it checks whether or not it can execute that operation, it will lead to a crash as the normal render path finds the op corrupt. (The BLT conversion functions cater for the cases where we may wish to switch pipelines after choosing src/dst bo.) Reported-by: rei4dan@gmail.com Signed-off-by: Chris Wilson --- src/sna/gen6_render.c | 9 --------- src/sna/gen7_render.c | 10 ---------- 2 files changed, 19 deletions(-) diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c index 390da52a..c364f724 100644 --- a/src/sna/gen6_render.c +++ b/src/sna/gen6_render.c @@ -2685,15 +2685,6 @@ gen6_render_composite(struct sna *sna, 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, false)) - return true; - sna_render_reduce_damage(tmp, dst_x, dst_y, width, height); if (too_large(tmp->dst.width, tmp->dst.height)) { diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c index f14d7775..b8897d38 100644 --- a/src/sna/gen7_render.c +++ b/src/sna/gen7_render.c @@ -2788,16 +2788,6 @@ gen7_render_composite(struct sna *sna, if (!gen7_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, false)) - return true; - sna_render_reduce_damage(tmp, dst_x, dst_y, width, height); if (too_large(tmp->dst.width, tmp->dst.height)) {