Bug 43333 - VGA2 turns on and off repeatedly in native resolution.
Summary: VGA2 turns on and off repeatedly in native resolution.
Status: RESOLVED DUPLICATE of bug 42174
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Chris Wilson
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-29 03:20 UTC by Kyku
Modified: 2012-02-01 13:11 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
dmesg log (85.25 KB, text/plain)
2011-11-29 03:20 UTC, Kyku
no flags Details
xrandr -q --verbose (10.46 KB, text/x-log)
2011-12-07 22:56 UTC, Kyku
no flags Details

Description Kyku 2011-11-29 03:20:03 UTC
Created attachment 53949 [details]
dmesg log

Hello, I have an Innocore's DPX-S410 board. When I plug in a second monitor to it it starts turning on and off in its native resolution (1680x1050). This situation continues to occur when I enter Xorg. I can only get the second monitor to work if I select a VESA resolution in menu.lst (video=800x600) or use a different resolution with xrandr. What is also strange is that EDID from VGA2 seems to mirror that of VGA1.
Comment 1 Kyku 2011-12-01 02:40:42 UTC
I'd also like to add that the VGA2 is connected through Chrontel 7317A-TF chip.
Comment 2 Paulo Zanoni 2011-12-07 10:22:23 UTC
Can you please provide the output of "xrandr --verbose" with two monitors attached? (when the monitor is turning on/off)

Does the 1600x1200 and 1280x1024 modes work on that monitor? And if they *do* work, I'll ask you to test the 1440x900, 1360x768 and 1280x800 modes: if they *don't* work, then I'd say this bug might be a duplicate of 42174.
Comment 3 Kyku 2011-12-07 11:45:09 UTC
I was able to fix both issues. The problem with EDID of VGA2 being a duplicate of VGA1 turned out to be a bad ddc guess in intel_sdvo_guess_ddc_bus(). sdvo->controlled_output has the value of 14 in the case of and it maps to sdvo->ddc_bus 1, which retrieved EDID from VGA1. Changing this to 2 fixed the problem with monitor detection.

Modes which didn't work had +vsync -hsync set. I was able to fix this patch applied to intel_sdvo_mode_set():

		if (adjusted_mode->flags & DRM_MODE_FLAG_PVSYNC) {
			sdvox |= SDVO_VSYNC_ACTIVE_HIGH;
		+	sdvox |= SDVO_HSYNC_ACTIVE_HIGH;
		}
		if (adjusted_mode->flags & DRM_MODE_FLAG_PHSYNC) {
			sdvox |= SDVO_HSYNC_ACTIVE_HIGH;
		+	sdvox |= SDVO_VSYNC_ACTIVE_HIGH;
		}

I adopted this solution from an old patch for Xorg. I don't understand why it is needed to set both flags, but it simply works. Are there any refs for this stuff?
Comment 4 Paulo Zanoni 2011-12-07 12:10:57 UTC
(In reply to comment #3)
> I was able to fix both issues. The problem with EDID of VGA2 being a duplicate
> of VGA1 turned out to be a bad ddc guess in intel_sdvo_guess_ddc_bus().
> sdvo->controlled_output has the value of 14 in the case of and it maps to
> sdvo->ddc_bus 1, which retrieved EDID from VGA1. Changing this to 2 fixed the
> problem with monitor detection.
> 

Is this documented anywhere? Is there a bug report or patch on a list? If you found a fix for a problem, let's try to push it upstream :)

> Modes which didn't work had +vsync -hsync set. I was able to fix this patch
> applied to intel_sdvo_mode_set():
> 
>         if (adjusted_mode->flags & DRM_MODE_FLAG_PVSYNC) {
>             sdvox |= SDVO_VSYNC_ACTIVE_HIGH;
>         +    sdvox |= SDVO_HSYNC_ACTIVE_HIGH;
>         }
>         if (adjusted_mode->flags & DRM_MODE_FLAG_PHSYNC) {
>             sdvox |= SDVO_HSYNC_ACTIVE_HIGH;
>         +    sdvox |= SDVO_VSYNC_ACTIVE_HIGH;
>         }
> 
> I adopted this solution from an old patch for Xorg.

Where is this patch? Can you please provide a link? This might really help us.

> I don't understand why it
> is needed to set both flags, but it simply works. Are there any refs for this
> stuff?

With your patch, modes that have -VSync +HSync will become +VSync +HSync and modes that have +VSync -HSync will become +VSync +HSync. And this *really* makes me think this bug is a duplicate of #42174. I have a theory on the reason but I'll need you to help me:

With your current patch, I believe that modes with -VSync -HSync still won't work for you. Can you please confirm that? Use "dmesg | grep Modeline | grep 0xa$" or "xrandr --verbose" to find out which modes have -VSync and -HSync and then test them and tell me whether they work or not with (or without) your patch.

Thank you,
Paulo
Comment 5 Chris Wilson 2011-12-07 12:59:56 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > I was able to fix both issues. The problem with EDID of VGA2 being a duplicate
> > of VGA1 turned out to be a bad ddc guess in intel_sdvo_guess_ddc_bus().
> > sdvo->controlled_output has the value of 14 in the case of and it maps to
> > sdvo->ddc_bus 1, which retrieved EDID from VGA1. Changing this to 2 fixed the
> > problem with monitor detection.
> > 
> 
> Is this documented anywhere? Is there a bug report or patch on a list? If you
> found a fix for a problem, let's try to push it upstream :)

See the series of patches Adam Jackson sent to fix this: 1308256588-8026-1-git-send-email-ajax@redhat.com

> > Modes which didn't work had +vsync -hsync set. I was able to fix this patch
> > applied to intel_sdvo_mode_set():
> > 
> >         if (adjusted_mode->flags & DRM_MODE_FLAG_PVSYNC) {
> >             sdvox |= SDVO_VSYNC_ACTIVE_HIGH;
> >         +    sdvox |= SDVO_HSYNC_ACTIVE_HIGH;
> >         }
> >         if (adjusted_mode->flags & DRM_MODE_FLAG_PHSYNC) {
> >             sdvox |= SDVO_HSYNC_ACTIVE_HIGH;
> >         +    sdvox |= SDVO_VSYNC_ACTIVE_HIGH;
> >         }
> > 
> > I adopted this solution from an old patch for Xorg.
> 
> Where is this patch? Can you please provide a link? This might really help us.

That's not a patch, but a hack around a buggy EDID, In this case hacking around reading the wrong one.
Comment 6 Kyku 2011-12-07 22:56:25 UTC
Created attachment 54212 [details]
xrandr -q --verbose
Comment 7 Kyku 2011-12-07 22:57:20 UTC
The patch for the orignal Xorg driver can be found here: https://bugs.freedesktop.org/show_bug.cgi?id=15766
Comment 8 Kyku 2011-12-07 23:37:53 UTC
Paulo Zanoni: you were right that modes with -vsync -hsync still didn't work. I fixed it by unconditionally SDVO_VSYNC_ACTIVE_HIGH and SDVO_HSYNC_ACTIVE_HIGH.
Comment 9 Paulo Zanoni 2011-12-09 09:37:41 UTC

*** This bug has been marked as a duplicate of bug 42174 ***
Comment 10 Florian Mickler 2012-02-01 13:11:56 UTC
A patch referencing this bug report has been merged in Linux v3.3-rc2:

commit ba68e086223a5f149f37bf8692c8cdbf1b0ba3ef
Author: Paulo Zanoni <paulo.r.zanoni@intel.com>
Date:   Fri Jan 6 19:45:34 2012 -0200

    drm/i915/sdvo: always set positive sync polarity


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.