drm/radeon/dpm: make sure dc performance level limits are valid (BTC-SI) (v2)
authorAlex Deucher <alexander.deucher@amd.com>
Fri, 30 Aug 2013 20:18:35 +0000 (16:18 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Oct 2013 16:41:01 +0000 (09:41 -0700)
commitdd0920e688b3886587ba02d82c5b0eebf1705cb5
tree38c0a9ad06dd84566bfccc2291aac5ce2d0ef047
parentd692b2fa12c635ee2fef4ab4d41b5f874754886f
drm/radeon/dpm: make sure dc performance level limits are valid (BTC-SI) (v2)

commit 1ff60ddb84bb9ff6fa182710c4e08b66badf918c upstream.

Check to make sure the dc limits are valid before using them.
Some systems may not have a dc limits table.  In that case just
use the ac limits.  This fixes hangs on systems when the power
state is changed when on battery (dc) due to invalid performance
state parameters.

Should fix:
https://bugs.freedesktop.org/show_bug.cgi?id=68708

v2: fix up limits in dpm_init()

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