[2/2,Quantal] drm/nv50-/gpio: initialise to vbios defaults during init

Submitted by Seth Forshee on Sept. 28, 2012, 1:15 p.m.

Details

Message ID 1348838100-3403-3-git-send-email-seth.forshee@canonical.com
State New
Headers show

Commit Message

Seth Forshee Sept. 28, 2012, 1:15 p.m.
From: Ben Skeggs <bskeggs@redhat.com>

This is required to fix an issue on the Retina MBP where the eDP panel's
AUX channel isn't wired up to the HPD pin for the panel, causing our aux
code to bail out early.

From looking at various traces of the binary driver, it appears NVIDIA do
something very similar on at least all nv50+ chipsets during their
initialisation sequence.  So, hopefully this is safe.

Issue and fix initially tracked down by Ryan Bourgeois on fdo#51971.

Backported fix from reworked nouveau kernel module.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
(cherry picked from commit 991083ba60f89e717e3a4175be96d48a810e9eae)
BugLink: http://bugs.launchpad.net/bugs/1058088
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
---
 drivers/gpu/drm/nouveau/nv50_gpio.c |    3 +++
 1 file changed, 3 insertions(+)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/nouveau/nv50_gpio.c b/drivers/gpu/drm/nouveau/nv50_gpio.c
index f429e6a..f034905 100644
--- a/drivers/gpu/drm/nouveau/nv50_gpio.c
+++ b/drivers/gpu/drm/nouveau/nv50_gpio.c
@@ -115,6 +115,9 @@  nv50_gpio_init(struct drm_device *dev)
 {
 	struct drm_nouveau_private *dev_priv = dev->dev_private;
 
+	/* initialise gpios and routing to vbios defaults */
+	nouveau_gpio_reset(dev);
+
 	/* disable, and ack any pending gpio interrupts */
 	nv_wr32(dev, 0xe050, 0x00000000);
 	nv_wr32(dev, 0xe054, 0xffffffff);