diff options
author | Dave Airlie <airlied@redhat.com> | 2014-10-30 16:54:10 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2014-10-30 16:54:10 -0400 |
commit | 8d1806aa7000bac6c52d642cf91a2f4b0d7b3fff (patch) | |
tree | cd2ff08d03be94f7caa911e83c3e6175cee215de | |
parent | 30aad89ad0697028b9aa0867b3e95cc0ccca064d (diff) | |
parent | 7809a61176b385ebb3299ea43c58b1bb31ffb8c0 (diff) |
Merge tag 'drm-intel-fixes-2014-10-30' of git://anongit.freedesktop.org/drm-intel into drm-fixes
bunch of DP fixes, and some backlight fix.
* tag 'drm-intel-fixes-2014-10-30' of git://anongit.freedesktop.org/drm-intel:
drm/i915/dp: only use training pattern 3 on platforms that support it
drm/i915: Ignore VBT backlight check on Macbook 2, 1
drm/i915: Fix GMBUSFREQ on vlv/chv
drm/i915: Ignore long hpds on eDP ports
drm/i915: Do a dummy DPCD read before the actual read
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 5 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_dp.c | 24 |
2 files changed, 26 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index c9e220963a78..f0a1a56406eb 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -4585,7 +4585,7 @@ static void vlv_update_cdclk(struct drm_device *dev) | |||
4585 | * BSpec erroneously claims we should aim for 4MHz, but | 4585 | * BSpec erroneously claims we should aim for 4MHz, but |
4586 | * in fact 1MHz is the correct frequency. | 4586 | * in fact 1MHz is the correct frequency. |
4587 | */ | 4587 | */ |
4588 | I915_WRITE(GMBUSFREQ_VLV, dev_priv->vlv_cdclk_freq); | 4588 | I915_WRITE(GMBUSFREQ_VLV, DIV_ROUND_UP(dev_priv->vlv_cdclk_freq, 1000)); |
4589 | } | 4589 | } |
4590 | 4590 | ||
4591 | /* Adjust CDclk dividers to allow high res or save power if possible */ | 4591 | /* Adjust CDclk dividers to allow high res or save power if possible */ |
@@ -12885,6 +12885,9 @@ static struct intel_quirk intel_quirks[] = { | |||
12885 | /* Acer C720 Chromebook (Core i3 4005U) */ | 12885 | /* Acer C720 Chromebook (Core i3 4005U) */ |
12886 | { 0x0a16, 0x1025, 0x0a11, quirk_backlight_present }, | 12886 | { 0x0a16, 0x1025, 0x0a11, quirk_backlight_present }, |
12887 | 12887 | ||
12888 | /* Apple Macbook 2,1 (Core 2 T7400) */ | ||
12889 | { 0x27a2, 0x8086, 0x7270, quirk_backlight_present }, | ||
12890 | |||
12888 | /* Toshiba CB35 Chromebook (Celeron 2955U) */ | 12891 | /* Toshiba CB35 Chromebook (Celeron 2955U) */ |
12889 | { 0x0a06, 0x1179, 0x0a88, quirk_backlight_present }, | 12892 | { 0x0a06, 0x1179, 0x0a88, quirk_backlight_present }, |
12890 | 12893 | ||
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index f6a3fdd5589e..5ad45bfff3fe 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c | |||
@@ -2806,6 +2806,13 @@ intel_dp_dpcd_read_wake(struct drm_dp_aux *aux, unsigned int offset, | |||
2806 | ssize_t ret; | 2806 | ssize_t ret; |
2807 | int i; | 2807 | int i; |
2808 | 2808 | ||
2809 | /* | ||
2810 | * Sometime we just get the same incorrect byte repeated | ||
2811 | * over the entire buffer. Doing just one throw away read | ||
2812 | * initially seems to "solve" it. | ||
2813 | */ | ||
2814 | drm_dp_dpcd_read(aux, DP_DPCD_REV, buffer, 1); | ||
2815 | |||
2809 | for (i = 0; i < 3; i++) { | 2816 | for (i = 0; i < 3; i++) { |
2810 | ret = drm_dp_dpcd_read(aux, offset, buffer, size); | 2817 | ret = drm_dp_dpcd_read(aux, offset, buffer, size); |
2811 | if (ret == size) | 2818 | if (ret == size) |
@@ -3724,9 +3731,10 @@ intel_dp_get_dpcd(struct intel_dp *intel_dp) | |||
3724 | } | 3731 | } |
3725 | } | 3732 | } |
3726 | 3733 | ||
3727 | /* Training Pattern 3 support */ | 3734 | /* Training Pattern 3 support, both source and sink */ |
3728 | if (intel_dp->dpcd[DP_DPCD_REV] >= 0x12 && | 3735 | if (intel_dp->dpcd[DP_DPCD_REV] >= 0x12 && |
3729 | intel_dp->dpcd[DP_MAX_LANE_COUNT] & DP_TPS3_SUPPORTED) { | 3736 | intel_dp->dpcd[DP_MAX_LANE_COUNT] & DP_TPS3_SUPPORTED && |
3737 | (IS_HASWELL(dev_priv) || INTEL_INFO(dev_priv)->gen >= 8)) { | ||
3730 | intel_dp->use_tps3 = true; | 3738 | intel_dp->use_tps3 = true; |
3731 | DRM_DEBUG_KMS("Displayport TPS3 supported\n"); | 3739 | DRM_DEBUG_KMS("Displayport TPS3 supported\n"); |
3732 | } else | 3740 | } else |
@@ -4491,6 +4499,18 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd) | |||
4491 | if (intel_dig_port->base.type != INTEL_OUTPUT_EDP) | 4499 | if (intel_dig_port->base.type != INTEL_OUTPUT_EDP) |
4492 | intel_dig_port->base.type = INTEL_OUTPUT_DISPLAYPORT; | 4500 | intel_dig_port->base.type = INTEL_OUTPUT_DISPLAYPORT; |
4493 | 4501 | ||
4502 | if (long_hpd && intel_dig_port->base.type == INTEL_OUTPUT_EDP) { | ||
4503 | /* | ||
4504 | * vdd off can generate a long pulse on eDP which | ||
4505 | * would require vdd on to handle it, and thus we | ||
4506 | * would end up in an endless cycle of | ||
4507 | * "vdd off -> long hpd -> vdd on -> detect -> vdd off -> ..." | ||
4508 | */ | ||
4509 | DRM_DEBUG_KMS("ignoring long hpd on eDP port %c\n", | ||
4510 | port_name(intel_dig_port->port)); | ||
4511 | return false; | ||
4512 | } | ||
4513 | |||
4494 | DRM_DEBUG_KMS("got hpd irq on port %c - %s\n", | 4514 | DRM_DEBUG_KMS("got hpd irq on port %c - %s\n", |
4495 | port_name(intel_dig_port->port), | 4515 | port_name(intel_dig_port->port), |
4496 | long_hpd ? "long" : "short"); | 4516 | long_hpd ? "long" : "short"); |