diff options
author | Huang Rui <ray.huang@amd.com> | 2016-12-19 15:15:35 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-01-27 11:12:41 -0500 |
commit | 5c1104b9dc6bc65f71468c70408747034e5aa3f7 (patch) | |
tree | 57df8e81c01f92c33e20521ad8e78c9637a815e5 /drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | |
parent | e81f749452001cc4c08aca1b1e9c0f51f878042a (diff) | |
download | linux-stable-5c1104b9dc6bc65f71468c70408747034e5aa3f7.tar.gz linux-stable-5c1104b9dc6bc65f71468c70408747034e5aa3f7.tar.bz2 linux-stable-5c1104b9dc6bc65f71468c70408747034e5aa3f7.zip |
drm/amd/powerplay: fix request smc_sk firmware case
This patch fixes firmware request error on polaris protection mode.
Because we need load smc_sk instead of smc under security protection
mode.
Signed-off-by: Huang Rui <ray.huang@amd.com>
Tested-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c index af65c24cefe3..d0e87102e1b9 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c @@ -713,6 +713,7 @@ static int amdgpu_cgs_rel_firmware(struct cgs_device *cgs_device, enum cgs_ucode CGS_FUNC_ADEV; if ((CGS_UCODE_ID_SMU == type) || (CGS_UCODE_ID_SMU_SK == type)) { release_firmware(adev->pm.fw); + adev->pm.fw = NULL; return 0; } /* cannot release other firmware because they are not created by cgs */ @@ -808,6 +809,9 @@ static int amdgpu_cgs_get_firmware_info(struct cgs_device *cgs_device, const uint8_t *src; const struct smc_firmware_header_v1_0 *hdr; + if (CGS_UCODE_ID_SMU_SK == type) + amdgpu_cgs_rel_firmware(cgs_device, CGS_UCODE_ID_SMU); + if (!adev->pm.fw) { switch (adev->asic_type) { case CHIP_TOPAZ: |