Skip to content

Commit

Permalink
drm/i915: WARN if !HAS_PC8 when enabling/disabling PC8
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paulo Zanoni authored and Daniel Vetter committed Dec 10, 2013
1 parent 8212d56 commit 7125ecb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 7125ecb

Please sign in to comment.