Bug 19203 - X default modes no longer added
Summary: X default modes no longer added
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/nouveau (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Nouveau Project
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-20 07:43 UTC by Danny
Modified: 2009-02-08 07:41 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
hacky patch (1.73 KB, patch)
2009-01-06 13:29 UTC, Stuart Bennett
no flags Details | Splinter Review
Xorg log (13.36 KB, text/plain)
2009-01-08 06:19 UTC, Danny
no flags Details
hack in detect path (23.53 KB, text/plain)
2009-02-06 06:57 UTC, Danny
no flags Details
vanilla, without hack (23.14 KB, application/octet-stream)
2009-02-06 06:58 UTC, Danny
no flags Details
hack with workaround that NULLs MonInfo (25.71 KB, text/plain)
2009-02-06 07:00 UTC, Danny
no flags Details
New patch without multiple OutputSetEDID calls (2.57 KB, patch)
2009-02-08 06:35 UTC, Stuart Bennett
no flags Details | Splinter Review

Description Danny 2008-12-20 07:43:26 UTC
Some month's ago I could switch from my laptops native resolution 1024x768 to 800x600 or 640x480. The gpu or panel would do the scaling.

Recently this is no longer possible. The edid only contains the native 1024x768 resolution and the log no longer mentions checking the modes from the builtin modepool.

The lower resolutions were quite useful for some games and videos.

danny
Comment 1 Stuart Bennett 2008-12-20 09:10:27 UTC
Have you updated the xserver recently?  I could believe http://cgit.freedesktop.org/xorg/xserver/commit/?id=81fd17f5f49cdd2c10d0bf3b7ddeb8b5953886a5 "Only add default modes if EDID supports continuous-frequency" might have this effect.

As far as nouveau ddx changes go, the scaling code was last touched on Aug 16-17th in 8a364682fd67c10c153cb0778c914a4754e82ddd and  4cbbd44db614d250fdaaf648db2d70ec9bc2f6d9 if you want to try going back to a previous version (though admittedly there could be unintentional subsequent breakage)
Comment 2 Danny 2008-12-24 04:54:27 UTC
I saw that commit, but thought my checkout was older than that. Today i checked. It is not. I checked my EDID and byte 0x18 reads 0A, and thus misses the gtf bit.

I'm not sure if GTF support equals "continuous frequency", but still i would like a solution for this problem. Is there any other way we can check if a screen supports more than just the preferred mode? 

Perhaps the commit is too restricting, I imagine it would fix the bugs if it didn't try to put screens in higher resolutions than the supported ones, but still left it possible to use lower resolutions.

danny
Comment 3 Danny 2008-12-25 04:46:33 UTC
maybe something like this can be done for nouveau as well?

http://www.mail-archive.com/dri-devel@lists.sourceforge.net/msg36976.html


danny
Comment 4 Stuart Bennett 2009-01-06 13:29:40 UTC
Created attachment 21734 [details] [review]
hacky patch

here's a bodge that should fix the immediate problem. I'm tempted to wait and see what the intel guys ultimately come up with in bug 19247 before committing anything
Comment 5 Danny 2009-01-07 20:56:21 UTC
It's a bit too dodgy. For some reason it messes up the edid completely, leading to random modes and eventually the server stops. I post the logs later.

d.
Comment 6 Danny 2009-01-08 06:19:57 UTC
Created attachment 21806 [details]
Xorg log

This log file shows the errors after applying above patch. Haven:t really researcher what is happening.

d.
Comment 7 Danny 2009-01-10 04:18:01 UTC
OK, patch does not work because xf86OutputSetEDID has already been called once, and the edid got applied to the output. Calling it again will not change the current edid, but seems to add another one. Doing;
        if (nv_connector->edid)
                nv_connector->edid->features.msc |= 0x1;
in edid_sink_connected instead (before the firstxf86OutputSetEDID) seems to work fine.

d.
Comment 8 Stuart Bennett 2009-01-10 15:55:00 UTC
problem is due to xf86OutputSetEDID freeing the previously set xf86MonPtr, which is also the one we're trying to set (again):

if (output->MonInfo != NULL)
  xfree(output->MonInfo);
output->MonInfo = edid_mon;

I'd really prefer to not drag the EDID alteration into the detect path, since at that stage there's no encoder type set.  What if you defeat the above NULL check by adding "output->MonInfo = NULL;" just before the call to xf86OutputSetEDID in munge_edid_for_scaler?
Comment 9 Danny 2009-02-06 06:57:11 UTC
Created attachment 22643 [details]
hack in detect path
Comment 10 Danny 2009-02-06 06:58:06 UTC
Created attachment 22644 [details]
vanilla, without hack
Comment 11 Danny 2009-02-06 07:00:12 UTC
Created attachment 22645 [details]
hack with workaround that NULLs MonInfo

Last few comments logs for each situation.

The hack doesn't seem to work because a new entry seems to be created which has the msc bit set. But this entry is not for the current panel.

d.
Comment 12 Stuart Bennett 2009-02-08 06:35:17 UTC
Created attachment 22692 [details] [review]
New patch without multiple OutputSetEDID calls

Bizarre, I've no idea why the previous patch didn't work.  From the attached logs it even look like it did.  Here's a new patch taking a different and possibly better approach though.  If this one doesn't work, please make logs with `Option "ModeDebug" "on"' set in the xorg.conf.
Comment 13 Stuart Bennett 2009-02-08 07:41:49 UTC
30848dd378d05917c646a24df404846e6f9b2352


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.