summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_irq_kms.c
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2009-10-16 12:21:24 -0400
committerDave Airlie <airlied@redhat.com>2009-10-26 13:28:23 +1000
commit3e5cb98dfe87cc61d0a1119dd8aa2b1e4cfab424 (patch)
treed2ce9174cf1257cce348da291c67de9d67d2a69c /drivers/gpu/drm/radeon/radeon_irq_kms.c
parentebbe1cb936dfc96d809ccf4d64a9755f8ba0c0ff (diff)
downloadblackbird-op-linux-3e5cb98dfe87cc61d0a1119dd8aa2b1e4cfab424.tar.gz
blackbird-op-linux-3e5cb98dfe87cc61d0a1119dd8aa2b1e4cfab424.zip
drm/radeon/kms: add support for msi
Try to enable msi on chips that support it. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_irq_kms.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_irq_kms.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_irq_kms.c b/drivers/gpu/drm/radeon/radeon_irq_kms.c
index 8e0a8759e428..a0fe6232dcb6 100644
--- a/drivers/gpu/drm/radeon/radeon_irq_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c
@@ -92,6 +92,13 @@ int radeon_irq_kms_init(struct radeon_device *rdev)
if (r) {
return r;
}
+ /* enable msi */
+ rdev->msi_enabled = 0;
+ if (rdev->family >= CHIP_RV380) {
+ int ret = pci_enable_msi(rdev->pdev);
+ if (!ret)
+ rdev->msi_enabled = 1;
+ }
drm_irq_install(rdev->ddev);
rdev->irq.installed = true;
DRM_INFO("radeon: irq initialized.\n");
@@ -103,5 +110,7 @@ void radeon_irq_kms_fini(struct radeon_device *rdev)
if (rdev->irq.installed) {
rdev->irq.installed = false;
drm_irq_uninstall(rdev->ddev);
+ if (rdev->msi_enabled)
+ pci_disable_msi(rdev->pdev);
}
}
OpenPOWER on IntegriCloud