aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.19.8/0137-drm-amdgpu-Fix-NULL-pointer-when-PP-block-is-disable.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/0137-drm-amdgpu-Fix-NULL-pointer-when-PP-block-is-disable.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.19.8/0137-drm-amdgpu-Fix-NULL-pointer-when-PP-block-is-disable.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/0137-drm-amdgpu-Fix-NULL-pointer-when-PP-block-is-disable.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/0137-drm-amdgpu-Fix-NULL-pointer-when-PP-block-is-disable.patch
new file mode 100644
index 00000000..8316eeae
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/0137-drm-amdgpu-Fix-NULL-pointer-when-PP-block-is-disable.patch
@@ -0,0 +1,44 @@
+From 2ee2b9a86bd19e5172bccd1c3d8cfca221b2ae2a Mon Sep 17 00:00:00 2001
+From: Shaoyun Liu <Shaoyun.Liu@amd.com>
+Date: Wed, 14 Mar 2018 14:44:58 -0400
+Subject: [PATCH 0137/2940] drm/amdgpu: Fix NULL pointer when PP block is
+ disabled
+
+When PP block is disabled, return a fix value(100M) for mclk and sclk
+on bare-metal mode, This will cover the emulation mode as well.
+
+Change-Id: If34e3517b6cb6f31e898bbe7921485fbddb79fb9
+Signed-off-by: Shaoyun Liu <Shaoyun.Liu@amd.com>
+Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+index 910c1c1a4b73..7630e1fab9bd 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+@@ -2594,7 +2594,8 @@ static void amdgpu_inc_compute_vms(struct amdgpu_device *adev)
+ if ((adev->vm_manager.n_compute_vms++ == 0) &&
+ (!amdgpu_sriov_vf(adev))) {
+ /* First Compute VM: enable compute power profile */
+- if (adev->powerplay.pp_funcs->switch_power_profile)
++ if (adev->powerplay.pp_funcs &&
++ adev->powerplay.pp_funcs->switch_power_profile)
+ amdgpu_dpm_switch_power_profile(adev,
+ PP_SMC_POWER_PROFILE_COMPUTE, true);
+ }
+@@ -2879,7 +2880,8 @@ void amdgpu_vm_fini(struct amdgpu_device *adev, struct amdgpu_vm *vm)
+ if ((--adev->vm_manager.n_compute_vms == 0) &&
+ (!amdgpu_sriov_vf(adev))) {
+ /* Last KFD VM: enable graphics power profile */
+- if (adev->powerplay.pp_funcs->switch_power_profile)
++ if (adev->powerplay.pp_funcs &&
++ adev->powerplay.pp_funcs->switch_power_profile)
+ amdgpu_dpm_switch_power_profile(adev,
+ PP_SMC_POWER_PROFILE_COMPUTE, true);
+ }
+--
+2.17.1
+