diff options
author | Christoph Bumiller <[email protected]> | 2012-01-10 00:38:19 +0100 |
---|---|---|
committer | Christoph Bumiller <[email protected]> | 2012-01-10 00:38:19 +0100 |
commit | 601fb4b746ac498e69356fba0c17a1f6ce78df6c (patch) | |
tree | 9e1744f7b43ace3d7b1799b78993f46a01099dcf /src/gallium/drivers/nvc0/nvc0_screen.c | |
parent | be1ae976a41de2803f14341580c3c98c58a80fe3 (diff) |
nvc0: enable shader watchdog timer
Prevent infinite loops in shaders from locking up the GPU.
Diffstat (limited to 'src/gallium/drivers/nvc0/nvc0_screen.c')
-rw-r--r-- | src/gallium/drivers/nvc0/nvc0_screen.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_screen.c b/src/gallium/drivers/nvc0/nvc0_screen.c index cecca0da515..a991e67af5c 100644 --- a/src/gallium/drivers/nvc0/nvc0_screen.c +++ b/src/gallium/drivers/nvc0/nvc0_screen.c @@ -466,6 +466,12 @@ nvc0_screen_create(struct nouveau_device *dev) BEGIN_RING(chan, RING_3D(COND_MODE), 1); OUT_RING (chan, NVC0_3D_COND_MODE_ALWAYS); + if (debug_get_bool_option("NOUVEAU_SHADER_WATCHDOG", TRUE)) { + /* kill shaders after about 1 second (at 100 MHz) */ + BEGIN_RING(chan, RING_3D(WATCHDOG_TIMER), 1); + OUT_RING (chan, 0x17); + } + BEGIN_RING(chan, RING_3D(RT_CONTROL), 1); OUT_RING (chan, 1); |