提交 d9184fa9 编写于 作者: B Ben Skeggs

drm/nouveau: use mutex for vbios lock

Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
上级 13876c6e
...@@ -5861,13 +5861,12 @@ nouveau_bios_run_init_table(struct drm_device *dev, uint16_t table, ...@@ -5861,13 +5861,12 @@ nouveau_bios_run_init_table(struct drm_device *dev, uint16_t table,
struct drm_nouveau_private *dev_priv = dev->dev_private; struct drm_nouveau_private *dev_priv = dev->dev_private;
struct nvbios *bios = &dev_priv->VBIOS; struct nvbios *bios = &dev_priv->VBIOS;
struct init_exec iexec = { true, false }; struct init_exec iexec = { true, false };
unsigned long flags;
spin_lock_irqsave(&bios->lock, flags); mutex_lock(&bios->lock);
bios->display.output = dcbent; bios->display.output = dcbent;
parse_init_table(bios, table, &iexec); parse_init_table(bios, table, &iexec);
bios->display.output = NULL; bios->display.output = NULL;
spin_unlock_irqrestore(&bios->lock, flags); mutex_unlock(&bios->lock);
} }
static bool NVInitVBIOS(struct drm_device *dev) static bool NVInitVBIOS(struct drm_device *dev)
...@@ -5876,7 +5875,7 @@ static bool NVInitVBIOS(struct drm_device *dev) ...@@ -5876,7 +5875,7 @@ static bool NVInitVBIOS(struct drm_device *dev)
struct nvbios *bios = &dev_priv->VBIOS; struct nvbios *bios = &dev_priv->VBIOS;
memset(bios, 0, sizeof(struct nvbios)); memset(bios, 0, sizeof(struct nvbios));
spin_lock_init(&bios->lock); mutex_init(&bios->lock);
bios->dev = dev; bios->dev = dev;
if (!NVShadowVBIOS(dev, bios->data)) if (!NVShadowVBIOS(dev, bios->data))
......
...@@ -205,7 +205,7 @@ struct nvbios { ...@@ -205,7 +205,7 @@ struct nvbios {
struct drm_device *dev; struct drm_device *dev;
struct nouveau_bios_info pub; struct nouveau_bios_info pub;
spinlock_t lock; struct mutex lock;
uint8_t data[NV_PROM_SIZE]; uint8_t data[NV_PROM_SIZE];
unsigned int length; unsigned int length;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册