diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2011-10-25 14:58:49 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-11 09:36:52 -0800 |
commit | fd33e34e106cb531435e4f7ed058c0c93a26c9d7 (patch) | |
tree | b355d23e60d9ce3fcb3778f4c2fe571171941af5 | |
parent | 3fa1ae816c22f98f0f933ad77da681ab28f7845d (diff) | |
download | kernel_samsung_aries-fd33e34e106cb531435e4f7ed058c0c93a26c9d7.zip kernel_samsung_aries-fd33e34e106cb531435e4f7ed058c0c93a26c9d7.tar.gz kernel_samsung_aries-fd33e34e106cb531435e4f7ed058c0c93a26c9d7.tar.bz2 |
drm/radeon/kms: split MSI check into a separate function
commit 8f6c25c59b0c895c68cae59d1b34e9a7b36971bc upstream.
This makes it easier to add quirks for certain systems.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_irq_kms.c | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_irq_kms.c b/drivers/gpu/drm/radeon/radeon_irq_kms.c index 9ec830c..f0e660b 100644 --- a/drivers/gpu/drm/radeon/radeon_irq_kms.c +++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c @@ -108,6 +108,27 @@ void radeon_driver_irq_uninstall_kms(struct drm_device *dev) radeon_irq_set(rdev); } +static bool radeon_msi_ok(struct radeon_device *rdev) +{ + /* RV370/RV380 was first asic with MSI support */ + if (rdev->family < CHIP_RV380) + return false; + + /* MSIs don't work on AGP */ + if (rdev->flags & RADEON_IS_AGP) + return false; + + if (rdev->flags & RADEON_IS_IGP) { + /* APUs work fine with MSIs */ + if (rdev->family >= CHIP_PALM) + return true; + /* lots of IGPs have problems with MSIs */ + return false; + } + + return true; +} + int radeon_irq_kms_init(struct radeon_device *rdev) { int i; @@ -124,12 +145,8 @@ int radeon_irq_kms_init(struct radeon_device *rdev) } /* enable msi */ rdev->msi_enabled = 0; - /* MSIs don't seem to work reliably on all IGP - * chips. Disable MSI on them for now. - */ - if ((rdev->family >= CHIP_RV380) && - ((!(rdev->flags & RADEON_IS_IGP)) || (rdev->family >= CHIP_PALM)) && - (!(rdev->flags & RADEON_IS_AGP))) { + + if (radeon_msi_ok(rdev)) { int ret = pci_enable_msi(rdev->pdev); if (!ret) { rdev->msi_enabled = 1; |