drm/i915: kill pc8.disable_count
authorPaulo Zanoni <paulo.r.zanoni@intel.com>
Fri, 7 Mar 2014 23:08:09 +0000 (20:08 -0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 19 Mar 2014 15:39:00 +0000 (16:39 +0100)
Since after the latest patches it's only being used to prevent
getting/putting the runtime PM refcount.

Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_debugfs.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_pm.c

index 02545ebf0dace82ce7f8f391050a403bb8e09aff..4960bf62961520cd5d23a7e39b0a9331b44cc182 100644 (file)
@@ -2014,7 +2014,6 @@ static int i915_pc8_status(struct seq_file *m, void *unused)
 
        mutex_lock(&dev_priv->pc8.lock);
        seq_printf(m, "GPU idle: %s\n", yesno(!dev_priv->mm.busy));
-       seq_printf(m, "Disable count: %d\n", dev_priv->pc8.disable_count);
        seq_printf(m, "IRQs disabled: %s\n",
                   yesno(dev_priv->pc8.irqs_disabled));
        seq_printf(m, "Enabled: %s\n", yesno(dev_priv->pc8.enabled));
index 7f86c3123c6eec18e4678e14b1a12f183ec23d46..41efb09282ae4100e3b4b595803df4b48c2c2c24 100644 (file)
@@ -1393,7 +1393,6 @@ struct i915_package_c8 {
        bool irqs_disabled;
        /* Only true after the delayed work task actually enables it. */
        bool enabled;
-       int disable_count;
        struct mutex lock;
 
        struct {
index a61efbfc81af5b1f105d99ccb7849431740b936a..1e1cdcf9cc3c054b5bf86b7110ee8f9b5cf71976 100644 (file)
@@ -7049,13 +7049,6 @@ void __hsw_do_enable_pc8(struct drm_i915_private *dev_priv)
 static void __hsw_enable_package_c8(struct drm_i915_private *dev_priv)
 {
        WARN_ON(!mutex_is_locked(&dev_priv->pc8.lock));
-       WARN(dev_priv->pc8.disable_count < 1,
-            "pc8.disable_count: %d\n", dev_priv->pc8.disable_count);
-
-       dev_priv->pc8.disable_count--;
-       if (dev_priv->pc8.disable_count != 0)
-               return;
-
        intel_runtime_pm_put(dev_priv);
 }
 
@@ -7089,13 +7082,6 @@ void __hsw_do_disable_pc8(struct drm_i915_private *dev_priv)
 static void __hsw_disable_package_c8(struct drm_i915_private *dev_priv)
 {
        WARN_ON(!mutex_is_locked(&dev_priv->pc8.lock));
-       WARN(dev_priv->pc8.disable_count < 0,
-            "pc8.disable_count: %d\n", dev_priv->pc8.disable_count);
-
-       dev_priv->pc8.disable_count++;
-       if (dev_priv->pc8.disable_count != 1)
-               return;
-
        intel_runtime_pm_get(dev_priv);
 }
 
index 6de0c239633727422ab98ecdc91d18b1a1de4a76..cc929d2a32442eaa22aba38b9526e585e7784ef0 100644 (file)
@@ -6165,7 +6165,6 @@ void intel_pm_setup(struct drm_device *dev)
        mutex_init(&dev_priv->pc8.lock);
        dev_priv->pc8.irqs_disabled = false;
        dev_priv->pc8.enabled = false;
-       dev_priv->pc8.disable_count = 0;
        INIT_DELAYED_WORK(&dev_priv->rps.delayed_resume_work,
                          intel_gen6_powersave_work);
 }