diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-02-04 17:51:51 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-02-04 18:03:06 +0000 |
commit | 0906769c1b92520351729c4d8f2ab684d3ddf2eb (patch) | |
tree | dd7f79559366a35aa74fb2c1c128251eb25d558e /src/sna | |
parent | fc001615ff78df4dab6ee0d5dd966b723326c358 (diff) |
sna: Rearrange assertion to ease use of substitute cached bo
Since we call kgem_bo_submit() along one path when synchronising a
cached bo (which is known to be inactive) but still want to keep the
assertion on the refcnt, simply rearrange the code to only assert on the
active path.
References: https://bugs.freedesktop.org/show_bug.cgi?id=73406
Reported-by: Matti Hamalainen <ccr@tnsp.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna')
-rw-r--r-- | src/sna/kgem.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sna/kgem.h b/src/sna/kgem.h index 4c4996ff..fdabd504 100644 --- a/src/sna/kgem.h +++ b/src/sna/kgem.h @@ -343,9 +343,11 @@ static inline void kgem_submit(struct kgem *kgem) static inline void kgem_bo_submit(struct kgem *kgem, struct kgem_bo *bo) { + if (bo->exec == NULL) + return; + assert(bo->refcnt); - if (bo->exec) - _kgem_submit(kgem); + _kgem_submit(kgem); } void kgem_scanout_flush(struct kgem *kgem, struct kgem_bo *bo); |