From: Paulo Zanoni Date: Thu, 21 Nov 2013 15:47:15 +0000 (-0200) Subject: drm/i915: WARN if !HAS_PC8 when enabling/disabling PC8 X-Git-Tag: MMI-PSA29.97-13-9~12830^2~44^2~40 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7125ecb8297a122d60b2b4be9490f49bfadff8e0;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git drm/i915: WARN if !HAS_PC8 when enabling/disabling PC8 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 Reviewed-by: Rodrigo Vivi Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 10a803f69360..895759b5569f 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -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;