summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_chan.c
diff options
context:
space:
mode:
authorBen Skeggs2017-01-24 07:56:52 +0100
committerBen Skeggs2017-02-17 08:38:09 +0100
commit84cd0a55659ad7ab5792d5319b315e1e5bba312a (patch)
treebff18de3c006bd69dc8c9e832ccf9b72503f47b1 /drivers/gpu/drm/nouveau/nouveau_chan.c
parentdrm/nouveau: request notifications for channels that have been killed (diff)
downloadkernel-qcow2-linux-84cd0a55659ad7ab5792d5319b315e1e5bba312a.tar.gz
kernel-qcow2-linux-84cd0a55659ad7ab5792d5319b315e1e5bba312a.tar.xz
kernel-qcow2-linux-84cd0a55659ad7ab5792d5319b315e1e5bba312a.zip
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 <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_chan.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_chan.c2
1 files changed, 1 insertions, 1 deletions
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;