panfrost: check return-code of drmSyncobjWait

Realistically, this isn't going to fail. But let's return an error here
in case it does, just for good measure.

CID: 1558596
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28856>
This commit is contained in:
Erik Faye-Lund
2024-04-22 13:47:58 +02:00
committed by Marge Bot
parent 70dcdb3130
commit f852f86a31
+4 -1
View File
@@ -169,7 +169,10 @@ jm_submit_jc(struct panfrost_batch *batch, mali_ptr first_job_desc,
/* Trace the job if we're doing that */
if (dev->debug & (PAN_DBG_TRACE | PAN_DBG_SYNC)) {
/* Wait so we can get errors reported back */
drmSyncobjWait(panfrost_device_fd(dev), &out_sync, 1, INT64_MAX, 0, NULL);
ret = drmSyncobjWait(panfrost_device_fd(dev), &out_sync, 1, INT64_MAX,
0, NULL);
if (ret)
return errno;
if (dev->debug & PAN_DBG_TRACE)
pandecode_jc(dev->decode_ctx, submit.jc, panfrost_device_gpu_id(dev));