summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom-at-vmware-dot-com>2009-02-05 15:41:45 +0100
committerThomas Hellstrom <thellstrom-at-vmware-dot-com>2009-02-05 15:44:02 +0100
commit8a2a4eb44531d3e37564dfc841af105f0cf34fb0 (patch)
tree560a5e1869021ee91b18b5aa1018d3d065df1e1d
parenta0f198572ad28e8a576d3afaedc66bff28eb4334 (diff)
openchrome: Use ttm_lock_set_kill functionality to kill processes attempting to use the TTM functionality when it is gone.
-rw-r--r--linux-core/openchrome/via_init.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/linux-core/openchrome/via_init.c b/linux-core/openchrome/via_init.c
index 3cab6c72..c67c5773 100644
--- a/linux-core/openchrome/via_init.c
+++ b/linux-core/openchrome/via_init.c
@@ -561,6 +561,7 @@ static int via_ttm_init(struct drm_device *dev)
goto out_err0;
}
ttm_lock_init(&dev_priv->ttm_lock);
+ ttm_lock_set_kill(&dev_priv->ttm_lock, true, SIGTERM);
ret = ttm_bo_init_mm(&dev_priv->bdev, TTM_PL_VRAM,
DEV_VRAM_OFFSET >> PAGE_SHIFT,
@@ -789,6 +790,8 @@ static int via_firstopen_locked(struct drm_device *dev)
if (ret)
goto out_err2;
+ ttm_lock_set_kill(&dev_priv->ttm_lock, false, SIGTERM);
+
return 0;
out_err2:
(void)drm_irq_uninstall(dev);
@@ -830,6 +833,7 @@ void via_lastclose(struct drm_device *dev)
dev_priv->sarea = NULL;
dev_priv->sarea_priv = NULL;
+ ttm_lock_set_kill(&dev_priv->ttm_lock, true, SIGTERM);
via_ttm_signal_fences(dev_priv);
(void)ttm_bo_evict_mm(&dev_priv->bdev, TTM_PL_VRAM);
(void)ttm_bo_evict_mm(&dev_priv->bdev, TTM_PL_TT);
@@ -869,6 +873,8 @@ static int via_leavevt(struct drm_device *dev, struct drm_file *file_priv)
if (ret)
return ret;
+ ttm_lock_set_kill(&dev_priv->ttm_lock, true, SIGTERM);
+
/*
* Clear and disable the VIA_AGP memory type.
*/