drm/amdgpu: disallow direct upload save restore list from gfx driver
authorHawking Zhang <Hawking.Zhang@amd.com>
Mon, 4 Nov 2019 08:20:06 +0000 (16:20 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 31 Dec 2019 15:44:58 +0000 (16:44 +0100)
commit16cee216caa1bebc30f2cfde50d7a587e279d438
treebd249ead5bc2ad91dcdaf40183a5afdd58c51d6b
parent07e9503a23913439124fc056ffe12538a1311b65
drm/amdgpu: disallow direct upload save restore list from gfx driver

[ Upstream commit 58f46d4b65021083ef4b4d49c6e2c58e5783f626 ]

Direct uploading save/restore list via mmio register writes breaks the security
policy. Instead, the driver should pass s&r list to psp.

For all the ASICs that use rlc v2_1 headers, the driver actually upload s&r list
twice, in non-psp ucode front door loading phase and gfx pg initialization phase.
The latter is not allowed.

VG12 is the only exception where the driver still keeps legacy approach for S&R
list uploading. In theory, this can be elimnated if we have valid srcntl ucode
for VG12.

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Candice Li <Candice.Li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c