From 1de656bce3ddd4faac00a1976a720fa2dcb351e7 Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Wed, 15 Jun 2022 01:44:42 +0200 Subject: [PATCH] nouveau/ws: assert on broken channel no point in continuing Part-of: --- src/nouveau/winsys/nouveau_push.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/nouveau/winsys/nouveau_push.c b/src/nouveau/winsys/nouveau_push.c index 547f908..851eadf 100644 --- a/src/nouveau/winsys/nouveau_push.c +++ b/src/nouveau/winsys/nouveau_push.c @@ -1,5 +1,6 @@ #include "nouveau_push.h" +#include #include #include #include @@ -150,7 +151,12 @@ nouveau_ws_push_submit( req.nr_push = 1; req.push = (uintptr_t)&req_push; - return drmCommandWriteRead(pdev->fd, DRM_NOUVEAU_GEM_PUSHBUF, &req, sizeof(req)); + int ret = drmCommandWriteRead(pdev->fd, DRM_NOUVEAU_GEM_PUSHBUF, &req, sizeof(req)); + + /* TODO: later we want to report that the channel is gone, but for now just assert */ + assert(ret != -ENODEV); + + return ret; } void -- 2.7.4