]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/i915: initialize gt_lock early with other spin locks
authorJani Nikula <jani.nikula@linux.intel.com>
Thu, 25 Jul 2013 09:44:34 +0000 (12:44 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 25 Jul 2013 13:39:15 +0000 (15:39 +0200)
commit 181d1b9e31c668259d3798c521672afb8edd355c
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Sun Jul 21 13:16:24 2013 +0200

    drm/i915: fix up gt init sequence fallout

moved dev_priv->gt_lock initialization after use. Do the initialization
much earlier with other spin lock initializations.

Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Cc: stable@vger.kernel.org (since the regressing patch is also cc: stable)
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_dma.c
drivers/gpu/drm/i915/intel_pm.c

index 67ec54f67afe2d7a56cbabda7800819bfee753ac..b1520682cb2315d6889e7971bd61f5e769c14d5f 100644 (file)
@@ -1498,6 +1498,7 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
        spin_lock_init(&dev_priv->irq_lock);
        spin_lock_init(&dev_priv->gpu_error.lock);
        spin_lock_init(&dev_priv->rps.lock);
+       spin_lock_init(&dev_priv->gt_lock);
        spin_lock_init(&dev_priv->backlight.lock);
        mutex_init(&dev_priv->dpio_lock);
        mutex_init(&dev_priv->rps.hw_lock);
index 6a347f54d39fd9724ac368b710abafb259ee8180..51a2a60f5bfc2b08fc2151f35e27c67477c2bf9c 100644 (file)
@@ -5497,8 +5497,6 @@ void intel_gt_init(struct drm_device *dev)
 {
        struct drm_i915_private *dev_priv = dev->dev_private;
 
-       spin_lock_init(&dev_priv->gt_lock);
-
        if (IS_VALLEYVIEW(dev)) {
                dev_priv->gt.force_wake_get = vlv_force_wake_get;
                dev_priv->gt.force_wake_put = vlv_force_wake_put;