summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_chan.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2017-01-24 16:56:52 +1000
committerBen Skeggs <bskeggs@redhat.com>2017-02-17 17:38:09 +1000
commit84cd0a55659ad7ab5792d5319b315e1e5bba312a (patch)
treebff18de3c006bd69dc8c9e832ccf9b72503f47b1 /drivers/gpu/drm/nouveau/nouveau_chan.c
parentd8cc37d878d695fc2a88b4777cdfea8bca9fdcb5 (diff)
downloadop-kernel-dev-84cd0a55659ad7ab5792d5319b315e1e5bba312a.zip
op-kernel-dev-84cd0a55659ad7ab5792d5319b315e1e5bba312a.tar.gz
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 3b3d071..dbc41fa 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;
OpenPOWER on IntegriCloud