From: Ben Skeggs Date: Tue, 24 Jan 2017 06:56:52 +0000 (+1000) Subject: drm/nouveau: check for dead channel before trying to idle X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=84cd0a55659ad7ab5792d5319b315e1e5bba312a;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git drm/nouveau: check for dead channel before trying to idle This prevents *very* long waits while attempting to destroy channels after a fault has occurred. Signed-off-by: Ben Skeggs --- diff --git a/drivers/gpu/drm/nouveau/nouveau_chan.c b/drivers/gpu/drm/nouveau/nouveau_chan.c index 3b3d071b151e..dbc41fa86ee8 100644 --- a/drivers/gpu/drm/nouveau/nouveau_chan.c +++ b/drivers/gpu/drm/nouveau/nouveau_chan.c @@ -58,7 +58,7 @@ nouveau_channel_killed(struct nvif_notify *ntfy) int nouveau_channel_idle(struct nouveau_channel *chan) { - if (likely(chan && chan->fence)) { + if (likely(chan && chan->fence && !atomic_read(&chan->killed))) { struct nouveau_cli *cli = (void *)chan->user.client; struct nouveau_fence *fence = NULL; int ret;