drm/amdgpu/dce6: fix off by one in interrupt setup

Submitted by StDenis, Tom on Sept. 19, 2016, 4:20 p.m.

Details

Message ID CY4PR12MB1768EBE42C15DC557198D792F7F40@CY4PR12MB1768.namprd12.prod.outlook.com
State New
Headers show
Series "drm/amdgpu/dce6: fix off by one in interrupt setup" ( rev: 2 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

StDenis, Tom Sept. 19, 2016, 4:20 p.m.
Looks correct and consistent with the other DCE drivers.


Reviewed-by: Tom St Denis <tom.stdenis@amd.com>

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
index fb6dafd..c535f43 100644
--- a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
@@ -185,7 +185,7 @@  static void dce_v6_0_pageflip_interrupt_init(struct amdgpu_device *adev)
         unsigned i;

         /* Enable pflip interrupts */
-       for (i = 0; i <= adev->mode_info.num_crtc; i++)
+       for (i = 0; i < adev->mode_info.num_crtc; i++)
                 amdgpu_irq_get(adev, &adev->pageflip_irq, i);
 }

@@ -194,7 +194,7 @@  static void dce_v6_0_pageflip_interrupt_fini(struct amdgpu_device *adev)
         unsigned i;

         /* Disable pflip interrupts */
-       for (i = 0; i <= adev->mode_info.num_crtc; i++)
+       for (i = 0; i < adev->mode_info.num_crtc; i++)
                 amdgpu_irq_put(adev, &adev->pageflip_irq, i);
 }