]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/amdgpu: extract common code in vi_common_early_init
authorFlora Cui <Flora.Cui@amd.com>
Mon, 2 Nov 2015 13:15:55 +0000 (21:15 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 3 Nov 2015 16:46:44 +0000 (11:46 -0500)
Change-Id: I9ed25353c559e27bc1b1d5b50f977b0ff03de87f
Signed-off-by: Flora Cui <Flora.Cui@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
drivers/gpu/drm/amd/amdgpu/vi.c

index 9904761c9c37763a23c1dcd83128d63c9a329cfa..2e52f3e2c081d53a1281f03ece72242a28fd9471 100644 (file)
@@ -1410,8 +1410,6 @@ static int vi_common_early_init(void *handle)
                adev->cg_flags = 0;
                adev->pg_flags = 0;
                adev->external_rev_id = 0x1;
-               if (amdgpu_smc_load_fw && smc_enabled)
-                       adev->firmware.smu_load = true;
                break;
        case CHIP_FIJI:
        case CHIP_TONGA:
@@ -1419,8 +1417,6 @@ static int vi_common_early_init(void *handle)
                adev->cg_flags = 0;
                adev->pg_flags = 0;
                adev->external_rev_id = adev->rev_id + 0x14;
-               if (amdgpu_smc_load_fw && smc_enabled)
-                       adev->firmware.smu_load = true;
                break;
        case CHIP_CARRIZO:
        case CHIP_STONEY:
@@ -1429,14 +1425,15 @@ static int vi_common_early_init(void *handle)
                /* Disable UVD pg */
                adev->pg_flags = /* AMDGPU_PG_SUPPORT_UVD | */AMDGPU_PG_SUPPORT_VCE;
                adev->external_rev_id = adev->rev_id + 0x1;
-               if (amdgpu_smc_load_fw && smc_enabled)
-                       adev->firmware.smu_load = true;
                break;
        default:
                /* FIXME: not supported yet */
                return -EINVAL;
        }
 
+       if (amdgpu_smc_load_fw && smc_enabled)
+               adev->firmware.smu_load = true;
+
        return 0;
 }