diff options
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_irq_kms.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_irq_kms.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_irq_kms.c b/drivers/gpu/drm/radeon/radeon_irq_kms.c index ea4c645ece11..a212041e8b0b 100644 --- a/drivers/gpu/drm/radeon/radeon_irq_kms.c +++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c | |||
@@ -67,9 +67,10 @@ void radeon_driver_irq_preinstall_kms(struct drm_device *dev) | |||
67 | 67 | ||
68 | /* Disable *all* interrupts */ | 68 | /* Disable *all* interrupts */ |
69 | rdev->irq.sw_int = false; | 69 | rdev->irq.sw_int = false; |
70 | for (i = 0; i < 2; i++) { | 70 | for (i = 0; i < rdev->num_crtc; i++) |
71 | rdev->irq.crtc_vblank_int[i] = false; | 71 | rdev->irq.crtc_vblank_int[i] = false; |
72 | } | 72 | for (i = 0; i < 6; i++) |
73 | rdev->irq.hpd[i] = false; | ||
73 | radeon_irq_set(rdev); | 74 | radeon_irq_set(rdev); |
74 | /* Clear bits */ | 75 | /* Clear bits */ |
75 | radeon_irq_process(rdev); | 76 | radeon_irq_process(rdev); |
@@ -95,28 +96,29 @@ void radeon_driver_irq_uninstall_kms(struct drm_device *dev) | |||
95 | } | 96 | } |
96 | /* Disable *all* interrupts */ | 97 | /* Disable *all* interrupts */ |
97 | rdev->irq.sw_int = false; | 98 | rdev->irq.sw_int = false; |
98 | for (i = 0; i < 2; i++) { | 99 | for (i = 0; i < rdev->num_crtc; i++) |
99 | rdev->irq.crtc_vblank_int[i] = false; | 100 | rdev->irq.crtc_vblank_int[i] = false; |
101 | for (i = 0; i < 6; i++) | ||
100 | rdev->irq.hpd[i] = false; | 102 | rdev->irq.hpd[i] = false; |
101 | } | ||
102 | radeon_irq_set(rdev); | 103 | radeon_irq_set(rdev); |
103 | } | 104 | } |
104 | 105 | ||
105 | int radeon_irq_kms_init(struct radeon_device *rdev) | 106 | int radeon_irq_kms_init(struct radeon_device *rdev) |
106 | { | 107 | { |
107 | int r = 0; | 108 | int r = 0; |
108 | int num_crtc = 2; | ||
109 | 109 | ||
110 | if (rdev->flags & RADEON_SINGLE_CRTC) | ||
111 | num_crtc = 1; | ||
112 | spin_lock_init(&rdev->irq.sw_lock); | 110 | spin_lock_init(&rdev->irq.sw_lock); |
113 | r = drm_vblank_init(rdev->ddev, num_crtc); | 111 | r = drm_vblank_init(rdev->ddev, rdev->num_crtc); |
114 | if (r) { | 112 | if (r) { |
115 | return r; | 113 | return r; |
116 | } | 114 | } |
117 | /* enable msi */ | 115 | /* enable msi */ |
118 | rdev->msi_enabled = 0; | 116 | rdev->msi_enabled = 0; |
119 | if (rdev->family >= CHIP_RV380) { | 117 | /* MSIs don't seem to work reliably on all IGP |
118 | * chips. Disable MSI on them for now. | ||
119 | */ | ||
120 | if ((rdev->family >= CHIP_RV380) && | ||
121 | (!(rdev->flags & RADEON_IS_IGP))) { | ||
120 | int ret = pci_enable_msi(rdev->pdev); | 122 | int ret = pci_enable_msi(rdev->pdev); |
121 | if (!ret) { | 123 | if (!ret) { |
122 | rdev->msi_enabled = 1; | 124 | rdev->msi_enabled = 1; |