diff options
author | Dave Airlie <airlied@redhat.com> | 2014-07-19 02:43:41 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2014-07-19 02:43:41 -0400 |
commit | c51f71679042a5f388d9580ffbede14c897f1e86 (patch) | |
tree | 517d9f80b2251c71698e3abd2a7cb977d74e56c0 /drivers/gpu/drm/i915/intel_lvds.c | |
parent | b957f457fbce30cc4901dc28f2b56f2b15dfe84a (diff) | |
parent | 7b3c29f6fd374640266d82aafe6929761469e27b (diff) |
Merge tag 'drm-intel-next-2014-07-11' of git://anongit.freedesktop.org/drm-intel into drm-next
- fbc improvements when stolen memory is tight (Ben)
- cdclk handling improvements for vlv/chv (Ville)
- proper fix for stuck primary planes on gmch platforms with cxsr (Imre&Ebgert
Eich)
- gen8 hw semaphore support (Ben)
- more execlist prep work from Oscar Mateo
- locking fixes for primary planes (Matt Roper)
- code rework to support runtime pm for dpms on hsw/bdw (Paulo, Imre & me), but
not yet enabled because some fixes from Paulo haven't made the cut
- more gpu boost tuning from Chris
- as usual piles of little things all over
* tag 'drm-intel-next-2014-07-11' of git://anongit.freedesktop.org/drm-intel: (93 commits)
drm/i915: Make the RPS interrupt generation mask handle the vlv wa
drm/i915: Move RPS evaluation interval counters to i915->rps
drm/i915: Don't cast a pointer to void* unnecessarily
drm/i915: don't read LVDS regs at compute_config time
drm/i915: check the power domains in intel_lvds_get_hw_state()
drm/i915: check the power domains in ironlake_get_pipe_config()
drm/i915: don't skip shared DPLL assertion on LPT
drm/i915: Only touch WRPLL hw state in enable/disable hooks
drm/i915: Switch to common shared dpll framework for WRPLLs
drm/i915: ->enable hook for WRPLLs
drm/i915: ->disable hook for WRPLLs
drm/i915: State readout support for WRPLLs
drm/i915: add POWER_DOMAIN_PLLS
drm/i915: Document that the pll->mode_set hook is optional
drm/i915: Basic shared dpll support for WRPLLs
drm/i915: Precompute static ddi_pll_sel values in encoders
drm/i915: BDW also has special-purpose DP DDI clocks
drm/i915: State readout and cross-checking for ddi_pll_sel
drm/i915: Move ddi_pll_sel into the pipe config
drm/i915: Add a debugfs file for the shared dpll state
...
Diffstat (limited to 'drivers/gpu/drm/i915/intel_lvds.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_lvds.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c index 4d29a83fd163..c511287bbb86 100644 --- a/drivers/gpu/drm/i915/intel_lvds.c +++ b/drivers/gpu/drm/i915/intel_lvds.c | |||
@@ -51,6 +51,7 @@ struct intel_lvds_encoder { | |||
51 | 51 | ||
52 | bool is_dual_link; | 52 | bool is_dual_link; |
53 | u32 reg; | 53 | u32 reg; |
54 | u32 a3_power; | ||
54 | 55 | ||
55 | struct intel_lvds_connector *attached_connector; | 56 | struct intel_lvds_connector *attached_connector; |
56 | }; | 57 | }; |
@@ -71,8 +72,13 @@ static bool intel_lvds_get_hw_state(struct intel_encoder *encoder, | |||
71 | struct drm_device *dev = encoder->base.dev; | 72 | struct drm_device *dev = encoder->base.dev; |
72 | struct drm_i915_private *dev_priv = dev->dev_private; | 73 | struct drm_i915_private *dev_priv = dev->dev_private; |
73 | struct intel_lvds_encoder *lvds_encoder = to_lvds_encoder(&encoder->base); | 74 | struct intel_lvds_encoder *lvds_encoder = to_lvds_encoder(&encoder->base); |
75 | enum intel_display_power_domain power_domain; | ||
74 | u32 tmp; | 76 | u32 tmp; |
75 | 77 | ||
78 | power_domain = intel_display_port_power_domain(encoder); | ||
79 | if (!intel_display_power_enabled(dev_priv, power_domain)) | ||
80 | return false; | ||
81 | |||
76 | tmp = I915_READ(lvds_encoder->reg); | 82 | tmp = I915_READ(lvds_encoder->reg); |
77 | 83 | ||
78 | if (!(tmp & LVDS_PORT_EN)) | 84 | if (!(tmp & LVDS_PORT_EN)) |
@@ -165,8 +171,11 @@ static void intel_pre_enable_lvds(struct intel_encoder *encoder) | |||
165 | 171 | ||
166 | /* It would be nice to set 24 vs 18-bit mode (LVDS_A3_POWER_UP) | 172 | /* It would be nice to set 24 vs 18-bit mode (LVDS_A3_POWER_UP) |
167 | * appropriately here, but we need to look more thoroughly into how | 173 | * appropriately here, but we need to look more thoroughly into how |
168 | * panels behave in the two modes. | 174 | * panels behave in the two modes. For now, let's just maintain the |
175 | * value we got from the BIOS. | ||
169 | */ | 176 | */ |
177 | temp &= ~LVDS_A3_POWER_MASK; | ||
178 | temp |= lvds_encoder->a3_power; | ||
170 | 179 | ||
171 | /* Set the dithering flag on LVDS as needed, note that there is no | 180 | /* Set the dithering flag on LVDS as needed, note that there is no |
172 | * special lvds dither control bit on pch-split platforms, dithering is | 181 | * special lvds dither control bit on pch-split platforms, dithering is |
@@ -264,7 +273,6 @@ static bool intel_lvds_compute_config(struct intel_encoder *intel_encoder, | |||
264 | struct intel_crtc_config *pipe_config) | 273 | struct intel_crtc_config *pipe_config) |
265 | { | 274 | { |
266 | struct drm_device *dev = intel_encoder->base.dev; | 275 | struct drm_device *dev = intel_encoder->base.dev; |
267 | struct drm_i915_private *dev_priv = dev->dev_private; | ||
268 | struct intel_lvds_encoder *lvds_encoder = | 276 | struct intel_lvds_encoder *lvds_encoder = |
269 | to_lvds_encoder(&intel_encoder->base); | 277 | to_lvds_encoder(&intel_encoder->base); |
270 | struct intel_connector *intel_connector = | 278 | struct intel_connector *intel_connector = |
@@ -279,8 +287,7 @@ static bool intel_lvds_compute_config(struct intel_encoder *intel_encoder, | |||
279 | return false; | 287 | return false; |
280 | } | 288 | } |
281 | 289 | ||
282 | if ((I915_READ(lvds_encoder->reg) & LVDS_A3_POWER_MASK) == | 290 | if (lvds_encoder->a3_power == LVDS_A3_POWER_UP) |
283 | LVDS_A3_POWER_UP) | ||
284 | lvds_bpp = 8*3; | 291 | lvds_bpp = 8*3; |
285 | else | 292 | else |
286 | lvds_bpp = 6*3; | 293 | lvds_bpp = 6*3; |
@@ -1081,6 +1088,9 @@ out: | |||
1081 | DRM_DEBUG_KMS("detected %s-link lvds configuration\n", | 1088 | DRM_DEBUG_KMS("detected %s-link lvds configuration\n", |
1082 | lvds_encoder->is_dual_link ? "dual" : "single"); | 1089 | lvds_encoder->is_dual_link ? "dual" : "single"); |
1083 | 1090 | ||
1091 | lvds_encoder->a3_power = I915_READ(lvds_encoder->reg) & | ||
1092 | LVDS_A3_POWER_MASK; | ||
1093 | |||
1084 | /* | 1094 | /* |
1085 | * Unlock registers and just | 1095 | * Unlock registers and just |
1086 | * leave them unlocked | 1096 | * leave them unlocked |