From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Greg KH <gregkh@linuxfoundation.org>,
torvalds@linux-foundation.org, akpm@linux-foundation.org,
alan@lxorguk.ukuu.org.uk, Roberto Romer <sildurin@gmail.com>,
Daniel Wagner <wagi@monom.org>, Keith Packard <keithp@keithp.com>,
Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: [ 10/32] drm/i915: reorder edp disabling to fix ivb MacBook Air
Date: Sun, 19 Aug 2012 20:57:06 -0700 [thread overview]
Message-ID: <20120820035649.314128442@linuxfoundation.org> (raw)
In-Reply-To: <20120820035647.862247088@linuxfoundation.org>
From: Greg KH <gregkh@linuxfoundation.org>
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Vetter <daniel.vetter@ffwll.ch>
commit 35a38556d900b9cb5dfa2529c93944b847f8a8a4 upstream.
eDP is tons of fun. It turns out that at least the new MacBook Air 5,1
model absolutely doesn't like the new force vdd dance we've introduced
in
commit 6cb49835da0426f69a2931bc2a0a8156344b0e41
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date: Sun May 20 17:14:50 2012 +0200
drm/i915: enable vdd when switching off the eDP panel
But that patch also tried to fix some neat edp sequence issue with the
force_vdd timings. Closer inspection reveals that we've raised
force_vdd only to do the aux channel communication dp_sink_dpms. If we
move the edp_panel_off below that, we don't need any force_vdd for the
disable sequence, which makes the Air happy.
Unfortunately the reporter of the original bug that the above commit
fixed is travelling, so we can't test whether this regresses things.
But my theory is that since we don't check for any power-off ->
force_vdd-on delays in edp_panel_vdd_on, this was the actual
root-cause of this failure. With that force_vdd dance completely
eliminated, I'm hopeful the original bug stays fixed, too.
For reference the old bug, which hopefully doesn't get broken by this:
https://bugzilla.kernel.org/show_bug.cgi?id=43163
In any case, regression fixers win over plain bugfixes, so this needs
to go in asap.
v2: The crucial pieces seems to be to clear the force_vdd flag
uncoditionally, too, in edp_panel_off. Looks like this is left behind
by the firmware somehow.
v3: The Apple firmware seems to switch off the panel on it's own, hence
we still need to keep force_vdd on, but properly clear it when switching
the panel off.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=45671
Tested-by: Roberto Romer <sildurin@gmail.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Tested-by: Keith Packard <keithp@keithp.com>
Cc: Keith Packard <keithp@keithp.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/i915/intel_dp.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1156,10 +1156,14 @@ static void ironlake_edp_panel_off(struc
WARN(!intel_dp->want_panel_vdd, "Need VDD to turn off panel\n");
pp = ironlake_get_pp_control(dev_priv);
- pp &= ~(POWER_TARGET_ON | PANEL_POWER_RESET | EDP_BLC_ENABLE);
+ /* We need to switch off panel power _and_ force vdd, for otherwise some
+ * panels get very unhappy and cease to work. */
+ pp &= ~(POWER_TARGET_ON | EDP_FORCE_VDD | PANEL_POWER_RESET | EDP_BLC_ENABLE);
I915_WRITE(PCH_PP_CONTROL, pp);
POSTING_READ(PCH_PP_CONTROL);
+ intel_dp->want_panel_vdd = false;
+
ironlake_wait_panel_off(intel_dp);
}
@@ -1269,11 +1273,9 @@ static void intel_dp_prepare(struct drm_
* ensure that we have vdd while we switch off the panel. */
ironlake_edp_panel_vdd_on(intel_dp);
ironlake_edp_backlight_off(intel_dp);
- ironlake_edp_panel_off(intel_dp);
-
intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_ON);
+ ironlake_edp_panel_off(intel_dp);
intel_dp_link_down(intel_dp);
- ironlake_edp_panel_vdd_off(intel_dp, false);
}
static void intel_dp_commit(struct drm_encoder *encoder)
@@ -1308,11 +1310,9 @@ intel_dp_dpms(struct drm_encoder *encode
/* Switching the panel off requires vdd. */
ironlake_edp_panel_vdd_on(intel_dp);
ironlake_edp_backlight_off(intel_dp);
- ironlake_edp_panel_off(intel_dp);
-
intel_dp_sink_dpms(intel_dp, mode);
+ ironlake_edp_panel_off(intel_dp);
intel_dp_link_down(intel_dp);
- ironlake_edp_panel_vdd_off(intel_dp, false);
if (is_cpu_edp(intel_dp))
ironlake_edp_pll_off(encoder);
next prev parent reply other threads:[~2012-08-20 3:58 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-20 3:56 [ 00/32] 3.4.10-stable review Greg Kroah-Hartman
2012-08-20 3:56 ` [ 01/32] s390/compat: fix compat wrappers for process_vm system calls Greg Kroah-Hartman
2012-08-20 3:56 ` [ 02/32] s390/compat: fix mmap compat " Greg Kroah-Hartman
2012-08-20 3:56 ` [ 03/32] dma: imx-dma: Fix kernel crash due to missing clock conversion Greg Kroah-Hartman
2012-08-20 3:57 ` [ 04/32] fuse: verify all ioctl retry iov elements Greg Kroah-Hartman
2012-08-20 3:57 ` [ 05/32] xen: mark local pages as FOREIGN in the m2p_override Greg Kroah-Hartman
2012-08-20 3:57 ` [ 06/32] drm/i915: prefer wide & slow to fast & narrow in DP configs Greg Kroah-Hartman
2012-08-20 3:57 ` [ 07/32] drm/nvd0/disp: mask off high 16 bit of negative cursor x-coordinate Greg Kroah-Hartman
2012-08-20 3:57 ` [ 08/32] drm/i915: correctly order the ring init sequence Greg Kroah-Hartman
2012-08-24 23:03 ` Herton Ronaldo Krzesinski
2012-08-27 4:42 ` Greg Kroah-Hartman
2012-08-20 3:57 ` [ 09/32] drm/i915: ignore eDP bpc settings from vbt Greg Kroah-Hartman
2012-08-20 3:57 ` Greg Kroah-Hartman [this message]
2012-08-20 3:57 ` [ 11/32] drm/radeon: properly handle crtc powergating Greg Kroah-Hartman
2012-08-20 3:57 ` [ 12/32] drm/radeon: do not reenable crtc after moving vram start address Greg Kroah-Hartman
2012-08-20 3:57 ` [ 13/32] drm/radeon: add some new SI pci ids Greg Kroah-Hartman
2012-08-20 3:57 ` [ 14/32] drm/radeon: fix bank tiling parameters on cayman Greg Kroah-Hartman
2012-08-20 3:57 ` [ 15/32] drm/radeon: fix bank tiling parameters on evergreen Greg Kroah-Hartman
2012-08-20 3:57 ` [ 16/32] ext4: make sure the journal sb is written in ext4_clear_journal_err() Greg Kroah-Hartman
2012-09-07 2:55 ` Ben Hutchings
2012-08-20 3:57 ` [ 17/32] ext4: avoid kmemcheck complaint from reading uninitialized memory Greg Kroah-Hartman
2012-08-20 3:57 ` [ 18/32] ext4: fix long mount times on very big file systems Greg Kroah-Hartman
2012-08-20 3:57 ` [ 19/32] ext4: fix kernel BUG on large-scale rm -rf commands Greg Kroah-Hartman
2012-08-20 3:57 ` [ 20/32] xhci: Add Etron XHCI_TRUST_TX_LENGTH quirk Greg Kroah-Hartman
2012-08-20 3:57 ` [ 21/32] xhci: Increase reset timeout for Renesas 720201 host Greg Kroah-Hartman
2012-08-20 3:57 ` [ 22/32] xhci: Switch PPT ports to EHCI on shutdown Greg Kroah-Hartman
2012-08-20 3:57 ` [ 23/32] xhci: Fix bug after deq ptr set to link TRB Greg Kroah-Hartman
2012-08-20 3:57 ` [ 24/32] USB: add USB_VENDOR_AND_INTERFACE_INFO() macro Greg Kroah-Hartman
2012-08-20 3:57 ` [ 25/32] pmac_zilog,kdb: Fix console poll hook to return instead of loop Greg Kroah-Hartman
2012-08-20 3:57 ` [ 26/32] IB/srp: Fix a race condition Greg Kroah-Hartman
2012-08-20 3:57 ` [ 27/32] USB: support the new interfaces of Huawei Data Card devices in option driver Greg Kroah-Hartman
2012-08-20 3:57 ` [ 28/32] USB: option: add ZTE K5006-Z Greg Kroah-Hartman
2012-08-20 3:57 ` [ 29/32] USB: ftdi_sio: Add VID/PID for Kondo Serial USB Greg Kroah-Hartman
2012-08-20 3:57 ` [ 30/32] usb: serial: mos7840: Fixup mos7840_chars_in_buffer() Greg Kroah-Hartman
2012-08-20 3:57 ` [ 31/32] usb: gadget: u_ether: fix kworker 100% CPU issue with still used interfaces in eth_stop Greg Kroah-Hartman
2012-08-20 3:57 ` [ 32/32] rt2x00: Add support for BUFFALO WLI-UC-GNM2 to rt2800usb Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120820035649.314128442@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=daniel.vetter@ffwll.ch \
--cc=keithp@keithp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sildurin@gmail.com \
--cc=stable@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=wagi@monom.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).