From: Alex Deucher Date: Mon, 19 Oct 2015 19:54:21 +0000 (-0400) Subject: drm/amdgpu: add missing dpm check for KV dpm late init X-Git-Tag: v4.2.6~72 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bae606df3068a63d785a05542622a43156bdec5d;p=thirdparty%2Fkernel%2Fstable.git drm/amdgpu: add missing dpm check for KV dpm late init commit 677c884ff6370add1360e2b9558285355ebe2b36 upstream. Skip dpm late init if dpm is disabled. Signed-off-by: Alex Deucher Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/gpu/drm/amd/amdgpu/kv_dpm.c b/drivers/gpu/drm/amd/amdgpu/kv_dpm.c index 9745ed3a9aef8..7e9154c7f1dbb 100644 --- a/drivers/gpu/drm/amd/amdgpu/kv_dpm.c +++ b/drivers/gpu/drm/amd/amdgpu/kv_dpm.c @@ -2997,6 +2997,9 @@ static int kv_dpm_late_init(void *handle) struct amdgpu_device *adev = (struct amdgpu_device *)handle; int ret; + if (!amdgpu_dpm) + return 0; + /* init the sysfs and debugfs files late */ ret = amdgpu_pm_sysfs_init(adev); if (ret)