amdgpu/dce: Use actual number of CRTCs and HPDs in set_irq_funcs
authorMichel Dänzer <michel.daenzer@amd.com>
Tue, 24 Oct 2017 09:03:21 +0000 (11:03 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 4 Dec 2017 21:41:40 +0000 (16:41 -0500)
commitd794b9f8272203ea1cbea0472fe55b1b28826060
treec09c831326dc4ec7648ffe1c48b10ec1acb3965c
parentb3734397a0b093eae7bce93b7e25a73051ce6972
amdgpu/dce: Use actual number of CRTCs and HPDs in set_irq_funcs

Hardcoding the maximum numbers could result in spurious error messages
from the IRQ state callbacks, e.g. on Polaris 11/12:

[drm:dce_v11_0_set_pageflip_irq_state [amdgpu]] *ERROR* invalid pageflip crtc 5
[drm:amdgpu_irq_disable_all [amdgpu]] *ERROR* error disabling interrupt (-22)

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c