From: Mario Limonciello mario.limonciello@amd.com
commit c760bcda83571e07b72c10d9da175db5051ed971 upstream
[Why] Not all renoir hardware supports secure display. If the TA is present but the feature isn't supported it will fail to load or send commands. This shows ERR messages to the user that make it seems like there is a problem.
[How] Check the resp_status of the context to see if there was an error before trying to send any secure display commands.
There were no code conflict when applying to 6.17.y. This backport gets rid of below error messages on AMD GPUs (per Shuah Khan's machine)
kern :err : amdgpu 0000:0b:00.0: amdgpu: Secure display: Generic Failure. amdgpu 0000:0b:00.0: amdgpu: SECUREDISPLAY: query securedisplay TA failed. ret 0x0
Compile test was done.
Reviewed-by: Alex Deucher alexander.deucher@amd.com Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/1415 Signed-off-by: Mario Limonciello mario.limonciello@amd.com Signed-off-by: Alex Deucher alexander.deucher@amd.com (cherry picked from commit c760bcda83571e07b72c10d9da175db5051ed971) Cc: stable@vger.kernel.org Signed-off-by: Adrian Yip adrian.ytw@gmail.com --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index 693357caa9a8..d9d7fc4c33cb 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c @@ -2350,7 +2350,7 @@ static int psp_securedisplay_initialize(struct psp_context *psp) }
ret = psp_ta_load(psp, &psp->securedisplay_context.context); - if (!ret) { + if (!ret && !psp->securedisplay_context.context.resp_status) { psp->securedisplay_context.context.initialized = true; mutex_init(&psp->securedisplay_context.mutex); } else