]> git.hungrycats.org Git - linux/commitdiff
drm/amdgpu: add missing dpm check for KV dpm late init
authorAlex Deucher <alexander.deucher@amd.com>
Mon, 19 Oct 2015 19:54:21 +0000 (15:54 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Nov 2015 22:37:33 +0000 (14:37 -0800)
commit 677c884ff6370add1360e2b9558285355ebe2b36 upstream.

Skip dpm late init if dpm is disabled.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/amdgpu/kv_dpm.c

index 9745ed3a9aef866443e269022142c52ec3fc3d65..7e9154c7f1dbbb7f9d3eee6791c0e4fcc835ea8d 100644 (file)
@@ -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)