提交 7125ecb8 编写于 作者: P Paulo Zanoni 提交者: Daniel Vetter

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: NPaulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: NRodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
上级 8212d563
...@@ -6638,6 +6638,8 @@ void hsw_enable_pc8_work(struct work_struct *__work) ...@@ -6638,6 +6638,8 @@ void hsw_enable_pc8_work(struct work_struct *__work)
struct drm_device *dev = dev_priv->dev; struct drm_device *dev = dev_priv->dev;
uint32_t val; uint32_t val;
WARN_ON(!HAS_PC8(dev));
if (dev_priv->pc8.enabled) if (dev_priv->pc8.enabled)
return; return;
...@@ -6683,6 +6685,8 @@ static void __hsw_disable_package_c8(struct drm_i915_private *dev_priv) ...@@ -6683,6 +6685,8 @@ static void __hsw_disable_package_c8(struct drm_i915_private *dev_priv)
if (dev_priv->pc8.disable_count != 1) if (dev_priv->pc8.disable_count != 1)
return; return;
WARN_ON(!HAS_PC8(dev));
cancel_delayed_work_sync(&dev_priv->pc8.enable_work); cancel_delayed_work_sync(&dev_priv->pc8.enable_work);
if (!dev_priv->pc8.enabled) if (!dev_priv->pc8.enabled)
return; return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册