drm/i915: Can't do accurate vblank timestamps with UMS
authorKeith Packard <keithp@keithp.com>
Sat, 13 Aug 2011 00:05:54 +0000 (17:05 -0700)
committerKeith Packard <keithp@keithp.com>
Mon, 15 Aug 2011 19:10:26 +0000 (12:10 -0700)
Disable this feature when KMS is not running by setting the
driver->get_vblank_timestamp function pointer to NULL.

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

index 02f96fd0d52dbea419cf575184196de2bbe66eb0..9cbb0cd8f46ae8ffc4e60a2fb90dde7867e112a3 100644 (file)
@@ -2058,8 +2058,10 @@ void intel_irq_init(struct drm_device *dev)
                dev->driver->get_vblank_counter = gm45_get_vblank_counter;
        }
 
-
-       dev->driver->get_vblank_timestamp = i915_get_vblank_timestamp;
+       if (drm_core_check_feature(dev, DRIVER_MODESET))
+               dev->driver->get_vblank_timestamp = i915_get_vblank_timestamp;
+       else
+               dev->driver->get_vblank_timestamp = NULL;
        dev->driver->get_scanout_position = i915_get_crtc_scanoutpos;
 
        if (IS_IVYBRIDGE(dev)) {