From 468edb0fcd40b82c79cc81116547996eebee3c2b Mon Sep 17 00:00:00 2001 From: Le Ma Date: Mon, 23 Sep 2019 21:09:38 +0800 Subject: [PATCH 3856/4256] drm/amdgpu: correct condition check for psp rlc autoload Otherwise non-autoload case will go into the wrong routine and fail. Change-Id: Ia91d0fb7179f6944214e892f370d7ef3d6b7d30e Signed-off-by: Le Ma Reviewed-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index 7146c29c35f1..a0c5aae2daef 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c @@ -1083,7 +1083,8 @@ static int psp_np_fw_load(struct psp_context *psp) return ret; /* Start rlc autoload after psp recieved all the gfx firmware */ - if (ucode->ucode_id == AMDGPU_UCODE_ID_RLC_RESTORE_LIST_SRM_MEM) { + if (psp->autoload_supported && ucode->ucode_id == + AMDGPU_UCODE_ID_RLC_RESTORE_LIST_SRM_MEM) { ret = psp_rlc_autoload(psp); if (ret) { DRM_ERROR("Failed to start rlc autoload\n"); -- 2.17.1