diff options
| author | Alex Deucher <alexander.deucher@amd.com> | 2019-02-12 17:54:31 +0300 | 
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2019-02-13 17:44:05 +0300 | 
| commit | 1d69511e49b0107c0a60ff5ef488f5a2512a50ae (patch) | |
| tree | 22b6e464fba627631d95483c2363157c266b57de /drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | |
| parent | 727962f030c23422a01e8b22d0f463815fb15ec4 (diff) | |
| download | linux-1d69511e49b0107c0a60ff5ef488f5a2512a50ae.tar.xz | |
drm/amdgpu/psp11: TA firmware is optional (v3)
Don't warn or fail if it's missing.
v2: handle xgmi case more gracefully.
v3: handle older kernels properly
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Tested-by: James Zhu <James.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 9 | 
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index 8fab0d637ee5..3a9b48b227ac 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c @@ -90,8 +90,10 @@ static int psp_sw_fini(void *handle)  	adev->psp.sos_fw = NULL;  	release_firmware(adev->psp.asd_fw);  	adev->psp.asd_fw = NULL; -	release_firmware(adev->psp.ta_fw); -	adev->psp.ta_fw = NULL; +	if (adev->psp.ta_fw) { +		release_firmware(adev->psp.ta_fw); +		adev->psp.ta_fw = NULL; +	}  	return 0;  } @@ -435,6 +437,9 @@ static int psp_xgmi_initialize(struct psp_context *psp)  	struct ta_xgmi_shared_memory *xgmi_cmd;  	int ret; +	if (!psp->adev->psp.ta_fw) +		return -ENOENT; +  	if (!psp->xgmi_context.initialized) {  		ret = psp_xgmi_init_shared_buf(psp);  		if (ret)  | 
