drm/amd/pp: Skip fan attributes if fan not present
[sfrench/cifs-2.6.git] / drivers / gpu / drm / amd / powerplay / hwmgr / hwmgr.c
index eecb11824412fb01464c2e363e45b289884b82c0..71b42331f1851493f21a8c6afd5407835f6d878b 100644 (file)
@@ -229,6 +229,9 @@ int hwmgr_hw_init(struct pp_hwmgr *hwmgr)
        if (ret)
                goto err;
 
+       ((struct amdgpu_device *)hwmgr->adev)->pm.no_fan =
+                               hwmgr->thermal_controller.fanInfo.bNoFan;
+
        ret = hwmgr->hwmgr_func->backend_init(hwmgr);
        if (ret)
                goto err1;