From: Andrey Grodzovsky <Andrey.Grodzovsky@xxxxxxx> Change-Id: Iaf1b717863c59810657e66835468628acf3aee4c Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky at amd.com> Acked-by: Harry Wentland <Harry.Wentland at amd.com> Reviewed-by: Tony Cheng <Tony.Cheng at amd.com> Reviewed-by: Jordan Lazare <Jordan.Lazare at amd.com> --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index a33e339991ec..f066e2207b5e 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -1033,8 +1033,8 @@ static int dce110_register_irq_handlers(struct amdgpu_device *adev) * for acknowledging and handling. */ /* Use VBLANK interrupt */ - for (i = 0; i < adev->mode_info.num_crtc; i++) { - r = amdgpu_irq_add_id(adev, i+1, &adev->crtc_irq); + for (i = 1; i <= adev->mode_info.num_crtc; i++) { + r = amdgpu_irq_add_id(adev, i, &adev->crtc_irq); if (r) { DRM_ERROR("Failed to add crtc irq id!\n"); @@ -1043,7 +1043,7 @@ static int dce110_register_irq_handlers(struct amdgpu_device *adev) int_params.int_context = INTERRUPT_HIGH_IRQ_CONTEXT; int_params.irq_source = - dc_interrupt_to_irq_source(dc, i+1, 0); + dc_interrupt_to_irq_source(dc, i, 0); c_irq_params = &adev->dm.vblank_params[int_params.irq_source - DC_IRQ_SOURCE_VBLANK1]; @@ -1054,6 +1054,7 @@ static int dce110_register_irq_handlers(struct amdgpu_device *adev) dm_crtc_high_irq, c_irq_params); } + /* Use GRPH_PFLIP interrupt */ for (i = VISLANDS30_IV_SRCID_D1_GRPH_PFLIP; i <= VISLANDS30_IV_SRCID_D6_GRPH_PFLIP; i += 2) { r = amdgpu_irq_add_id(adev, i, &adev->pageflip_irq); -- 2.9.3