Re: [Intel-gfx] [PATCH 1/2] drm/i915: Check VBIOS value for determining LVDS dual channel mode, too

2012-03-22 Thread Paulo Zanoni
2012/3/20 Takashi Iwai ti...@suse.de: This patch adds a workaround for that problem by checking the initial LVDS register value in VBT. Reviewed-by: Rodrigo Vivi rodrigo.v...@gmail.com Reviewed-by: Adam Jackson a...@redhat.com Signed-off-by: Takashi Iwai ti...@suse.de Tested on 4 laptops.

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Check VBIOS value for determining LVDS dual channel mode, too

2012-03-21 Thread Daniel Vetter
On Tue, Mar 20, 2012 at 01:07:05PM +0100, Takashi Iwai wrote: 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

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Check VBIOS value for determining LVDS dual channel mode, too

2012-03-20 Thread Takashi Iwai
At Tue, 20 Mar 2012 11:01:22 +0100, Daniel Vetter wrote: On Mon, Mar 19, 2012 at 12:07:36PM +0100, Takashi Iwai wrote: 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

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Check VBIOS value for determining LVDS dual channel mode, too

2012-03-20 Thread Keith Packard
#part sign=pgpmime On Tue, 20 Mar 2012 13:04:41 +0100, Takashi Iwai ti...@suse.de wrote: Since checking the lid state is tricky and unreliable, the practical check would be simply reading the first LVDS reg and seeing whether it was initialized or not. It seems that it reads to 0x02 when

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Check VBIOS value for determining LVDS dual channel mode, too

2012-03-20 Thread Rodrigo Vivi
Altough Keith's idea is very good I tested here with many systems that are already working nowadays and it didn't break anything. Including atom at 945gme, ironlake, sandybridge and ivybridge... including single and dual channel modes... Tested-by: Rodrigo Vivi rodrigo.v...@gmail.com On Tue, Mar

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Check VBIOS value for determining LVDS dual channel mode, too

2012-03-18 Thread Takashi Iwai
At Sat, 17 Mar 2012 12:01:17 -0700, Keith Packard wrote: #part sign=pgpmime On Sat, 17 Mar 2012 08:59:56 +0100, Takashi Iwai ti...@suse.de wrote: Well, the LVDS reg data isn't in lvds_dvo_timing but in lvds_fp_timing, thus you need to look at a different entry in anyway. Right, a

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Check VBIOS value for determining LVDS dual channel mode, too

2012-03-17 Thread Takashi Iwai
At Fri, 16 Mar 2012 16:18:03 -0700, Keith Packard wrote: #part sign=pgpmime On Fri, 16 Mar 2012 22:41:12 +0100, Takashi Iwai ti...@suse.de wrote: +/* read the initial LVDS register value for the given panel mode */ +static unsigned int get_lvds_reg_val(const struct bdb_header *bdb, +

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Check VBIOS value for determining LVDS dual channel mode, too

2012-03-17 Thread Keith Packard
#part sign=pgpmime On Sat, 17 Mar 2012 08:59:56 +0100, Takashi Iwai ti...@suse.de wrote: Well, the LVDS reg data isn't in lvds_dvo_timing but in lvds_fp_timing, thus you need to look at a different entry in anyway. Right, a parallel function which returns the lvds_fp_timing structure instead

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Check VBIOS value for determining LVDS dual channel mode, too

2012-03-16 Thread Keith Packard
#part sign=pgpmime On Fri, 16 Mar 2012 22:41:12 +0100, Takashi Iwai ti...@suse.de wrote: +/* read the initial LVDS register value for the given panel mode */ +static unsigned int get_lvds_reg_val(const struct bdb_header *bdb, + const struct