Wrong resolution in console and XWindow
Subsystems (2)
Last known good: 3.4.4
First bad: 3.5.0
When booting 3.5.0 resolution (in console, and after in KDE) is set to 1024x768 (60Hz). In 3.4.4 was correct: 1440x900 (60Hz).
Dmesg from 3.5.0:
http://mrutecki.pl/download/kernel/3.5/swinka/dmesg-3.5.0.txt
Dmesg from 3.4.4:
http://mrutecki.pl/download/kernel/3.5/swinka/dmesg-3.4.4.txt
Config 3.5.0:
http://mrutecki.pl/download/kernel/3.5/swinka/config-3.5.0
lspci:
http://mrutecki.pl/download/kernel/3.5/swinka/lspci.txt
Regards
Signature · 2 lines
Maciej Rutecki http://www.mrutecki.pl
Quoted 5 lines · Maciej Rutecki
Last known good: 3.4.4
First bad: 3.5.0When booting 3.5.0 resolution (in console, and after in KDE) is set to 1024x768 (60Hz). In 3.4.4 was correct: 1440x900 (60Hz).
Can you please attach the output of xrandr --verbose for both kernels? Also, please boot with drm.debug=0xe added to your kernel cmdline and grab the dmesg (again for both kernels).
Thanks, Daniel
Quoted 21 lines
Dmesg from 3.5.0:
http://mrutecki.pl/download/kernel/3.5/swinka/dmesg-3.5.0.txtDmesg from 3.4.4:
http://mrutecki.pl/download/kernel/3.5/swinka/dmesg-3.4.4.txtConfig 3.5.0:
http://mrutecki.pl/download/kernel/3.5/swinka/config-3.5.0lspci:
http://mrutecki.pl/download/kernel/3.5/swinka/lspci.txtRegards
Signature · 6 lines
Maciej Rutecki http://www.mrutecki.pl _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 3 lines
Daniel Vetter Mail: [email protected] Mobile: +41 (0)79 365 57 48
Quoted 11 lines · On środa, 25 lipca 2012 o 10:29:26 Daniel Vetter wrote:
Quoted 5 lines · Maciej Rutecki
Last known good: 3.4.4
First bad: 3.5.0When booting 3.5.0 resolution (in console, and after in KDE) is set to 1024x768 (60Hz). In 3.4.4 was correct: 1440x900 (60Hz).
Can you please attach the output of xrandr --verbose for both kernels? Also, please boot with drm.debug=0xe added to your kernel cmdline and grab the dmesg (again for both kernels).
Thanks for the ansfer.
Here xrandr and dmesg outputs for 3.4.4 and 3.5.0
http://mrutecki.pl/download/kernel/3.5/swinka/debug/
Regards
Signature · 2 lines
Maciej Rutecki http://www.mrutecki.pl
Quoted 13 lines · Maciej Rutecki
Quoted 11 lines · On środa, 25 lipca 2012 o 10:29:26 Daniel Vetter wrote:
Quoted 5 lines · Maciej Rutecki
Last known good: 3.4.4
First bad: 3.5.0When booting 3.5.0 resolution (in console, and after in KDE) is set to 1024x768 (60Hz). In 3.4.4 was correct: 1440x900 (60Hz).
Can you please attach the output of xrandr --verbose for both kernels? Also, please boot with drm.debug=0xe added to your kernel cmdline and grab the dmesg (again for both kernels).
Quoted 5 lines
Thanks for the ansfer.
Here xrandr and dmesg outputs for 3.4.4 and 3.5.0
Can you please test this quick hack:
drivers/gpu/drm/i915/intel_i2c.c +1 -1
@@ -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 the 2nd retry. */ - ret = -ENXIO ; + ret =0 ;if (wait_for ((I915_READ (GMBUS2 + reg_offset) &GMBUS_ACTIVE ) ==0 ,10 )) { DRM_DEBUG_KMS("GMBUS [%s] timed out after NAK\n",
Thanks, Daniel
Signature · 3 lines
Daniel Vetter Mail: [email protected] Mobile: +41 (0)79 365 57 48
Quoted 37 lines · On środa, 25 lipca 2012 o 11:29:28 Daniel Vetter wrote:
Quoted 12 lines · Maciej Rutecki
Quoted 10 lines · On środa, 25 lipca 2012 o 10:29:26 Daniel Vetter wrote:
Quoted 5 lines · Maciej Rutecki
Last known good: 3.4.4
First bad: 3.5.0When booting 3.5.0 resolution (in console, and after in KDE) is set to 1024x768 (60Hz). In 3.4.4 was correct: 1440x900 (60Hz).
Can you please attach the output of xrandr --verbose for both kernels? Also, please boot with drm.debug=0xe added to your kernel cmdline and grab the dmesg (again for both kernels).
Quoted 5 lines
Thanks for the ansfer.
Here xrandr and dmesg outputs for 3.4.4 and 3.5.0
Can you please test this quick hack:
(quoted diff) +0
-0
b/drivers/gpu/drm/i915/intel_i2c.cindex 1991a44..abe1611 100644drivers/gpu/drm/i915/intel_i2c.c +1
-1@@ -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 the 2nd retry. */ - ret = -ENXIO ; + ret =0 ;if (wait_for ((I915_READ (GMBUS2 + reg_offset) &GMBUS_ACTIVE ) ==0 ,10 )) { DRM_DEBUG_KMS("GMBUS [%s] timed out after NAK\n",
Quoted 1 line
Thanks, Daniel
Still the same.
PS. Unfortunately, this afternoon I have small a surgical operation and further tests will be possible only after 2-3 days.
Regards
Signature · 2 lines
Maciej Rutecki http://www.mrutecki.pl
Quoted 38 lines · Maciej Rutecki
Quoted 37 lines · On środa, 25 lipca 2012 o 11:29:28 Daniel Vetter wrote:
Quoted 12 lines · Maciej Rutecki
Quoted 10 lines · On środa, 25 lipca 2012 o 10:29:26 Daniel Vetter wrote:
Quoted 5 lines · Maciej Rutecki
Last known good: 3.4.4
First bad: 3.5.0When booting 3.5.0 resolution (in console, and after in KDE) is set to 1024x768 (60Hz). In 3.4.4 was correct: 1440x900 (60Hz).
Can you please attach the output of xrandr --verbose for both kernels? Also, please boot with drm.debug=0xe added to your kernel cmdline and grab the dmesg (again for both kernels).
Quoted 5 lines
Thanks for the ansfer.
Here xrandr and dmesg outputs for 3.4.4 and 3.5.0
Can you please test this quick hack:
(quoted diff) +0
-0
b/drivers/gpu/drm/i915/intel_i2c.cindex 1991a44..abe1611 100644drivers/gpu/drm/i915/intel_i2c.c +1
-1@@ -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 the 2nd retry. */ - ret = -ENXIO ; + ret =0 ;if (wait_for ((I915_READ (GMBUS2 + reg_offset) &GMBUS_ACTIVE ) ==0 ,10 )) { DRM_DEBUG_KMS("GMBUS [%s] timed out after NAK\n",
Quoted 3 lines
Quoted 1 line
Thanks, Daniel
Still the same.
Hm, can you attach the dmesg again (with drm.debug=0xe)? If I haven't botched up something, we should now retry at least the ddc transfer
...
-Daniel
Quoted 8 lines
PS. Unfortunately, this afternoon I have small a surgical operation and further tests will be possible only after 2-3 days.
Regards
--
Maciej Rutecki
http://www.mrutecki.pl
Signature · 2 lines
Daniel Vetter [email protected] - +41 (0) 79 364 57 48 - http://blog.ffwll.ch
Quoted 40 lines · Daniel Vetter
Quoted 38 lines · Maciej Rutecki
Quoted 37 lines · On środa, 25 lipca 2012 o 11:29:28 Daniel Vetter wrote:
Quoted 12 lines · Maciej Rutecki
Quoted 10 lines · On środa, 25 lipca 2012 o 10:29:26 Daniel Vetter wrote:
Quoted 5 lines · Maciej Rutecki
Last known good: 3.4.4
First bad: 3.5.0When booting 3.5.0 resolution (in console, and after in KDE) is set to 1024x768 (60Hz). In 3.4.4 was correct: 1440x900 (60Hz).
Can you please attach the output of xrandr --verbose for both kernels? Also, please boot with drm.debug=0xe added to your kernel cmdline and grab the dmesg (again for both kernels).
Quoted 5 lines
Thanks for the ansfer.
Here xrandr and dmesg outputs for 3.4.4 and 3.5.0
Can you please test this quick hack:
(quoted diff) +0
-0
b/drivers/gpu/drm/i915/intel_i2c.cindex 1991a44..abe1611 100644drivers/gpu/drm/i915/intel_i2c.c +1
-1@@ -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 the 2nd retry. */ - ret = -ENXIO ; + ret =0 ;if (wait_for ((I915_READ (GMBUS2 + reg_offset) &GMBUS_ACTIVE ) ==0 ,10 )) { DRM_DEBUG_KMS("GMBUS [%s] timed out after NAK\n",
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
Thanks, Daniel
Still the same.
Hm, can you attach the dmesg again (with drm.debug=0xe)? If I haven't botched up something, we should now retry at least the ddc transfer
...
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.
Yours, Daniel
--
drivers/gpu/drm/i915/intel_crt.c +3 -1
@@ -338,6 +338,7 @@ static bool intel_crt_detect_ddc(struct drm_connector *connector)BUG_ON (crt->base.type !=INTEL_OUTPUT_ANALOG ); i2c =intel_gmbus_get_adapter (dev_priv, dev_priv->crt_ddc_pin); +intel_gmbus_force_bit (i2c, true); edid =drm_get_edid (connector, i2c);if (edid) {
@@ -546,12 +547,14 @@ static int intel_crt_get_modes(struct drm_connector *connector)struct i2c_adapter *i2c; i2c =intel_gmbus_get_adapter (dev_priv, dev_priv->crt_ddc_pin); +intel_gmbus_force_bit (i2c, true); ret =intel_ddc_get_modes (connector, i2c);if (ret || !IS_G4X (dev))return ret;/* Try to probe digital port for output in DVI-I -> VGA mode. */ i2c =intel_gmbus_get_adapter (dev_priv,GMBUS_PORT_DPB ); +intel_gmbus_force_bit (i2c, true);return intel_ddc_get_modes (connector, i2c); } --
Daniel Vetter
Mail: [email protected]
Mobile: +41 (0)79 365 57 48
Quoted 77 lines · On czwartek, 26 lipca 2012 o 14:38:28 Daniel Vetter wrote:
Quoted 46 lines · Daniel Vetter
On Wed, Jul 25, 2012 at 12:57 PM, Maciej Rutecki
Quoted 43 lines · <[email protected]> wrote:
Quoted 42 lines · On środa, 25 lipca 2012 o 11:29:28 Daniel Vetter wrote:
Quoted 12 lines · Maciej Rutecki
Quoted 10 lines · On środa, 25 lipca 2012 o 10:29:26 Daniel Vetter wrote:
Quoted 5 lines · Maciej Rutecki
Last known good: 3.4.4
First bad: 3.5.0When booting 3.5.0 resolution (in console, and after in KDE) is set to 1024x768 (60Hz). In 3.4.4 was correct: 1440x900 (60Hz).
Can you please attach the output of xrandr --verbose for both kernels? Also, please boot with drm.debug=0xe added to your kernel cmdline and grab the dmesg (again for both kernels).
Quoted 5 lines
Thanks for the ansfer.
Here xrandr and dmesg outputs for 3.4.4 and 3.5.0
Can you please test this quick hack:
(quoted diff) +0
-0
b/drivers/gpu/drm/i915/intel_i2c.cindex 1991a44..abe1611 100644drivers/gpu/drm/i915/intel_i2c.c +1
-1@@ -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 the 2nd retry. */ - ret = -ENXIO ; + ret =0 ; if (wait_for((I915_READ(GMBUS2 + reg_offset) & GMBUS_ACTIVE) ==0, 10)) { DRM_DEBUG_KMS("GMBUS [%s] timed out after NAK\n",Quoted 7 lines
Quoted 3 lines
Quoted 1 line
Thanks, Daniel
Still the same.
Hm, can you attach the dmesg again (with drm.debug=0xe)? If I haven't botched up something, we should now retry at least the ddc transfer
...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.
Yours, Daniel
--(quoted diff) +0
-0
b/drivers/gpu/drm/i915/intel_crt.cindex bc5e2c9..85eca1c 100644drivers/gpu/drm/i915/intel_crt.c +1
-0@@ -338,6 +338,7 @@ static bool intel_crt_detect_ddc(struct drm_connector *connector) BUG_ON(crt->base.type != INTEL_OUTPUT_ANALOG); i2c =intel_gmbus_get_adapter (dev_priv, dev_priv->crt_ddc_pin); +intel_gmbus_force_bit (i2c, true); edid =drm_get_edid (connector, i2c);if (edid) {@@ -546,12 +547,14 @@ static int intel_crt_get_modes(struct drm_connector *connector) struct i2c_adapter *i2c; i2c =intel_gmbus_get_adapter (dev_priv, dev_priv->crt_ddc_pin);
drivers/gpu/drm/i915/intel_crt.c static int intel_crt_get_modes(struct drm_connector · line 559
Quoted 10 lines
drivers/gpu/drm/i915/intel_crt.c +2
-0+intel_gmbus_force_bit (i2c, true); ret =intel_ddc_get_modes (connector, i2c);if (ret || !IS_G4X (dev))return ret;/* Try to probe digital port for output in DVI-I -> VGA mode. */ i2c =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 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 drivers/gpu/drm/i915/intel_crt.c.rej
But I add "intel_gmbus_force_bit(i2c, true);" manually and now resolution is OK. Thanks for help.
PS. I also will be in vacation between 4-19 August, so my test may take longer.
Regards
Signature · 2 lines
Maciej Rutecki http://www.mrutecki.pl
cover GMBUS EDID read bit-banging fallback
Alex, Maciej, please test the following to see if it fixes the issue [1], thanks.
BR,
Jani.
[1] https://bugzilla.kernel.org/show_bug.cgi?id=45881
Jani Nikula (2):
drm/i915: extract connector update from intel_ddc_get_modes() for
reuse
drm/i915: fall back to bit-banging if GMBUS fails in CRT EDID reads
drivers/gpu/drm/i915/intel_crt.c | 36 +++++++++++++++++++++++++++++++++--- drivers/gpu/drm/i915/intel_drv.h | 2 ++ drivers/gpu/drm/i915/intel_modes.c | 31 ++++++++++++++++++++++--------- 3 files changed, 57 insertions(+), 12 deletions(-)
Signature · 1 line
1.7.9.5
PATCH 1/2 drm/i915: extract connector update from intel_ddc_get_modes() for reuse
Refactor the connector update part of intel_ddc_get_modes() into a separate intel_connector_update_modes() function for reuse. No functional changes.
--- drivers/gpu/drm/i915/intel_drv.h | 2 ++ drivers/gpu/drm/i915/intel_modes.c | 31 ++++++++++++++++++++++--------- 2 files changed, 24 insertions(+), 9 deletions(-)
drivers/gpu/drm/i915/intel_drv.h +2 -0
@@ -357,6 +357,8 @@ struct intel_fbc_work {int interval; }; +int intel_connector_update_modes (struct drm_connector *connector, +struct edid *edid);int intel_ddc_get_modes (struct drm_connector *c,struct i2c_adapter *adapter);extern void intel_attach_force_audio_property (struct drm_connector *connector);
drivers/gpu/drm/i915/intel_modes.c +22 -9
@@ -33,6 +33,25 @@#include "i915_drv.h" /** +* intel_connector_update_modes - update connector from edid +* @connector: DRM connector device to use +* @edid: previously read EDID information +*/ +int intel_connector_update_modes (struct drm_connector *connector, +struct edid *edid) +{ +int ret; + +drm_mode_connector_update_edid_property (connector, edid); + ret =drm_add_edid_modes (connector, edid); +drm_edid_to_eld (connector, edid); + connector->display_info.raw_edid =NULL ; +kfree (edid); + +return ret; +} + +/** * intel_ddc_get_modes - get modelist from monitor * @connector: DRM connector device to use * @adapter: i2c adapter
@@ -43,18 +62,12 @@ int intel_ddc_get_modes(struct drm_connector *connector, struct i2c_adapter *adapter) {struct edid *edid; -int ret =0 ; edid =drm_get_edid (connector, adapter); -if (edid) { -drm_mode_connector_update_edid_property (connector, edid); - ret =drm_add_edid_modes (connector, edid); -drm_edid_to_eld (connector, edid); - connector->display_info.raw_edid =NULL ; -kfree (edid); - } +if (!edid) +return 0 ; -return ret; +return intel_connector_update_modes (connector, edid); }static const struct drm_prop_enum_list force_audio_names[] = {
Signature · 1 line
1.7.9.5
PATCH 2/2 drm/i915: fall back to bit-banging if GMBUS fails in CRT EDID reads
In reply to Jani NikulaGMBUS was enabled over bit-banging as the default in commits:
commit c3dfefa0a6d235bd465309e12f4c56ea16e71111
Author: Daniel Vetter <[email protected]> Date: Tue Feb 14 22:37:25 2012 +0100
drm/i915: reenable gmbus on gen3+ again
and
commit 0fb3f969c8683505fb7323c06bf8a999a5a45a15
Author: Daniel Vetter <[email protected]> Date: Fri Mar 2 19:38:30 2012 +0100
drm/i915: enable gmbus on gen2
Unfortunately, GMBUS seems to fail on some CRT displays. Add a bit-banging fallback to CRT EDID reads.
LKML-Reference: <[email protected]>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=45881
--- drivers/gpu/drm/i915/intel_crt.c | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_crt.c +33 -3
@@ -328,6 +328,36 @@ static bool intel_crt_detect_hotplug(struct drm_connector *connector)return ret; } +static struct edid *intel_crt_get_edid (struct drm_connector *connector, +struct i2c_adapter *i2c) +{ +struct edid *edid; + + edid =drm_get_edid (connector, i2c); + +if (!edid && !intel_gmbus_is_forced_bit (i2c)) { +DRM_DEBUG_KMS ("CRT GMBUS EDID read failed, retry using GPIO bit-banging\n" ); +intel_gmbus_force_bit (i2c, true); + edid =drm_get_edid (connector, i2c); +intel_gmbus_force_bit (i2c, false); + } + +return edid; +} + +/* local version of intel_ddc_get_modes() to use intel_crt_get_edid() */ +static int intel_crt_ddc_get_modes (struct drm_connector *connector, +struct i2c_adapter *adapter) +{ +struct edid *edid; + + edid =intel_crt_get_edid (connector, adapter); +if (!edid) +return 0 ; + +return intel_connector_update_modes (connector, edid); +} +static bool intel_crt_detect_ddc (struct drm_connector *connector) {struct intel_crt *crt =intel_attached_crt (connector);
@@ -338,7 +368,7 @@ static bool intel_crt_detect_ddc(struct drm_connector *connector)BUG_ON (crt->base.type !=INTEL_OUTPUT_ANALOG ); i2c =intel_gmbus_get_adapter (dev_priv, dev_priv->crt_ddc_pin); - edid =drm_get_edid (connector, i2c); + edid =intel_crt_get_edid (connector, i2c);if (edid) {bool is_digital = edid->input &DRM_EDID_INPUT_DIGITAL ;
@@ -546,13 +576,13 @@ static int intel_crt_get_modes(struct drm_connector *connector)struct i2c_adapter *i2c; i2c =intel_gmbus_get_adapter (dev_priv, dev_priv->crt_ddc_pin); - ret =intel_ddc_get_modes (connector, i2c); + ret =intel_crt_ddc_get_modes (connector, i2c);if (ret || !IS_G4X (dev))return ret;/* Try to probe digital port for output in DVI-I -> VGA mode. */ i2c =intel_gmbus_get_adapter (dev_priv,GMBUS_PORT_DPB ); -return intel_ddc_get_modes (connector, i2c); +return intel_crt_ddc_get_modes (connector, i2c); } static int intel_crt_set_property(struct drm_connector *connector,
Signature · 1 line
1.7.9.5
Re: [PATCH 2/2] drm/i915: fall back to bit-banging if GMBUS fails in CRT EDID reads
Quoted 14 lines · Jani Nikula
GMBUS was enabled over bit-banging as the default in commits:
commit
c3dfefa0a6d235bd465309e12f4c56ea16e71111Author: Daniel Vetter <[email protected]> Date: Tue Feb 14 22:37:25 2012 +0100drm/i915: reenable gmbus on gen3+ again
and
commit
0fb3f969c8683505fb7323c06bf8a999a5a45a15Author: Daniel Vetter <[email protected]> Date: Fri Mar 2 19:38:30 2012 +0100
Quoted 8 lines
drm/i915: enable gmbus on gen2
Unfortunately, GMBUS seems to fail on some CRT displays. Add a bit-banging fallback to CRT EDID reads.
LKML-Reference: <[email protected]>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=45881Signed-off-by Jani Nikula <[email protected]>
Patches applied to -fixes with the tested-by result from the bug report. I've also put a cc: stable on both of them, since the regression is already in 3.4.
Thanks, Daniel
Signature · 3 lines
Daniel Vetter Mail: [email protected] Mobile: +41 (0)79 365 57 48