Re: [Intel-gfx] [PATCH 2/2] drm/i915: Add lvds_channel module option

2012-03-16 Thread Eugeni Dodonov
On Fri, Mar 16, 2012 at 18:41, Takashi Iwai wrote: > Add a new module optoin lvds_channel to specify the LVDS channel mode > explicitly instead of probing the LVDS register value set by BIOS. > This will be helpful when VBT is broken or incompatible with the > current code. > > Signed-off-by: Tak

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 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 bdb_lvds_lfp_data_ptrs *ptrs,

[Intel-gfx] [PATCH 2/2] drm/i915: Add lvds_channel module option

2012-03-16 Thread Takashi Iwai
Add a new module optoin lvds_channel to specify the LVDS channel mode explicitly instead of probing the LVDS register value set by BIOS. This will be helpful when VBT is broken or incompatible with the current code. Signed-off-by: Takashi Iwai --- drivers/gpu/drm/i915/i915_drv.c |6

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

2012-03-16 Thread Takashi Iwai
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

[Intel-gfx] [PATCH 0/2 v4] drm/i915: LVDS channel mode fixes

2012-03-16 Thread Takashi Iwai
Hi, this is the revised patch for fixing the wrong LVDS channel mode, e.g. when booted while the lid is closed. Also, a new module option to override the LVDS channel mode is added in the second patch. v1->v2: Fix the register for gen<=4 v2->v3: Check the resolution of the entry to be sure v3->v

Re: [Intel-gfx] Graphics switching and LVDS detection

2012-03-16 Thread Oliver Seitz
How could this be implemented in a clean way? Of course forcing LVDS on should become a parameter, A patch for this was made some time ago, but it was not accepted in the end. Concerns were that using those force-parameters could be advertised in internet forums and people use them accidenta

Re: [Intel-gfx] Thinkpad T420 and single/dual channel lvds

2012-03-16 Thread Takashi Iwai
At Fri, 16 Mar 2012 15:55:52 -0400, Adam Jackson wrote: > > On 3/15/12 10:42 AM, Takashi Iwai wrote: > > > diff --git a/drivers/gpu/drm/i915/intel_display.c > > b/drivers/gpu/drm/i915/intel_display.c > > index f851db7..314af26 100644 > > --- a/drivers/gpu/drm/i915/intel_display.c > > +++ b/drive

Re: [Intel-gfx] Thinkpad T420 and single/dual channel lvds

2012-03-16 Thread Adam Jackson
On 3/15/12 10:42 AM, Takashi Iwai wrote: diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index f851db7..314af26 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -356,6 +356,23 @@ static const intel_limit_t

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Add wait_for in init_ring_common

2012-03-16 Thread Ben Widawsky
On Fri, Mar 16, 2012 at 12:43:22PM -0400, Sean Paul wrote: > I have seen a number of "blt ring initialization failed" messages > where the ctl or start registers are not the correct value. Upon further > inspection, if the code just waited a little bit, it would read the > correct value. Adding the

[Intel-gfx] [PATCH 2/2] drm/i915: Add wait_for in init_ring_common

2012-03-16 Thread Sean Paul
I have seen a number of "blt ring initialization failed" messages where the ctl or start registers are not the correct value. Upon further inspection, if the code just waited a little bit, it would read the correct value. Adding the wait_for to these reads should eliminate the issue. Signed-off-by

[Intel-gfx] [PATCH 1/2] drm/i915: Add BUG_ON when ring->private is NULL

2012-03-16 Thread Sean Paul
I have experienced a number of NULL pointer dereferences on suspend/resume where ring->private is NULL. These come from failed initialization of the ring buffer. Sincce this doesn't seem to be easily recoverable, this patch adds a BUG_ON and a bread crumb pointer for people who might encounter this

[Intel-gfx] [PATCH 0/2] Two patches relating to ring initialization failure

2012-03-16 Thread Sean Paul
These two patches fix/mitigate an issue I was seeing during suspend/resume. I would see a "blt ring initialization failed" error in the logs, followed by a NULL dereference in gen6_render_ring_flush shortly after. The first patch adds a BUG_ON to catch the NULL, and a bread crumb. The second patch

Re: [Intel-gfx] Thinkpad T420 and single/dual channel lvds

2012-03-16 Thread Rodrigo Vivi
Reviewed-by: Rodrigo Vivi On Thu, Mar 15, 2012 at 11:42 AM, Takashi Iwai wrote: > At Thu, 15 Mar 2012 14:30:35 +0100, > Takashi Iwai wrote: >> >> At Thu, 15 Mar 2012 13:25:08 +, >> Chris Wilson wrote: >> > >> > On Thu, 15 Mar 2012 14:15:54 +0100, Takashi Iwai wrote: >> > > +static bool is_d