drm: make sure drm_vblank_init() has been called before touching vbl_lock
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
Родитель
1ea6b8f489
Коммит
bde4889aaa
|
@ -407,13 +407,16 @@ int drm_irq_uninstall(struct drm_device *dev)
|
||||||
/*
|
/*
|
||||||
* Wake up any waiters so they don't hang.
|
* Wake up any waiters so they don't hang.
|
||||||
*/
|
*/
|
||||||
spin_lock_irqsave(&dev->vbl_lock, irqflags);
|
if (dev->num_crtcs) {
|
||||||
for (i = 0; i < dev->num_crtcs; i++) {
|
spin_lock_irqsave(&dev->vbl_lock, irqflags);
|
||||||
DRM_WAKEUP(&dev->vbl_queue[i]);
|
for (i = 0; i < dev->num_crtcs; i++) {
|
||||||
dev->vblank_enabled[i] = 0;
|
DRM_WAKEUP(&dev->vbl_queue[i]);
|
||||||
dev->last_vblank[i] = dev->driver->get_vblank_counter(dev, i);
|
dev->vblank_enabled[i] = 0;
|
||||||
|
dev->last_vblank[i] =
|
||||||
|
dev->driver->get_vblank_counter(dev, i);
|
||||||
|
}
|
||||||
|
spin_unlock_irqrestore(&dev->vbl_lock, irqflags);
|
||||||
}
|
}
|
||||||
spin_unlock_irqrestore(&dev->vbl_lock, irqflags);
|
|
||||||
|
|
||||||
if (!irq_enabled)
|
if (!irq_enabled)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче