Bug 96500 - Can't use 1920x1080 on VGA with versions newer than 0.4.176
Summary: Can't use 1920x1080 on VGA with versions newer than 0.4.176
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/openchrome (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium major
Assignee: Openchrome development list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-12 20:17 UTC by Max Rus
Modified: 2016-06-13 17:24 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Xorg.0.log for 0.4.179 driver (with problem) (22.69 KB, text/x-log)
2016-06-12 20:17 UTC, Max Rus
no flags Details
Xorg.0.log for 0.4.171 driver (without problem) (33.46 KB, text/x-log)
2016-06-12 20:18 UTC, Max Rus
no flags Details
Proposed IGA1 CrtcHTotal limit test mistake fix (1.25 KB, patch)
2016-06-13 07:01 UTC, Kevin Brace
no flags Details | Splinter Review

Description Max Rus 2016-06-12 20:17:52 UTC
Created attachment 124489 [details]
Xorg.0.log for 0.4.179 driver (with problem)

After commit "Limiting IGA1 horizontal total to 2080" https://cgit.freedesktop.org/openchrome/xf86-video-openchrome/commit/?id=c768c86d044c84504f2b747db2b306c1f041ba44 driver don't like video mode it worked with before.

I have a motherboard Asus P5VD2-MX SE with P4P890 and integrated VGA output. Lubuntu 16.04. Dell S2740L FullHD monitor connected to VGA output. Video mode selected in OS: 1920x1080.

With previous version of driver (exactly 0.4.171) i got following logs:

[    15.306] (II) CHROME(0): Entered viaIGA1ModeValid.
[    15.306] (II) CHROME(0): Exiting viaIGA1ModeValid.
...
[    15.306] (II) CHROME(0): IGA1 Requested Screen Mode: 1920x1080
[    15.306] (II) CHROME(0): IGA1 CrtcHTotal: 2200
[    15.306] (II) CHROME(0): IGA1 CrtcHDisplay: 1920
[    15.306] (II) CHROME(0): IGA1 CrtcHBlankStart: 1920
[    15.306] (II) CHROME(0): IGA1 CrtcHBlankEnd: 2200
[    15.306] (II) CHROME(0): IGA1 CrtcHSyncStart: 2008
[    15.306] (II) CHROME(0): IGA1 CrtcHSyncEnd: 2052
[    15.306] (II) CHROME(0): IGA1 CrtcVTotal: 1125
[    15.306] (II) CHROME(0): IGA1 CrtcVDisplay: 1080
[    15.306] (II) CHROME(0): IGA1 CrtcVBlankStart: 1080
[    15.306] (II) CHROME(0): IGA1 CrtcVBlankEnd: 1125
[    15.306] (II) CHROME(0): IGA1 CrtcVSyncStart: 1084
[    15.306] (II) CHROME(0): IGA1 CrtcVSyncEnd: 1089
[    15.306] (II) CHROME(0): Exiting viaIGA1SetDisplayRegister.

But with this patch (and exactly version 0.4.179) value 2200 is out of range and i got following message:

[    20.048] (II) CHROME(0): Entered viaIGA1ModeValid.
[    20.048] (II) CHROME(0): Not using mode "(null)" : horizontal timing out of range.

I tracked the source of this value (2200) and it probably came from monitor:

[    20.045] (--) CHROME(0): Detected a VGA monitor on I2C Bus 1.
[    20.045] (II) CHROME(0): EDID vendor "DEL", prod id 41100
[    20.045] (II) CHROME(0): Printing probed modes for output VGA-1
[    20.045] (II) CHROME(0): Modeline "1920x1080"x60.0  148.50  1920 2008 2052 2200  1080 1084 1089 1125 +hsync +vsync (67.5 kHz eP)
[    20.045] (II) CHROME(0): Modeline "1920x1080"x60.0  172.80  1920 2040 2248 2576  1080 1081 1084 1118 -hsync +vsync (67.1 kHz e)
[    20.045] (II) CHROME(0): Modeline "1280x1024"x75.0  135.00  1280 1296 1440 1688  1024 1025 1028 1066 +hsync +vsync (80.0 kHz e)
[    20.045] (II) CHROME(0): Modeline "1280x1024"x60.0  108.00  1280 1328 1440 1688  1024 1025 1028 1066 +hsync +vsync (64.0 kHz e)
[    20.045] (II) CHROME(0): Modeline "1152x864"x75.0  108.00  1152 1216 1344 1600  864 865 868 900 +hsync +vsync (67.5 kHz e)
[    20.045] (II) CHROME(0): Modeline "1024x768"x75.0   78.75  1024 1040 1136 1312  768 769 772 800 +hsync +vsync (60.0 kHz e)
[    20.045] (II) CHROME(0): Modeline "1024x768"x60.0   65.00  1024 1048 1184 1344  768 771 777 806 -hsync -vsync (48.4 kHz e)
[    20.045] (II) CHROME(0): Modeline "800x600"x75.0   49.50  800 816 896 1056  600 601 604 625 +hsync +vsync (46.9 kHz e)
[    20.045] (II) CHROME(0): Modeline "800x600"x60.3   40.00  800 840 968 1056  600 601 605 628 +hsync +vsync (37.9 kHz e)
[    20.045] (II) CHROME(0): Modeline "640x480"x75.0   31.50  640 656 720 840  480 481 484 500 -hsync -vsync (37.5 kHz e)
[    20.045] (II) CHROME(0): Modeline "640x480"x59.9   25.18  640 656 752 800  480 490 492 525 -hsync -vsync (31.5 kHz e)
[    20.045] (II) CHROME(0): Modeline "720x400"x70.1   28.32  720 738 846 900  400 412 414 449 -hsync +vsync (31.5 kHz e)
[    20.045] (II) CHROME(0): Output VGA-1 connected
[    20.045] (II) CHROME(0): Using exact sizes for initial modes
[    20.045] (II) CHROME(0): Output VGA-1 using initial mode 1920x1080 +0+0


Attached bad (0.4.179) and good (0.4.171) Xorg.0.log files
Comment 1 Max Rus 2016-06-12 20:18:36 UTC
Created attachment 124490 [details]
Xorg.0.log for 0.4.171 driver (without problem)
Comment 2 Kevin Brace 2016-06-13 06:55:36 UTC
Hi Max,

I apologize for the screw up.
Also, thanks for catching my obvious mistake.
I do not own a monitor capable of 1920 X 1080, and this appears to be causing problems with other people.
The maximum I have is 1680 X 1050, and I do not have access to it for now.
    For IGA1, Horizontal total period is 9 bits, not 8 bits as I mistakenly considered.
What happens is that pretty much all IGA1 values get shifted to the right by 3 bit positions, hence, a 12 bit wide value is legal.
What happens is that the 3 LSBs (Least Significant Bits) get dropped as a result of the right 3 bit position shift.
2200 fits within that 12 bits, hence, it is a legal value as far as IGA1 is concerned.
I will upload the patch shortly, and I will include your name in the commit message.

Signed-off-by: Max Rus <"your e-mail address">

If you want to opt out, I can do that as well.
Comment 3 Kevin Brace 2016-06-13 07:01:24 UTC
Created attachment 124492 [details] [review]
Proposed IGA1 CrtcHTotal limit test mistake fix

There was a bad commit with commit c768c86, and this broke the screen of people who used a monitor capable of 1920 X 1080 screen resolution.
Comment 4 Max Rus 2016-06-13 11:48:00 UTC
Hi Kevin,

I applyed provided patch (and fixed missing last parenthesis):

+    if (mode->CrtcHTotal > (4096 + ((1 << 3) * (5 - 1)))

and now system starts normally with patched 0.4.179:

[    14.664] (II) Loading /opt/xorg/lib/xorg/modules/drivers/openchrome_drv.so
[    14.679] (II) Module openchrome: vendor="http://www.freedesktop.org/wiki/Openchrome/"
[    14.679] 	compiled for 1.18.3, module version = 0.4.179
...
[    15.080] (II) CHROME(0): Entered viaIGA1SetDisplayRegister.
[    15.080] (II) CHROME(0): IGA1 Requested Screen Mode: 1920x1080
[    15.080] (II) CHROME(0): IGA1 CrtcHTotal: 2200
[    15.080] (II) CHROME(0): IGA1 CrtcHDisplay: 1920
[    15.080] (II) CHROME(0): IGA1 CrtcHBlankStart: 1920
[    15.080] (II) CHROME(0): IGA1 CrtcHBlankEnd: 2200
[    15.080] (II) CHROME(0): IGA1 CrtcHSyncStart: 2008
[    15.080] (II) CHROME(0): IGA1 CrtcHSyncEnd: 2052
[    15.080] (II) CHROME(0): IGA1 CrtcVTotal: 1125
[    15.080] (II) CHROME(0): IGA1 CrtcVDisplay: 1080
[    15.080] (II) CHROME(0): IGA1 CrtcVBlankStart: 1080
[    15.080] (II) CHROME(0): IGA1 CrtcVBlankEnd: 1125
[    15.080] (II) CHROME(0): IGA1 CrtcVSyncStart: 1084
[    15.080] (II) CHROME(0): IGA1 CrtcVSyncEnd: 1089
[    15.080] (II) CHROME(0): Exiting viaIGA1SetDisplayRegister.
Comment 5 Kevin Brace 2016-06-13 15:48:34 UTC
(In reply to Max Rus from comment #4)

Hi Max,

> Hi Kevin,
> 
> I applyed provided patch (and fixed missing last parenthesis):
> 
> +    if (mode->CrtcHTotal > (4096 + ((1 << 3) * (5 - 1)))
> 
> and now system starts normally with patched 0.4.179:
> 
> [    14.664] (II) Loading
> /opt/xorg/lib/xorg/modules/drivers/openchrome_drv.so
> [    14.679] (II) Module openchrome:
> vendor="http://www.freedesktop.org/wiki/Openchrome/"
> [    14.679] 	compiled for 1.18.3, module version = 0.4.179
> ...
> [    15.080] (II) CHROME(0): Entered viaIGA1SetDisplayRegister.
> [    15.080] (II) CHROME(0): IGA1 Requested Screen Mode: 1920x1080
> [    15.080] (II) CHROME(0): IGA1 CrtcHTotal: 2200
> [    15.080] (II) CHROME(0): IGA1 CrtcHDisplay: 1920
> [    15.080] (II) CHROME(0): IGA1 CrtcHBlankStart: 1920
> [    15.080] (II) CHROME(0): IGA1 CrtcHBlankEnd: 2200
> [    15.080] (II) CHROME(0): IGA1 CrtcHSyncStart: 2008
> [    15.080] (II) CHROME(0): IGA1 CrtcHSyncEnd: 2052
> [    15.080] (II) CHROME(0): IGA1 CrtcVTotal: 1125
> [    15.080] (II) CHROME(0): IGA1 CrtcVDisplay: 1080
> [    15.080] (II) CHROME(0): IGA1 CrtcVBlankStart: 1080
> [    15.080] (II) CHROME(0): IGA1 CrtcVBlankEnd: 1125
> [    15.080] (II) CHROME(0): IGA1 CrtcVSyncStart: 1084
> [    15.080] (II) CHROME(0): IGA1 CrtcVSyncEnd: 1089
> [    15.080] (II) CHROME(0): Exiting viaIGA1SetDisplayRegister.

Okay, I will commit the change.
Sorry about disrupting your life.
Comment 6 Max Rus 2016-06-13 16:13:44 UTC
No real disturbance. I'm glad to see this project is alive, and glad that I was usefull enough to test and help to find mistake. :)


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.