]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915: remove extraneous VGA power domain put calls
authorImre Deak <imre.deak@intel.com>
Fri, 25 Apr 2014 14:28:00 +0000 (17:28 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 5 May 2014 07:09:17 +0000 (09:09 +0200)
In recent dmesg logs reported for unrelated issues I noticed some power
domain WARNs caused by the following.

The workaround

commit 0c7d32007fe81ae0b1935a3217f645f429ae2c97
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date:   Fri Sep 20 10:14:23 2013 +0300

    drm/i915: Fix unclaimed register access due to delayed VGA memory disable

and following fixup of it

commit 67e5983457f8a378fc32817399ccab02b7801432
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date:   Mon Sep 16 17:38:34 2013 +0300

    drm/i915: Move power well init earlier during driver load

was partially reverted by

commit 23efd1cc078dedb4cb18bc410f2cfdbe7e500ed7
Merge: ad8e53f aeade29
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Mon Nov 4 16:28:47 2013 +0100

    Merge tag 'v3.12' into drm-intel-next

but kept the power domain put calls on the error path.

I think for now we can keep things as-is (not reintroduce the w/a) and just fix
the error path, since
- nobody complained seeing this issue
- according to Ville someone is reworking the VGA arbitration scheme at the
  moment and when that's ready we have to rethink this part anyway

So fix this by just removing the put calls from the error path as well.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_dma.c

index 66e4ba1a16c17a74737361e3aeafff2fa16242af..d02c8de4bd6c5b49a8675016d6b046c6d6f31b66 100644 (file)
@@ -1340,7 +1340,7 @@ static int i915_load_modeset_init(struct drm_device *dev)
 
        ret = i915_gem_init(dev);
        if (ret)
-               goto cleanup_power;
+               goto cleanup_irq;
 
        INIT_WORK(&dev_priv->console_resume_work, intel_console_resume);
 
@@ -1349,10 +1349,8 @@ static int i915_load_modeset_init(struct drm_device *dev)
        /* Always safe in the mode setting case. */
        /* FIXME: do pre/post-mode set stuff in core KMS code */
        dev->vblank_disable_allowed = true;
-       if (INTEL_INFO(dev)->num_pipes == 0) {
-               intel_display_power_put(dev_priv, POWER_DOMAIN_VGA);
+       if (INTEL_INFO(dev)->num_pipes == 0)
                return 0;
-       }
 
        ret = intel_fbdev_init(dev);
        if (ret)
@@ -1387,8 +1385,7 @@ cleanup_gem:
        mutex_unlock(&dev->struct_mutex);
        WARN_ON(dev_priv->mm.aliasing_ppgtt);
        drm_mm_takedown(&dev_priv->gtt.base.mm);
-cleanup_power:
-       intel_display_power_put(dev_priv, POWER_DOMAIN_VGA);
+cleanup_irq:
        drm_irq_uninstall(dev);
 cleanup_gem_stolen:
        i915_gem_cleanup_stolen(dev);