diff options
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/5214-drm-amdgpu-Update-power-state-at-the-end-of-smu-hw_i.patch')
-rw-r--r-- | common/recipes-kernel/linux/linux-yocto-4.14.71/5214-drm-amdgpu-Update-power-state-at-the-end-of-smu-hw_i.patch | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/5214-drm-amdgpu-Update-power-state-at-the-end-of-smu-hw_i.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/5214-drm-amdgpu-Update-power-state-at-the-end-of-smu-hw_i.patch new file mode 100644 index 00000000..405824df --- /dev/null +++ b/common/recipes-kernel/linux/linux-yocto-4.14.71/5214-drm-amdgpu-Update-power-state-at-the-end-of-smu-hw_i.patch @@ -0,0 +1,72 @@ +From 40b5c496cca3aa9d36c1286dd14229988f7b2dcf Mon Sep 17 00:00:00 2001 +From: Rex Zhu <Rex.Zhu@amd.com> +Date: Fri, 24 Aug 2018 16:17:54 +0800 +Subject: [PATCH 5214/5725] drm/amdgpu: Update power state at the end of smu + hw_init. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +For SI/Kv, the power state is managed by function +amdgpu_pm_compute_clocks. + +when dpm enabled, we should call amdgpu_pm_compute_clocks +to update current power state instand of set boot state. + +this change can fix the oops when kfd driver was enabled on Kv. + +Reviewed-by: Alex Deucher <alexander.deucher@amd.com> +Tested-by: Michel Dänzer <michel.daenzer@amd.com> +Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> +Signed-off-by: Alex Deucher <alexander.deucher@amd.com> +--- + drivers/gpu/drm/amd/amdgpu/kv_dpm.c | 4 +--- + drivers/gpu/drm/amd/amdgpu/si_dpm.c | 3 +-- + 2 files changed, 2 insertions(+), 5 deletions(-) + +diff --git a/drivers/gpu/drm/amd/amdgpu/kv_dpm.c b/drivers/gpu/drm/amd/amdgpu/kv_dpm.c +index c243e22..0290a49 100644 +--- a/drivers/gpu/drm/amd/amdgpu/kv_dpm.c ++++ b/drivers/gpu/drm/amd/amdgpu/kv_dpm.c +@@ -1353,8 +1353,6 @@ static int kv_dpm_enable(struct amdgpu_device *adev) + return ret; + } + +- kv_update_current_ps(adev, adev->pm.dpm.boot_ps); +- + if (adev->irq.installed && + amdgpu_is_internal_thermal_sensor(adev->pm.int_thermal_type)) { + ret = kv_set_thermal_temperature_range(adev, KV_TEMP_RANGE_MIN, KV_TEMP_RANGE_MAX); +@@ -3068,7 +3066,7 @@ static int kv_dpm_hw_init(void *handle) + else + adev->pm.dpm_enabled = true; + mutex_unlock(&adev->pm.mutex); +- ++ amdgpu_pm_compute_clocks(adev); + return ret; + } + +diff --git a/drivers/gpu/drm/amd/amdgpu/si_dpm.c b/drivers/gpu/drm/amd/amdgpu/si_dpm.c +index a32f6f6..9f7e63b 100644 +--- a/drivers/gpu/drm/amd/amdgpu/si_dpm.c ++++ b/drivers/gpu/drm/amd/amdgpu/si_dpm.c +@@ -6887,7 +6887,6 @@ static int si_dpm_enable(struct amdgpu_device *adev) + + si_enable_auto_throttle_source(adev, AMDGPU_DPM_AUTO_THROTTLE_SRC_THERMAL, true); + si_thermal_start_thermal_controller(adev); +- ni_update_current_ps(adev, boot_ps); + + return 0; + } +@@ -7760,7 +7759,7 @@ static int si_dpm_hw_init(void *handle) + else + adev->pm.dpm_enabled = true; + mutex_unlock(&adev->pm.mutex); +- ++ amdgpu_pm_compute_clocks(adev); + return ret; + } + +-- +2.7.4 + |