From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maciej Rutecki Subject: Re: [REGRESSION] [KMS] [INTEL] Wrong resolution in console and XWindow Date: Fri, 27 Jul 2012 13:46:49 +0200 Message-ID: <201207271346.49259.maciej.rutecki@gmail.com> References: <201207251020.47637.maciej.rutecki@gmail.com> <20120726123828.GE5326@phenom.ffwll.local> Reply-To: maciej.rutecki@gmail.com Mime-Version: 1.0 Content-Type: Text/Plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <20120726123828.GE5326@phenom.ffwll.local> Sender: linux-kernel-owner@vger.kernel.org To: Daniel Vetter Cc: Linux Kernel Mailing List , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On czwartek, 26 lipca 2012 o 14:38:28 Daniel Vetter wrote: > On Wed, Jul 25, 2012 at 01:55:59PM +0200, Daniel Vetter wrote: > > On Wed, Jul 25, 2012 at 12:57 PM, Maciej Rutecki > >=20 > > wrote: > > > On =C5=9Broda, 25 lipca 2012 o 11:29:28 Daniel Vetter wrote: > > >> On Wed, Jul 25, 2012 at 10:54:25AM +0200, Maciej Rutecki wrote: > > >> > On =C5=9Broda, 25 lipca 2012 o 10:29:26 Daniel Vetter wrote: > > >> > > On Wed, Jul 25, 2012 at 10:20:47AM +0200, Maciej Rutecki wro= te: > > >> > > > Last known good: 3.4.4 > > >> > > > First bad: 3.5.0 > > >> > > >=20 > > >> > > > When booting 3.5.0 resolution (in console, and after in KD= E) is > > >> > > > set to 1024x768 (60Hz). In 3.4.4 was correct: 1440x900 (60= Hz). > > >> > >=20 > > >> > > Can you please attach the output of xrandr --verbose for bot= h > > >> > > kernels? Also, please boot with drm.debug=3D0xe added to you= r > > >> > > kernel cmdline and grab the dmesg (again for both kernels). > > >> >=20 > > >> > Thanks for the ansfer. > > >> >=20 > > >> > Here xrandr and dmesg outputs for 3.4.4 and 3.5.0 > > >> >=20 > > >> > http://mrutecki.pl/download/kernel/3.5/swinka/debug/ > > >>=20 > > >> Can you please test this quick hack: > > >>=20 > > >>=20 > > >> diff --git a/drivers/gpu/drm/i915/intel_i2c.c > > >> b/drivers/gpu/drm/i915/intel_i2c.c index 1991a44..abe1611 100644 > > >> --- a/drivers/gpu/drm/i915/intel_i2c.c > > >> +++ b/drivers/gpu/drm/i915/intel_i2c.c > > >>=20 > > >> @@ -405,7 +405,7 @@ clear_err: > > >> * timing out seems to happen when there _is_ a ddc chip > > >> present, but * it's slow responding and only answers on t= he > > >> 2nd retry. */ > > >>=20 > > >> - ret =3D -ENXIO; > > >> + ret =3D 0; > > >>=20 > > >> if (wait_for((I915_READ(GMBUS2 + reg_offset) & GMBUS_ACTIV= E) =3D=3D > > >> 0, > > >> =20 > > >> 10)) { > > >> =20 > > >> DRM_DEBUG_KMS("GMBUS [%s] timed out after NAK\n", > > >>=20 > > >> Thanks, Daniel > > >=20 > > > Still the same. > >=20 > > Hm, can you attach the dmesg again (with drm.debug=3D0xe)? If I hav= en't > > botched up something, we should now retry at least the ddc transfer > > ... >=20 > Also, another little snippet for you to test. Fyi I'll be on vacation= next > week, so final patch (this one here should really work) might take a = notch > longer. >=20 > Yours, Daniel > -- > diff --git a/drivers/gpu/drm/i915/intel_crt.c > b/drivers/gpu/drm/i915/intel_crt.c index bc5e2c9..85eca1c 100644 > --- a/drivers/gpu/drm/i915/intel_crt.c > +++ b/drivers/gpu/drm/i915/intel_crt.c > @@ -338,6 +338,7 @@ static bool intel_crt_detect_ddc(struct drm_conne= ctor > *connector) BUG_ON(crt->base.type !=3D INTEL_OUTPUT_ANALOG); >=20 > i2c =3D intel_gmbus_get_adapter(dev_priv, dev_priv->crt_ddc_pin); > + intel_gmbus_force_bit(i2c, true); > edid =3D drm_get_edid(connector, i2c); >=20 > if (edid) { > @@ -546,12 +547,14 @@ static int intel_crt_get_modes(struct drm_conne= ctor > *connector) struct i2c_adapter *i2c; >=20 > i2c =3D intel_gmbus_get_adapter(dev_priv, dev_priv->crt_ddc_pin); > + intel_gmbus_force_bit(i2c, true); > ret =3D intel_ddc_get_modes(connector, i2c); > if (ret || !IS_G4X(dev)) > return ret; >=20 > /* Try to probe digital port for output in DVI-I -> VGA mode. */ > i2c =3D intel_gmbus_get_adapter(dev_priv, GMBUS_PORT_DPB); > + intel_gmbus_force_bit(i2c, true); > return intel_ddc_get_modes(connector, i2c); > } I have little problem with the patch: $ patch -p1 < /tmp/latka.patch=20 patching file drivers/gpu/drm/i915/intel_crt.c Hunk #1 FAILED at 338. patch unexpectedly ends in middle of line Hunk #2 succeeded at 498 with fuzz 2 (offset -48 lines). 1 out of 2 hunks FAILED -- saving rejects to file=20 drivers/gpu/drm/i915/intel_crt.c.rej But I add "intel_gmbus_force_bit(i2c, true);" manually and now resoluti= on is=20 OK. Thanks for help. PS. I also will be in vacation between 4-19 August, so my test may take= =20 longer. Regards --=20 Maciej Rutecki http://www.mrutecki.pl