aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2018-12-13 22:44:08 -0500
committerBen Skeggs <bskeggs@redhat.com>2019-01-11 01:25:54 -0500
commita5176a4cb85bb6213daadf691097cf411da35df2 (patch)
tree096f6def1e65682b7a16758271272dc339880e8c
parent118780066e30c34de3d9349710b51780bfa0ba83 (diff)
drm/nouveau/falcon: avoid touching registers if engine is off
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108980 Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/falcon.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/falcon.c b/drivers/gpu/drm/nouveau/nvkm/engine/falcon.c
index 816ccaedfc73..8675613e142b 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/falcon.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/falcon.c
@@ -22,6 +22,7 @@
22#include <engine/falcon.h> 22#include <engine/falcon.h>
23 23
24#include <core/gpuobj.h> 24#include <core/gpuobj.h>
25#include <subdev/mc.h>
25#include <subdev/timer.h> 26#include <subdev/timer.h>
26#include <engine/fifo.h> 27#include <engine/fifo.h>
27 28
@@ -107,8 +108,10 @@ nvkm_falcon_fini(struct nvkm_engine *engine, bool suspend)
107 } 108 }
108 } 109 }
109 110
110 nvkm_mask(device, base + 0x048, 0x00000003, 0x00000000); 111 if (nvkm_mc_enabled(device, engine->subdev.index)) {
111 nvkm_wr32(device, base + 0x014, 0xffffffff); 112 nvkm_mask(device, base + 0x048, 0x00000003, 0x00000000);
113 nvkm_wr32(device, base + 0x014, 0xffffffff);
114 }
112 return 0; 115 return 0;
113} 116}
114 117