radeon_driver_irq_preinstall_kms and radeon_driver_irq_uninstall_kms hard code the loop to 6 which happens to be the current maximum number of crtcs; if one day an ASIC with more crtcs comes out, this is a trouble waiting to happen. it's better to use num_crtc instead (for ASICs that have fewer than 6 CRTCs, this is still OK because higher numbers won't be looked at)
Signed-off-by: Ilija Hadzic <ihadzic at research.bell-labs.com> --- drivers/gpu/drm/radeon/radeon_irq_kms.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_irq_kms.c b/drivers/gpu/drm/radeon/radeon_irq_kms.c index 9ec830c..a0f9d24 100644 --- a/drivers/gpu/drm/radeon/radeon_irq_kms.c +++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c @@ -69,7 +69,7 @@ void radeon_driver_irq_preinstall_kms(struct drm_device *dev) rdev->irq.gui_idle = false; for (i = 0; i < rdev->num_crtc; i++) rdev->irq.crtc_vblank_int[i] = false; - for (i = 0; i < 6; i++) { + for (i = 0; i < rdev->num_crtc; i++) { rdev->irq.hpd[i] = false; rdev->irq.pflip[i] = false; } @@ -101,7 +101,7 @@ void radeon_driver_irq_uninstall_kms(struct drm_device *dev) rdev->irq.gui_idle = false; for (i = 0; i < rdev->num_crtc; i++) rdev->irq.crtc_vblank_int[i] = false; - for (i = 0; i < 6; i++) { + for (i = 0; i < rdev->num_crtc; i++) { rdev->irq.hpd[i] = false; rdev->irq.pflip[i] = false; } -- 1.7.7