drm/i915: Cannot set clock gating under UMS
authorKeith Packard <keithp@keithp.com>
Sat, 13 Aug 2011 00:07:18 +0000 (17:07 -0700)
committerKeith Packard <keithp@keithp.com>
Mon, 15 Aug 2011 19:10:27 +0000 (12:10 -0700)
The clock gating functions are only assigned under KMS, so don't try
to call them under UMS.

Signed-off-by: Keith Packard <keithp@keithp.com>
Tested-by: Justin P. Mattock <justinmattock@gmail.com>
drivers/gpu/drm/i915/i915_suspend.c

index 87677d60d0df21758b9a70c51e5f23388e21a5e6..f10742359ec9a1f6d6f03ec248cefcd78a85254a 100644 (file)
@@ -871,7 +871,8 @@ int i915_restore_state(struct drm_device *dev)
        }
        mutex_unlock(&dev->struct_mutex);
 
-       intel_init_clock_gating(dev);
+       if (drm_core_check_feature(dev, DRIVER_MODESET))
+               intel_init_clock_gating(dev);
 
        if (IS_IRONLAKE_M(dev)) {
                ironlake_enable_drps(dev);