Bug 32612 - Issues when vga monitor connected
Summary: Issues when vga monitor connected
Status: CLOSED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Video(DRI - Intel) (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_video-dri-intel@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-04 07:17 UTC by Riccardo Magliocchetti
Modified: 2011-04-27 06:16 UTC (History)
2 users (show)

See Also:
Kernel Version: 78fca1b95837a44983608302e89c7258981be9b3
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
2.6.39-rc1 dmesg (55.57 KB, text/plain)
2011-04-04 07:17 UTC, Riccardo Magliocchetti
Details
2.6.39-rc1 xrandr (804 bytes, text/plain)
2011-04-04 07:18 UTC, Riccardo Magliocchetti
Details
2.6.36 dmesg (51.61 KB, application/octet-stream)
2011-04-04 07:18 UTC, Riccardo Magliocchetti
Details
2.6.36 xrandr (804 bytes, application/octet-stream)
2011-04-04 07:19 UTC, Riccardo Magliocchetti
Details
Reset GMBUS after NAK (2.84 KB, patch)
2011-04-04 07:27 UTC, Chris Wilson
Details | Diff
Remove CRT 0xa0 probe (1.98 KB, patch)
2011-04-04 07:27 UTC, Chris Wilson
Details | Diff
dmesg with patches and debug (122.72 KB, text/plain)
2011-04-04 17:30 UTC, Riccardo Magliocchetti
Details
Initialise g4x watermarks for disabled pipes. (1.27 KB, patch)
2011-04-04 17:47 UTC, Chris Wilson
Details | Diff
dmesg with watermark patch (122.86 KB, text/plain)
2011-04-05 12:17 UTC, Riccardo Magliocchetti
Details
dmesg with patches on top of updated git (101.95 KB, text/plain)
2011-04-05 16:02 UTC, Riccardo Magliocchetti
Details

Description Riccardo Magliocchetti 2011-04-04 07:17:52 UTC
Created attachment 53372 [details]
2.6.39-rc1 dmesg

When i attach an external vga monitor to a GM45 laptop lvds panel is off and external monitor works at max 1024x768 vs its native 1600x1200.

IIRC 2.6.38-rc7 was working fine but i don't have it around anymore, 2.6.36 is working fine.

Userspace is drm 2.4.23 and video-intel 2.14.0.
Comment 1 Riccardo Magliocchetti 2011-04-04 07:18:16 UTC
Created attachment 53382 [details]
2.6.39-rc1 xrandr
Comment 2 Riccardo Magliocchetti 2011-04-04 07:18:42 UTC
Created attachment 53392 [details]
2.6.36 dmesg
Comment 3 Riccardo Magliocchetti 2011-04-04 07:19:11 UTC
Created attachment 53402 [details]
2.6.36 xrandr
Comment 4 Chris Wilson 2011-04-04 07:27:06 UTC
Created attachment 53412 [details]
Reset GMBUS after NAK
Comment 5 Chris Wilson 2011-04-04 07:27:31 UTC
Created attachment 53422 [details]
Remove CRT 0xa0 probe
Comment 6 Riccardo Magliocchetti 2011-04-04 17:02:28 UTC
With both patches attached the vga monitor has the proper resolution out of the box. Still the lvds panel is off by default which is a different behavior from what it used to but i don't know if this is intended or not.
If you want you can add a:
Tested-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
Thanks!
Comment 7 Chris Wilson 2011-04-04 17:19:44 UTC
(In reply to comment #6)
> With both patches attached the vga monitor has the proper resolution out of
> the
> box. Still the lvds panel is off by default which is a different behavior
> from
> what it used to but i don't know if this is intended or not.

Can you please grab a drm.debug=0xe (add that to your grub kernel parameters) dmesg? Hopefully I'll be able to tell what's going on with the panel from that.
Comment 8 Riccardo Magliocchetti 2011-04-04 17:30:55 UTC
Created attachment 53452 [details]
dmesg with patches and debug
Comment 9 Riccardo Magliocchetti 2011-04-04 17:33:08 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > With both patches attached the vga monitor has the proper resolution out of
> the
> > box. Still the lvds panel is off by default which is a different behavior
> from
> > what it used to but i don't know if this is intended or not.
> 
> Can you please grab a drm.debug=0xe (add that to your grub kernel parameters)
> dmesg? Hopefully I'll be able to tell what's going on with the panel from
> that.

Attached, thanks.
Comment 10 Chris Wilson 2011-04-04 17:47:57 UTC
Created attachment 53462 [details]
Initialise g4x watermarks for disabled pipes.

Well this should make a difference at least...
Comment 11 Riccardo Magliocchetti 2011-04-05 12:17:03 UTC
Created attachment 53552 [details]
dmesg with watermark patch

I booted two times with this patch, the first one the vga monitor has a 640x480 resolution but that looks like another issue, unfortunately debug was off. lvds is still off.
Comment 12 Riccardo Magliocchetti 2011-04-05 12:20:37 UTC
Ah and there were 29 lines of delta so probably i'm missing some patches. I've seen Linus pulled at least one of these patches, should retest against latest git?
Comment 13 Chris Wilson 2011-04-05 12:26:42 UTC
Oh, the LVDS is that old chestnut...

linus/master commit 6ee3b5a12740eddc5a76e130b6cc7cc64468d1f7
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu Mar 24 13:26:43 2011 +0000

    drm/i915/lvds: Always return connected in the absence of better information
    
    The LVDS connector should default to connected. We tried our best to
    verify the claims of the BIOS that the hardware exists during init(),
    and then during detect() we then try to verify that the panel is open.
    In the event of an unsuccessful query, we should then always report
    that the LVDS panel is connected. This was only the case for gen2/3,
    later generations leaked the return value from the panel probe instead.
    
    Reported-and-tested-by: Alessandro Suardi <alessandro.suardi@gmail.com>
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    Reviewed-by: Keith Packard <keithp@keithp.com>

We're almost there... Just capture what goes wrong with VGA at 640x480 with a debug dmesg and we can call it a day! :)
Comment 14 Riccardo Magliocchetti 2011-04-05 16:02:16 UTC
Created attachment 53562 [details]
dmesg with patches on top of updated git

So i've updated to latest git which include drm merge, now it is back to 2.6.36 state, and 2.6.38 too for what i can say, where under X LVDS and VGA are both at 1024x768 because the X screen is duplicated on each monitor.
Comment 15 Chris Wilson 2011-04-06 06:30:22 UTC
Marking as closed since we seem to have restored stable behaviour.

Riccardo, if you can reproduce the bogus VGA resolution and can capture a debug dmesg and intel_reg_dumper for it, please do file a new bug.
Comment 16 Riccardo Magliocchetti 2011-04-06 07:00:20 UTC
A last question, is technically possible to have proper native resolution for LVDS and VGA out of the box even if by default they show the same screen? Anyway thanks for the prompt response!
Comment 17 Chris Wilson 2011-04-06 07:03:32 UTC
Yes, I think it is possible to set per-connector modes using video=
Comment 18 Florian Mickler 2011-04-06 09:49:44 UTC
A patch referencing this bug report has been merged in 1:

commit 0de009c900e7ebd21097797f723a40813e953879
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Apr 5 16:04:39 2011 +0100

    drm/i915/crt: Remove 0xa0 probe for VGA
Comment 19 Florian Mickler 2011-04-27 06:16:19 UTC
A patch referencing this bug report has been merged in v2.6.39-rc5:

commit 5c72d064f7ead1126bed6faab0c2bfb7418036e2
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Apr 13 09:28:23 2011 +0100

    drm/i915: Initialise g4x watermarks for disabled pipes

Note You need to log in before you can comment on or make changes to this bug.