Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 307458
b: refs/heads/master
c: 48da64a
h: refs/heads/master
v: v3
  • Loading branch information
Chris Wilson authored and Daniel Vetter committed May 19, 2012
1 parent 68385a5 commit 868a0c8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a9dcf84b14ef4e9a609910367576995e6f32f3dc
refs/heads/master: 48da64a8bf2e00952fcd3ad108babae5e003a03d
21 changes: 15 additions & 6 deletions trunk/drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -1403,14 +1403,18 @@ intel_sbi_read(struct drm_i915_private *dev_priv, u16 reg)
static void intel_enable_pch_pll(struct intel_crtc *intel_crtc)
{
struct drm_i915_private *dev_priv = intel_crtc->base.dev->dev_private;
struct intel_pch_pll *pll = intel_crtc->pch_pll;
struct intel_pch_pll *pll;
int reg;
u32 val;

/* PCH only available on ILK+ */
/* PCH PLLs only available on ILK, SNB and IVB */
BUG_ON(dev_priv->info->gen < 5);
BUG_ON(pll == NULL);
BUG_ON(pll->refcount == 0);
pll = intel_crtc->pch_pll;
if (pll == NULL)
return;

if (WARN_ON(pll->refcount == 0))
return;

DRM_DEBUG_KMS("enable PCH PLL %x (active %d, on? %d)for crtc %d\n",
pll->pll_reg, pll->active, pll->on,
Expand Down Expand Up @@ -1448,13 +1452,18 @@ static void intel_disable_pch_pll(struct intel_crtc *intel_crtc)
if (pll == NULL)
return;

BUG_ON(pll->refcount == 0);
if (WARN_ON(pll->refcount == 0))
return;

DRM_DEBUG_KMS("disable PCH PLL %x (active %d, on? %d) for crtc %d\n",
pll->pll_reg, pll->active, pll->on,
intel_crtc->base.base.id);

BUG_ON(pll->active == 0);
if (WARN_ON(pll->active == 0)) {
assert_pch_pll_disabled(dev_priv, intel_crtc);
return;
}

if (--pll->active) {
assert_pch_pll_enabled(dev_priv, intel_crtc);
return;
Expand Down

0 comments on commit 868a0c8

Please sign in to comment.