]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
drm/nouveau/disp: check that panel power gpio is enabled at init time
authorBen Skeggs <bskeggs@redhat.com>
Mon, 30 Jan 2012 23:16:59 +0000 (09:16 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 1 Feb 2012 05:23:55 +0000 (15:23 +1000)
Reported-by: Yuriy Khomchik <homyur@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_bios.h
drivers/gpu/drm/nouveau/nouveau_display.c

index 1e382ad5a2b85b04fb6f8b0953fe793eee44f615..a37c31e358aa40eb9a6e618c9c59459b8233329b 100644 (file)
@@ -54,9 +54,10 @@ struct bit_entry {
 int bit_table(struct drm_device *, u8 id, struct bit_entry *);
 
 enum dcb_gpio_tag {
-       DCB_GPIO_TVDAC0 = 0xc,
+       DCB_GPIO_PANEL_POWER = 0x01,
+       DCB_GPIO_TVDAC0 = 0x0c,
        DCB_GPIO_TVDAC1 = 0x2d,
-       DCB_GPIO_PWM_FAN = 0x9,
+       DCB_GPIO_PWM_FAN = 0x09,
        DCB_GPIO_FAN_SENSE = 0x3d,
        DCB_GPIO_UNUSED = 0xff
 };
index 3cb52bc52b21101bbdf0a136b1cd4c2a639fb79e..795a9e3c990a0cba3599b5c754f33adf8e15da93 100644 (file)
@@ -219,6 +219,16 @@ nouveau_display_init(struct drm_device *dev)
        if (ret)
                return ret;
 
+       /* power on internal panel if it's not already.  the init tables of
+        * some vbios default this to off for some reason, causing the
+        * panel to not work after resume
+        */
+       if (nouveau_gpio_func_get(dev, DCB_GPIO_PANEL_POWER) == 0) {
+               nouveau_gpio_func_set(dev, DCB_GPIO_PANEL_POWER, true);
+               msleep(300);
+       }
+
+       /* enable polling for external displays */
        drm_kms_helper_poll_enable(dev);
 
        /* enable hotplug interrupts */