diff options
author | Rex Zhu <Rex.Zhu@amd.com> | 2017-01-20 07:30:51 +0100 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-01-27 18:20:44 +0100 |
commit | 8485b5e1876b46d7c4f63a2cfcec2ee30362a207 (patch) | |
tree | 4393ac8f7ab7cbbe2a971741ed026d5ff8497d9b | |
parent | drm/amdgpu: fix dpm bug on Kv. (diff) | |
download | linux-8485b5e1876b46d7c4f63a2cfcec2ee30362a207.tar.xz linux-8485b5e1876b46d7c4f63a2cfcec2ee30362a207.zip |
drm/amdgpu: fix kernel panic when dpm disabled on Kv.
Return early if it's disabled.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/kv_dpm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/kv_dpm.c b/drivers/gpu/drm/amd/amdgpu/kv_dpm.c index 6b6476dae970..8785ca570729 100644 --- a/drivers/gpu/drm/amd/amdgpu/kv_dpm.c +++ b/drivers/gpu/drm/amd/amdgpu/kv_dpm.c @@ -3079,6 +3079,9 @@ static int kv_dpm_hw_init(void *handle) int ret; struct amdgpu_device *adev = (struct amdgpu_device *)handle; + if (!amdgpu_dpm) + return 0; + mutex_lock(&adev->pm.mutex); kv_dpm_setup_asic(adev); ret = kv_dpm_enable(adev); |