summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_state.c
diff options
context:
space:
mode:
authorMaarten Maathuis2010-02-01 20:58:27 +0100
committerBen Skeggs2010-02-25 06:07:53 +0100
commitff9e5279b14dc024599cc705ee199dadb94e90a3 (patch)
tree4881498b0c5f0defdc14890783249b0514a8afde /drivers/gpu/drm/nouveau/nouveau_state.c
parentdrm/nv50: fix vram ptes on IGPs to point at stolen system memory (diff)
downloadkernel-qcow2-linux-ff9e5279b14dc024599cc705ee199dadb94e90a3.tar.gz
kernel-qcow2-linux-ff9e5279b14dc024599cc705ee199dadb94e90a3.tar.xz
kernel-qcow2-linux-ff9e5279b14dc024599cc705ee199dadb94e90a3.zip
drm/nouveau: protect channel create/destroy and irq handler with a spinlock
The nv50 pgraph handler (for example) could reenable pgraph fifo access and that would be bad when pgraph context is being unloaded (we need the guarantee a ctxprog isn't running). Signed-off-by: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_state.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_state.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c
index a4851af5b05e..ed5ac0b9a0ac 100644
--- a/drivers/gpu/drm/nouveau/nouveau_state.c
+++ b/drivers/gpu/drm/nouveau/nouveau_state.c
@@ -391,6 +391,7 @@ nouveau_card_init(struct drm_device *dev)
goto out;
engine = &dev_priv->engine;
dev_priv->init_state = NOUVEAU_CARD_INIT_FAILED;
+ spin_lock_init(&dev_priv->context_switch_lock);
/* Parse BIOS tables / Run init tables if card not POSTed */
if (drm_core_check_feature(dev, DRIVER_MODESET)) {