提交 31811cf0 编写于 作者: H Hawking Zhang 提交者: Yang Yingliang

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: NHawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: NCandice Li <Candice.Li@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 bba24d96
...@@ -2187,6 +2187,7 @@ static void gfx_v9_0_init_pg(struct amdgpu_device *adev) ...@@ -2187,6 +2187,7 @@ static void gfx_v9_0_init_pg(struct amdgpu_device *adev)
* And it's needed by gfxoff feature. * And it's needed by gfxoff feature.
*/ */
if (adev->gfx.rlc.is_rlc_v2_1) { if (adev->gfx.rlc.is_rlc_v2_1) {
if (adev->asic_type == CHIP_VEGA12)
gfx_v9_1_init_rlc_save_restore_list(adev); gfx_v9_1_init_rlc_save_restore_list(adev);
gfx_v9_0_enable_save_restore_machine(adev); gfx_v9_0_enable_save_restore_machine(adev);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册