]> git.baikalelectronics.ru Git - kernel.git/commit
drm/radeon/kms: use defined constants for crtc/hpd count instead of hard-coded value 6
authorIlija Hadzic <ihadzic@research.bell-labs.com>
Wed, 26 Oct 2011 19:43:58 +0000 (15:43 -0400)
committerDave Airlie <airlied@redhat.com>
Tue, 1 Nov 2011 16:02:10 +0000 (16:02 +0000)
commit5d197225c76f602f0876cba898f8256299bd535c
tree7f4a198f3e8114cc4910bce5666a9848c2a3af96
parent46daf5932e767b3371f81e97e841abaa3b387b3a
drm/radeon/kms: use defined constants for crtc/hpd count instead of hard-coded value 6

radeon_driver_irq_preinstall_kms and radeon_driver_irq_uninstall_kms
hard code the loop to 6 which happens to be the current maximum
number of crtcs and hpd pins; if one day an ASIC with more crtcs
(or hpd pins) comes out, this is a trouble waiting to happen.

introduce constants for maximum CRTC count, maximum HPD pins count
and maximum HDMI blocks count (per FIXME in radeon_irq structure)
and correct the loops in radeon_driver_irq_preinstall_kms and
radeon_driver_irq_uninstall_kms

v2: take care of goofs pointed out by Alex Deucher

Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/radeon.h
drivers/gpu/drm/radeon/radeon_irq_kms.c