]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm/radeon/ss: use num_crtc rather than hardcoded 6
authorAlex Deucher <alexander.deucher@amd.com>
Tue, 21 Aug 2012 22:52:56 +0000 (18:52 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Oct 2012 17:39:40 +0000 (10:39 -0700)
commit 5317670692f61675394db2eb6713484b67383750 upstream.

When checking if a pll is in use.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/radeon/atombios_crtc.c

index 8fccff202ff80bb1a9b254401620b8abfcbfbb62..a1b816b90e2a72becc4949ccc4f42c4e28f12ef5 100644 (file)
@@ -452,7 +452,7 @@ static void atombios_crtc_program_ss(struct radeon_device *rdev,
        union atom_enable_ss args;
 
        if (!enable) {
-               for (i = 0; i < 6; i++) {
+               for (i = 0; i < rdev->num_crtc; i++) {
                        if (rdev->mode_info.crtcs[i] &&
                            rdev->mode_info.crtcs[i]->enabled &&
                            i != crtc_id &&