On Wed Apr 26 14:23:50 2023 +0000, Zhiyi Zhang wrote:
Actually, the EDID Detailed Timing Descriptor should contain a recommended display frequency and we should use that as well.
I looked into doing this, but things are getting complicated in two orthogonal ways:
1. On one of my laptops Rog Strix (AMD with TMX5472 monitor) capable of 1920x1080 60/300Hz Detailed Timing Descriptor advertises 60Hz. Windows reports 300Hz as preferred mode. That 300Hz mode is advertised in EDID in "Display Range Limits Descriptor" (descriptor type 0xfd). It is possible to parse that one too as well but I am not sure if we cover all the possible cases this way. Or do you know if looking at this additionally is sufficient?
2. On my another Nvidia laptop we get some weird refresh rates from xrandr 1.0 (there is fallback to xrandr 1.0 with Nvidia proprietary driver). XRRRates returns those strange values (51 max for max resolution mode here, while in reality that is 120Hz or 60Hz). I didn't dig much into that why is it so (and with fallback disabled the refresh rate is OK), but I think in practice that will mean that we often won't match EDID's frequency on Nvidia machines and will be always falling back to not using EDID data at all (as apparently we can't report preferred mode which does not match anything in display mode list). Not sure, maybe that's ok and we can let it just fallback on Nvidia until xrandr issues on Nvidia are resolved somehow.
As a bottom line, I see p. 1. as more of an issue here, do you still think we should pursue timing data from EDID and use Display Range Limits Descriptor if present, or rather leave it as it is now?