drm/i915: Check VBIOS value for determining LVDS dual channel mode, too
authorTakashi Iwai <tiwai@suse.de>
Tue, 20 Mar 2012 12:07:05 +0000 (13:07 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 6 Dec 2012 11:20:15 +0000 (11:20 +0000)
commit48eabc148c7637812a6de645a1b6ca07ff0bf91f
tree66246900f23d8229ac215281e69c74b32d58c7a0
parentb1d52b72b5f597dfcb54e26c688b8e05b77f593f
drm/i915: Check VBIOS value for determining LVDS dual channel mode, too

commit b03543857fd75876b96e10d4320b775e95041bb7 upstream.

Currently i915 driver checks [PCH_]LVDS register bits to decide
whether to set up the dual-link or the single-link mode.  This relies
implicitly on that BIOS initializes the register properly at boot.
However, BIOS doesn't initialize it always.  When the machine is
booted with the closed lid, BIOS skips the LVDS reg initialization.
This ends up in blank output on a machine with a dual-link LVDS when
you open the lid after the boot.

This patch adds a workaround for that problem by checking the initial
LVDS register value in VBT.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=37742
Tested-By: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_bios.c
drivers/gpu/drm/i915/intel_display.c