diff options
author | Dave Airlie <airlied@gmail.com> | 2012-09-21 06:46:01 -0400 |
---|---|---|
committer | Dave Airlie <airlied@gmail.com> | 2012-09-21 06:46:01 -0400 |
commit | 017a27e7f52346ca8de6fc776579fbcc8ea55b48 (patch) | |
tree | a9e3906f6c967a27852c056a150147f71cf37190 /drivers | |
parent | 6c06d608ec244d9b030f16ce9088b4456197e1cb (diff) | |
parent | b98b60167279df3acac9422c3c9820d9ebbcf9fb (diff) |
Merge branch 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel into drm-fixes
Daniel writes:
Essentially just flush my -fixes queue before I head off to xdc.
- gen2 regression fixer, we've enabled the lvds stuff too late. Not
causing any known issues, but this restores the sequence before a
refactor that landed in 3.5, and lvds is a fickle beast. And seriously,
who runs gen2 still ...
- downgrade a BUG to a WARN - we haven't root-caused/fixed the underlying
issue yet, but this should help bug reporters quite a bit.
- properly disable hdmi audio - we've lost track of this, which resulted
in the alsa driver again losing track of the unplug event.
* 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel:
drm/i915: HDMI - Clear Audio Enable bit for Hot Plug
drm/i915: Reduce a pin-leak BUG into a WARN
drm/i915: enable lvds pin pairs before dpll on gen2
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 12 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_hdmi.c | 2 |
3 files changed, 9 insertions, 8 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 489e2b162b27..274d25de521e 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -3242,7 +3242,8 @@ i915_gem_object_pin(struct drm_i915_gem_object *obj, | |||
3242 | { | 3242 | { |
3243 | int ret; | 3243 | int ret; |
3244 | 3244 | ||
3245 | BUG_ON(obj->pin_count == DRM_I915_GEM_OBJECT_MAX_PIN_COUNT); | 3245 | if (WARN_ON(obj->pin_count == DRM_I915_GEM_OBJECT_MAX_PIN_COUNT)) |
3246 | return -EBUSY; | ||
3246 | 3247 | ||
3247 | if (obj->gtt_space != NULL) { | 3248 | if (obj->gtt_space != NULL) { |
3248 | if ((alignment && obj->gtt_offset & (alignment - 1)) || | 3249 | if ((alignment && obj->gtt_offset & (alignment - 1)) || |
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index bc2ad348e5d8..c040aee1341c 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -4191,12 +4191,6 @@ static void i8xx_update_pll(struct drm_crtc *crtc, | |||
4191 | POSTING_READ(DPLL(pipe)); | 4191 | POSTING_READ(DPLL(pipe)); |
4192 | udelay(150); | 4192 | udelay(150); |
4193 | 4193 | ||
4194 | I915_WRITE(DPLL(pipe), dpll); | ||
4195 | |||
4196 | /* Wait for the clocks to stabilize. */ | ||
4197 | POSTING_READ(DPLL(pipe)); | ||
4198 | udelay(150); | ||
4199 | |||
4200 | /* The LVDS pin pair needs to be on before the DPLLs are enabled. | 4194 | /* The LVDS pin pair needs to be on before the DPLLs are enabled. |
4201 | * This is an exception to the general rule that mode_set doesn't turn | 4195 | * This is an exception to the general rule that mode_set doesn't turn |
4202 | * things on. | 4196 | * things on. |
@@ -4204,6 +4198,12 @@ static void i8xx_update_pll(struct drm_crtc *crtc, | |||
4204 | if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) | 4198 | if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) |
4205 | intel_update_lvds(crtc, clock, adjusted_mode); | 4199 | intel_update_lvds(crtc, clock, adjusted_mode); |
4206 | 4200 | ||
4201 | I915_WRITE(DPLL(pipe), dpll); | ||
4202 | |||
4203 | /* Wait for the clocks to stabilize. */ | ||
4204 | POSTING_READ(DPLL(pipe)); | ||
4205 | udelay(150); | ||
4206 | |||
4207 | /* The pixel multiplier can only be updated once the | 4207 | /* The pixel multiplier can only be updated once the |
4208 | * DPLL is enabled and the clocks are stable. | 4208 | * DPLL is enabled and the clocks are stable. |
4209 | * | 4209 | * |
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c index 98f602427eb8..12dc3308ab8c 100644 --- a/drivers/gpu/drm/i915/intel_hdmi.c +++ b/drivers/gpu/drm/i915/intel_hdmi.c | |||
@@ -609,7 +609,7 @@ static void intel_hdmi_dpms(struct drm_encoder *encoder, int mode) | |||
609 | u32 temp; | 609 | u32 temp; |
610 | u32 enable_bits = SDVO_ENABLE; | 610 | u32 enable_bits = SDVO_ENABLE; |
611 | 611 | ||
612 | if (intel_hdmi->has_audio) | 612 | if (intel_hdmi->has_audio || mode != DRM_MODE_DPMS_ON) |
613 | enable_bits |= SDVO_AUDIO_ENABLE; | 613 | enable_bits |= SDVO_AUDIO_ENABLE; |
614 | 614 | ||
615 | temp = I915_READ(intel_hdmi->sdvox_reg); | 615 | temp = I915_READ(intel_hdmi->sdvox_reg); |