diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3909-drm-amd-powerplay-A-workaround-to-GPU-RESET-on-APU.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3909-drm-amd-powerplay-A-workaround-to-GPU-RESET-on-APU.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3909-drm-amd-powerplay-A-workaround-to-GPU-RESET-on-APU.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3909-drm-amd-powerplay-A-workaround-to-GPU-RESET-on-APU.patch new file mode 100644 index 00000000..9f3882a2 --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3909-drm-amd-powerplay-A-workaround-to-GPU-RESET-on-APU.patch @@ -0,0 +1,38 @@ +From 40a7aa9c083a0259bd1fc9e2217932b89ab94187 Mon Sep 17 00:00:00 2001 +From: chen gong <curry.gong@amd.com> +Date: Mon, 23 Sep 2019 15:02:56 +0800 +Subject: [PATCH 3909/4256] drm/amd/powerplay: A workaround to GPU RESET on APU + +Changes to function "smu_suspend" in amdgpu_smu.c is a workaround. + +We should get real information about if baco is enabled or not, while we +always consider APU SMU feature as enabled in current code. + +I know APU do not support baco mode for GPU reset, so I use +"adev->flags" to skip function "smu_feature_is_enabled". + +Signed-off-by: chen gong <curry.gong@amd.com> +Reviewed-by: Aaron Liu <aaron.liu@amd.com> +--- + drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c +index b3025bd0ea88..0237e4d06aca 100644 +--- a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c ++++ b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c +@@ -1363,7 +1363,10 @@ static int smu_suspend(void *handle) + int ret; + struct amdgpu_device *adev = (struct amdgpu_device *)handle; + struct smu_context *smu = &adev->smu; +- bool baco_feature_is_enabled = smu_feature_is_enabled(smu, SMU_FEATURE_BACO_BIT); ++ bool baco_feature_is_enabled = false; ++ ++ if(!(adev->flags & AMD_IS_APU)) ++ baco_feature_is_enabled = smu_feature_is_enabled(smu, SMU_FEATURE_BACO_BIT); + + ret = smu_system_features_control(smu, false); + if (ret) +-- +2.17.1 + |