nouveau/ws: assert on broken channel

no point in continuing

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This commit is contained in:
Karol Herbst 2022-06-15 01:44:42 +02:00 committed by Marge Bot
parent 008e9768ad
commit 1de656bce3

View file

@ -1,5 +1,6 @@
#include "nouveau_push.h"
#include <errno.h>
#include <nouveau_drm.h>
#include <nouveau/nouveau.h>
#include <sys/mman.h>
@ -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