From 70dcdb31303d8e5e3a4fc3bd3f8abf8c74ef02d9 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Mon, 22 Apr 2024 13:42:12 +0200 Subject: [PATCH] panfrost: assert that drmSyncobjWait returns 0 This is really just a small band-aid, and instead we should start reporting errors from this function. But for now, let's just assert that no error occurrecd, as that's slightly better than ignoring it. CID: 1592892 Reviewed-by: Boris Brezillon Part-of: --- src/gallium/drivers/panfrost/pan_csf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/panfrost/pan_csf.c b/src/gallium/drivers/panfrost/pan_csf.c index 6333b0ed60c..58d4e01d22e 100644 --- a/src/gallium/drivers/panfrost/pan_csf.c +++ b/src/gallium/drivers/panfrost/pan_csf.c @@ -1040,8 +1040,10 @@ GENX(csf_init_context)(struct panfrost_context *ctx) assert(!ret); /* Wait before freeing the buffer. */ - drmSyncobjWait(panfrost_device_fd(dev), &ctx->syncobj, 1, INT64_MAX, 0, - NULL); + ret = drmSyncobjWait(panfrost_device_fd(dev), &ctx->syncobj, 1, INT64_MAX, + 0, NULL); + assert(!ret); + panfrost_bo_unreference(cs_bo); }