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)
committerChristian König <christian.koenig@amd.com>
Thu, 17 Apr 2014 11:59:53 +0000 (13:59 +0200)
If the new mc ucode is available.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/radeon/ci_dpm.c

index 18e91ee2c8b75c150ed8e4c9e1403a2924ac9a8a..10dae4106c08e3ea60944ae8a1a77154a4df30c2 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"
@@ -5147,9 +5149,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;