]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/amd/powerplay: move the smc_if_version to asic file
authorKevin Wang <kevin1.wang@amd.com>
Mon, 11 Mar 2019 03:00:48 +0000 (11:00 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 19 Mar 2019 20:36:50 +0000 (15:36 -0500)
each asic may be has different smc if version,
so move its to asic file to implement.

Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h
drivers/gpu/drm/amd/powerplay/smu_v11_0.c
drivers/gpu/drm/amd/powerplay/vega20_ppt.c

index 6a4e9f242aaf7c4f54e35da84b4ba7cdb23aafb4..2083139533e9d9b8b1bd8c815ac0c8d03c8a32d7 100644 (file)
@@ -401,6 +401,8 @@ struct smu_context
        uint32_t workload_setting[WORKLOAD_POLICY_MAX];
        uint32_t power_profile_mode;
        uint32_t default_power_profile_mode;
+
+       uint32_t smc_if_version;
 };
 
 struct pptable_funcs {
index f90410435e4cc57212302745f103ddf7ac1b78c6..17143888e37e7ff35c1091a3e4a07c0c78611543 100644 (file)
@@ -234,8 +234,8 @@ static int smu_v11_0_check_fw_version(struct smu_context *smu)
        if (ret)
                goto err;
 
-       if (smu_version == SMU11_DRIVER_IF_VERSION)
-               return 0;
+       if (smu_version != smu->smc_if_version)
+               ret = -EINVAL;
 err:
        return ret;
 }
index c2135baf7976b5f8e90cf39767b489b2021da8fe..7e9e8ad9a3000110a2aaeda889feafef56b7cee1 100644 (file)
@@ -2408,4 +2408,5 @@ static const struct pptable_funcs vega20_ppt_funcs = {
 void vega20_set_ppt_funcs(struct smu_context *smu)
 {
        smu->ppt_funcs = &vega20_ppt_funcs;
+       smu->smc_if_version = SMU11_DRIVER_IF_VERSION;
 }