diff options
author | Ville Syrjälä <[email protected]> | 2019-03-18 18:56:30 +0200 |
---|---|---|
committer | Ville Syrjälä <[email protected]> | 2019-03-20 16:58:59 +0200 |
commit | 9e7d569924d9b9b17734789496ac78d4f7eaab7c (patch) | |
tree | 068172d6c42647b0547de265da4f11dc97f17502 | |
parent | b7c8093fac15b253cab8c1060d0d5543a8739ed0 (diff) |
drm/i915: Introduce i9xx_has_pps()
Add a small helper to determine if we have the panel power
sequencer or not. We'll make PNV an exceptional case so
that we can unset .is_mobile for the desktop variant.
Cc: Tvrtko Ursulin <[email protected]>
Signed-off-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Tvrtko Ursulin <[email protected]>
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 713d2651219e..01cdd6e745c3 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -1442,6 +1442,14 @@ static void chv_enable_pll(struct intel_crtc *crtc, } } +static bool i9xx_has_pps(struct drm_i915_private *dev_priv) +{ + if (IS_I830(dev_priv)) + return false; + + return IS_PINEVIEW(dev_priv) || IS_MOBILE(dev_priv); +} + static void i9xx_enable_pll(struct intel_crtc *crtc, const struct intel_crtc_state *crtc_state) { @@ -1453,7 +1461,7 @@ static void i9xx_enable_pll(struct intel_crtc *crtc, assert_pipe_disabled(dev_priv, crtc->pipe); /* PLL is protected by panel, make sure we can write it */ - if (IS_MOBILE(dev_priv) && !IS_I830(dev_priv)) + if (i9xx_has_pps(dev_priv)) assert_panel_unlocked(dev_priv, crtc->pipe); /* |