diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4345-drm-amdgpu-disallow-direct-upload-save-restore-list-.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4345-drm-amdgpu-disallow-direct-upload-save-restore-list-.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4345-drm-amdgpu-disallow-direct-upload-save-restore-list-.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4345-drm-amdgpu-disallow-direct-upload-save-restore-list-.patch new file mode 100644 index 00000000..538b953e --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4345-drm-amdgpu-disallow-direct-upload-save-restore-list-.patch @@ -0,0 +1,41 @@ +From d20cea67111506f14662640c257bf93c30900acf Mon Sep 17 00:00:00 2001 +From: Hawking Zhang <Hawking.Zhang@amd.com> +Date: Mon, 4 Nov 2019 16:20:06 +0800 +Subject: [PATCH 4345/4736] drm/amdgpu: disallow direct upload save restore + list from gfx driver + +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. + +Change-Id: I8cc8e0126f746aae43b9114e05bc111ee7b23531 +Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com> +Reviewed-by: Candice Li <Candice.Li@amd.com> +--- + drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +index 005f4d0d2484..d521facadf59 100644 +--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c ++++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +@@ -2728,7 +2728,8 @@ static void gfx_v9_0_init_pg(struct amdgpu_device *adev) + * And it's needed by gfxoff feature. + */ + if (adev->gfx.rlc.is_rlc_v2_1) { +- gfx_v9_1_init_rlc_save_restore_list(adev); ++ if (adev->asic_type == CHIP_VEGA12) ++ gfx_v9_1_init_rlc_save_restore_list(adev); + gfx_v9_0_enable_save_restore_machine(adev); + } + +-- +2.17.1 + |