Fix libdrm warning about unmap the unmapped buffer, as when batch terminate we will try to do unmap again, but batch has already been unmapped.
Signed-off-by: Zhenyu Wang <[email protected]> --- src/intel/intel_batchbuffer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/intel/intel_batchbuffer.c b/src/intel/intel_batchbuffer.c index d3da3cc..ba6b05f 100644 --- a/src/intel/intel_batchbuffer.c +++ b/src/intel/intel_batchbuffer.c @@ -118,8 +118,9 @@ intel_batchbuffer_flush(intel_batchbuffer_t *batch) *(uint32_t*)batch->ptr = MI_BATCH_BUFFER_END; batch->ptr += 4; - dri_bo_unmap(batch->buffer); used = batch->ptr - batch->map; + dri_bo_unmap(batch->buffer); + batch->ptr = batch->map = NULL; if (!is_locked) intel_driver_lock_hardware(batch->intel); -- 2.1.1 _______________________________________________ Beignet mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/beignet
