]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/i915: WARN if !HAS_PC8 when enabling/disabling PC8
authorPaulo Zanoni <paulo.r.zanoni@intel.com>
Thu, 21 Nov 2013 15:47:15 +0000 (13:47 -0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 10 Dec 2013 21:26:33 +0000 (22:26 +0100)
We already have some checks and shouldn't be reaching these places on
!HAS_PC8 platforms, but add a WARN,  just in case.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c

index 10a803f6936002fa40d5201157d398c0d83f840a..895759b5569fc68aaf6b56f8826d874617df3c67 100644 (file)
@@ -6638,6 +6638,8 @@ void hsw_enable_pc8_work(struct work_struct *__work)
        struct drm_device *dev = dev_priv->dev;
        uint32_t val;
 
+       WARN_ON(!HAS_PC8(dev));
+
        if (dev_priv->pc8.enabled)
                return;
 
@@ -6683,6 +6685,8 @@ static void __hsw_disable_package_c8(struct drm_i915_private *dev_priv)
        if (dev_priv->pc8.disable_count != 1)
                return;
 
+       WARN_ON(!HAS_PC8(dev));
+
        cancel_delayed_work_sync(&dev_priv->pc8.enable_work);
        if (!dev_priv->pc8.enabled)
                return;