drm/amdgpu/dce6: fix off by one in interrupt setup
authorAlex Deucher <alexander.deucher@amd.com>
Mon, 19 Sep 2016 13:30:21 +0000 (09:30 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 19 Sep 2016 17:21:54 +0000 (13:21 -0400)
Reviewed-by: Tom St Denis <tom.stdenis@amd.com>
Reported-by: Christian Inci <chris.pcguy.inci@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c

index d3512f381e539597c873aa0e3eeb24e243dbefcd..ec5d8d93ad23658d15a7008b8e7e82d29c4766bb 100644 (file)
@@ -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);
 }