Commit 8485b5e1 authored by Rex Zhu's avatar Rex Zhu Committed by Alex Deucher
Browse files

drm/amdgpu: fix kernel panic when dpm disabled on Kv.



Return early if it's disabled.

Signed-off-by: default avatarRex Zhu <Rex.Zhu@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 36a94a8a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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);