Skip to content
This repository was archived by the owner on Feb 9, 2023. It is now read-only.

Commit 43b9d27

Browse files
Mikita Lipskialexdeucher
authored andcommitted
drm/amd/display: Set irq state only on existing crtcs
Because AMDGPU_CRTC_IRQ_VLINE1 = 6, it expected 6 more crtcs to be programed with disabled irq state in amdgpu_irq_disable_all. That caused errors and accessed the wrong memory location. Signed-off-by: Mikita Lipski <mikita.lipski@amd.com> Reviewed-by: Tony Cheng <Tony.Cheng@amd.com> Reviewed-by: Harry Wentland <Harry.Wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 4a2df0d commit 43b9d27

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -683,10 +683,8 @@ static const struct amdgpu_irq_src_funcs dm_hpd_irq_funcs = {
683683

684684
void amdgpu_dm_set_irq_funcs(struct amdgpu_device *adev)
685685
{
686-
if (adev->mode_info.num_crtc > 0)
687-
adev->crtc_irq.num_types = AMDGPU_CRTC_IRQ_VLINE1 + adev->mode_info.num_crtc;
688-
else
689-
adev->crtc_irq.num_types = 0;
686+
687+
adev->crtc_irq.num_types = adev->mode_info.num_crtc;
690688
adev->crtc_irq.funcs = &dm_crtc_irq_funcs;
691689

692690
adev->pageflip_irq.num_types = adev->mode_info.num_crtc;

0 commit comments

Comments
 (0)