drm/amdgpu: avoid upload corrupted ta ucode to psp
authorHawking Zhang <Hawking.Zhang@amd.com>
Mon, 11 Nov 2019 04:26:36 +0000 (12:26 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 11 Nov 2019 22:38:13 +0000 (17:38 -0500)
commit51bd363857c09fb9ef3cd3bbf972aeecf43c0ff8
treed7882a477a4be5326ec62ab68e93e0d6ad87a7e9
parent53dbc27ad5a93932ff1892a8e4ef266827d74a0f
drm/amdgpu: avoid upload corrupted ta ucode to psp

xgmi, ras, hdcp and dtm ta are actually separated ucode and
need to handled case by case to upload to psp.

We support the case that ta binary have one or multiple of
them built-in. As a result, the driver should check each ta
binariy's availablity before decide to upload them to psp.

In the terminate (unload) case, the driver will check the
context readiness before perform unload activity. It's fine
to keep it as is.

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Le Ma <Le.Ma@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c