Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 262563
b: refs/heads/master
c: 5037f8a
h: refs/heads/master
i:
  262561: 49c6a1d
  262559: 034c4a8
v: v3
  • Loading branch information
Joonyoung Shim authored and Dave Airlie committed Aug 4, 2011
1 parent 197ea9a commit 9faf378
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e1c44acc8cabda6b38864f25e809b306c4d2d790
refs/heads/master: 5037f8acf448dd0de9868dc7410f45879d3d1a1b
23 changes: 15 additions & 8 deletions trunk/drivers/gpu/drm/drm_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,11 +291,14 @@ static void drm_irq_vgaarb_nokms(void *cookie, bool state)
if (!dev->irq_enabled)
return;

if (state)
dev->driver->irq_uninstall(dev);
else {
dev->driver->irq_preinstall(dev);
dev->driver->irq_postinstall(dev);
if (state) {
if (dev->driver->irq_uninstall)
dev->driver->irq_uninstall(dev);
} else {
if (dev->driver->irq_preinstall)
dev->driver->irq_preinstall(dev);
if (dev->driver->irq_postinstall)
dev->driver->irq_postinstall(dev);
}
}

Expand Down Expand Up @@ -338,7 +341,8 @@ int drm_irq_install(struct drm_device *dev)
DRM_DEBUG("irq=%d\n", drm_dev_to_irq(dev));

/* Before installing handler */
dev->driver->irq_preinstall(dev);
if (dev->driver->irq_preinstall)
dev->driver->irq_preinstall(dev);

/* Install handler */
if (drm_core_check_feature(dev, DRIVER_IRQ_SHARED))
Expand All @@ -363,7 +367,9 @@ int drm_irq_install(struct drm_device *dev)
vga_client_register(dev->pdev, (void *)dev, drm_irq_vgaarb_nokms, NULL);

/* After installing handler */
ret = dev->driver->irq_postinstall(dev);
if (dev->driver->irq_postinstall)
ret = dev->driver->irq_postinstall(dev);

if (ret < 0) {
mutex_lock(&dev->struct_mutex);
dev->irq_enabled = 0;
Expand Down Expand Up @@ -416,7 +422,8 @@ int drm_irq_uninstall(struct drm_device *dev)
if (!drm_core_check_feature(dev, DRIVER_MODESET))
vga_client_register(dev->pdev, NULL, NULL, NULL);

dev->driver->irq_uninstall(dev);
if (dev->driver->irq_uninstall)
dev->driver->irq_uninstall(dev);

free_irq(drm_dev_to_irq(dev), dev);

Expand Down

0 comments on commit 9faf378

Please sign in to comment.