diff options
author | Keith Packard <keithp@keithp.com> | 2008-11-18 12:30:25 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2008-11-24 18:49:03 -0500 |
commit | 52440211dcdc52c0b757f8b34d122e11b12cdd50 (patch) | |
tree | 5ad9c526134d046043b04ee56fb34d428a03c890 /drivers/gpu/drm/i915/i915_dma.c | |
parent | 6133047aa64d2fd5b3b79dff74f696ded45615b2 (diff) |
drm: move drm vblank initialization/cleanup to driver load/unload
drm vblank initialization keeps track of the changes in driver-supplied
frame counts across vt switch and mode setting, but only if you let it by
not tearing down the drm vblank structure.
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_dma.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_dma.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 0d215e38606a..ba89b42f790a 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c | |||
@@ -856,6 +856,13 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags) | |||
856 | 856 | ||
857 | spin_lock_init(&dev_priv->user_irq_lock); | 857 | spin_lock_init(&dev_priv->user_irq_lock); |
858 | 858 | ||
859 | ret = drm_vblank_init(dev, I915_NUM_PIPE); | ||
860 | |||
861 | if (ret) { | ||
862 | (void) i915_driver_unload(dev); | ||
863 | return ret; | ||
864 | } | ||
865 | |||
859 | return ret; | 866 | return ret; |
860 | } | 867 | } |
861 | 868 | ||