drm/radeon: re-enable mclk dpm on R7 260X asics
authorAlex Deucher <alexdeucher@gmail.com>
Fri, 11 Apr 2014 15:21:51 +0000 (11:21 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Jun 2014 17:28:13 +0000 (10:28 -0700)
commit 7e1858f9aff7d608b3d0abad4bda0130de887b89 upstream.

If the new mc ucode is available.

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

index 28d636a..9241e96 100644 (file)
  *
  */
 
+#include <linux/firmware.h>
 #include "drmP.h"
 #include "radeon.h"
+#include "radeon_ucode.h"
 #include "cikd.h"
 #include "r600_dpm.h"
 #include "ci_dpm.h"
@@ -5106,9 +5108,11 @@ int ci_dpm_init(struct radeon_device *rdev)
        pi->mclk_dpm_key_disabled = 0;
        pi->pcie_dpm_key_disabled = 0;
 
-       /* mclk dpm is unstable on some R7 260X cards */
-       if (rdev->pdev->device == 0x6658)
+       /* mclk dpm is unstable on some R7 260X cards with the old mc ucode */
+       if ((rdev->pdev->device == 0x6658) &&
+           (rdev->mc_fw->size == (BONAIRE_MC_UCODE_SIZE * 4))) {
                pi->mclk_dpm_key_disabled = 1;
+       }
 
        pi->caps_sclk_ds = true;