Merge tag 'drm-for-v4.15-part2' of git://people.freedesktop.org/~airlied/linux
[sfrench/cifs-2.6.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_pm.c
index a59e04f3eeba787ec29452e10a66e886038f8905..6c570d4e4516488b81cd385353b8d02c7e428912 100644 (file)
@@ -946,6 +946,10 @@ static umode_t hwmon_attributes_visible(struct kobject *kobj,
        struct amdgpu_device *adev = dev_get_drvdata(dev);
        umode_t effective_mode = attr->mode;
 
+       /* no skipping for powerplay */
+       if (adev->powerplay.cgs_device)
+               return effective_mode;
+
        /* Skip limit attributes if DPM is not enabled */
        if (!adev->pm.dpm_enabled &&
            (attr == &sensor_dev_attr_temp1_crit.dev_attr.attr ||
@@ -1466,7 +1470,7 @@ void amdgpu_pm_compute_clocks(struct amdgpu_device *adev)
                        list_for_each_entry(crtc,
                                            &ddev->mode_config.crtc_list, head) {
                                amdgpu_crtc = to_amdgpu_crtc(crtc);
-                               if (crtc->enabled) {
+                               if (amdgpu_crtc->enabled) {
                                        adev->pm.dpm.new_active_crtcs |= (1 << amdgpu_crtc->crtc_id);
                                        adev->pm.dpm.new_active_crtc_count++;
                                }