From b822bc8c2c0b47dfc391c86c3e5764f718898dce Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 29 Aug 2014 10:14:35 +0100 Subject: sna/gen8: Check instead of asserting for a hang whilst setting up video state Signed-off-by: Chris Wilson --- src/sna/gen8_render.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/sna/gen8_render.c b/src/sna/gen8_render.c index 826675ce..22df53db 100644 --- a/src/sna/gen8_render.c +++ b/src/sna/gen8_render.c @@ -193,10 +193,6 @@ static const struct blendinfo { #define FILL_FLAGS(op, format) GEN8_SET_FLAGS(FILL_SAMPLER, gen8_get_blend((op), false, (format)), GEN8_WM_KERNEL_NOMASK, FILL_VERTEX) #define FILL_FLAGS_NOBLEND GEN8_SET_FLAGS(FILL_SAMPLER, NO_BLEND, GEN8_WM_KERNEL_NOMASK, FILL_VERTEX) -#define VIDEO_SAMPLER \ - SAMPLER_OFFSET(SAMPLER_FILTER_BILINEAR, SAMPLER_EXTEND_PAD, \ - SAMPLER_FILTER_NEAREST, SAMPLER_EXTEND_NONE) - #define GEN8_SAMPLER(f) (((f) >> 20) & 0xfff) #define GEN8_BLEND(f) (((f) >> 4) & 0x7ff) #define GEN8_READS_DST(f) (((f) >> 15) & 1) @@ -3759,7 +3755,9 @@ gen8_render_video(struct sna *sna, kgem_set_mode(&sna->kgem, KGEM_RENDER, tmp.dst.bo); if (!kgem_check_bo(&sna->kgem, tmp.dst.bo, frame->bo, NULL)) { kgem_submit(&sna->kgem); - assert(kgem_check_bo(&sna->kgem, tmp.dst.bo, frame->bo, NULL)); + if (!kgem_check_bo(&sna->kgem, tmp.dst.bo, frame->bo, NULL)) + return false; + _kgem_set_mode(&sna->kgem, KGEM_RENDER); } -- cgit v1.2.3