summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaarten Maathuis <madman2003@gmail.com>2010-02-09 19:35:57 +0100
committerMaarten Maathuis <madman2003@gmail.com>2010-02-09 19:47:31 +0100
commit9da76700072a00c39e21553df0998c7b3b620d88 (patch)
treed46dc51c61deea400a78834e1a6c2b9799cfec4a
parented64797d153ecf0da79b8b849642d7a109fd97fd (diff)
drm/nouveau: spin_lock_init after memset'ing the bios struct
- This was screwing up the spinlock magic for those that run with DEBUG_SPINLOCK. - Source of problem was found by Marcin Slusarz. Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_bios.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c
index 4355b2dd59c4..2cd0fad17dac 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bios.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bios.c
@@ -5876,6 +5876,7 @@ static bool NVInitVBIOS(struct drm_device *dev)
struct nvbios *bios = &dev_priv->VBIOS;
memset(bios, 0, sizeof(struct nvbios));
+ spin_lock_init(&bios->lock);
bios->dev = dev;
if (!NVShadowVBIOS(dev, bios->data))
@@ -5981,7 +5982,6 @@ nouveau_bios_init(struct drm_device *dev)
int ret;
dev_priv->vbios = &bios->pub;
- spin_lock_init(&bios->lock);
if (!NVInitVBIOS(dev))
return -ENODEV;