]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/radeon: add support for new hainan variants
authorAlex Deucher <alexander.deucher@amd.com>
Tue, 17 Jan 2017 20:02:13 +0000 (15:02 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 17 Jan 2017 20:25:35 +0000 (15:25 -0500)
New hainan parts require updated smc firmware.

Cc: Sonny Jiang <sonny.jiang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/si.c

index 32d55220a2d318d411d2b1b5f6000666faa64fd8..414776811e71e0a4e9f7c97309b6c173c8f502a3 100644 (file)
@@ -114,6 +114,7 @@ MODULE_FIRMWARE("radeon/hainan_mc.bin");
 MODULE_FIRMWARE("radeon/hainan_rlc.bin");
 MODULE_FIRMWARE("radeon/hainan_smc.bin");
 MODULE_FIRMWARE("radeon/hainan_k_smc.bin");
+MODULE_FIRMWARE("radeon/banks_k_2_smc.bin");
 
 MODULE_FIRMWARE("radeon/si58_mc.bin");
 
@@ -1653,6 +1654,7 @@ static int si_init_microcode(struct radeon_device *rdev)
        int new_fw = 0;
        bool new_smc = false;
        bool si58_fw = false;
+       bool banks2_fw = false;
 
        DRM_DEBUG("\n");
 
@@ -1730,10 +1732,11 @@ static int si_init_microcode(struct radeon_device *rdev)
                     ((rdev->pdev->device == 0x6660) ||
                      (rdev->pdev->device == 0x6663) ||
                      (rdev->pdev->device == 0x6665) ||
-                     (rdev->pdev->device == 0x6667))) ||
-                   ((rdev->pdev->revision == 0xc3) &&
-                    (rdev->pdev->device == 0x6665)))
+                     (rdev->pdev->device == 0x6667))))
                        new_smc = true;
+               else if ((rdev->pdev->revision == 0xc3) &&
+                        (rdev->pdev->device == 0x6665))
+                       banks2_fw = true;
                new_chip_name = "hainan";
                pfp_req_size = SI_PFP_UCODE_SIZE * 4;
                me_req_size = SI_PM4_UCODE_SIZE * 4;
@@ -1886,7 +1889,9 @@ static int si_init_microcode(struct radeon_device *rdev)
                }
        }
 
-       if (new_smc)
+       if (banks2_fw)
+               snprintf(fw_name, sizeof(fw_name), "radeon/banks_k_2_smc.bin");
+       else if (new_smc)
                snprintf(fw_name, sizeof(fw_name), "radeon/%s_k_smc.bin", new_chip_name);
        else
                snprintf(fw_name, sizeof(fw_name), "radeon/%s_smc.bin", new_chip_name);