Bug 101249 - modesetting driver adds unwanted video modes and there is no way to remove them
Summary: modesetting driver adds unwanted video modes and there is no way to remove them
Status: RESOLVED MOVED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/DDX/Xorg (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-31 11:49 UTC by Henri Kemppainen
Modified: 2018-12-13 18:30 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Henri Kemppainen 2017-05-31 11:49:49 UTC
If an output is advertised as having a panel fitter (whether enabled or not), the modesetting driver will add [1] a bunch of modes that may or may not be usable, and may not be wanted e.g. because the connected monitor provides panel fitting of its own, with better controls or quality.

[1] https://cgit.freedesktop.org/xorg/xserver/tree/hw/xfree86/drivers/modesetting/drmmode_display.c#n1286

The situation is especially dire for people using (recent?) amd cards with external monitors, because the scaling is not enabled by default, and even if you enabled it, it does not actually work [2].  So X ends up using made up modes that do not work, even when your monitor has a perfectly good set of modes already.

[2] https://bugs.freedesktop.org/show_bug.cgi?id=95131

There is an option DefaultModes which could be turned off to prevent the addition of said modes at another layer [3], but the modesetting driver does not respect this option.

https://cgit.freedesktop.org/xorg/xserver/tree/hw/xfree86/modes/xf86Crtc.c#n1675
Comment 1 Henri Kemppainen 2017-05-31 11:56:25 UTC
I'll note that the Intel driver does respect the option on output:

https://cgit.freedesktop.org/xorg/driver/xf86-video-intel/tree/src/sna/sna_display.c#n5154

https://cgit.freedesktop.org/xorg/driver/xf86-video-intel/tree/src/sna/sna_display.c#n4188

The options are in a public member of xf86Crtc.h, but to access them, a token is needed.  These come from an enum in xf86Crtc.c, and the Intel driver maintains a copy of this enum: https://cgit.freedesktop.org/xorg/driver/xf86-video-intel/tree/src/sna/sna_display.c#n293

Going the same route would require a third copy of this enum in the modesetting driver.  Nasty?

Would it be unacceptable to prefix these enumeration constants (e.g. XF86CRTC_) and move the enum into the header, via which all drivers could use it?
Comment 2 Michel Dänzer 2017-06-01 03:24:06 UTC
(In reply to Henri Kemppainen from comment #0)
> The situation is especially dire for people using (recent?) amd cards [...]

Are the xf86-video-amdgpu/ati drivers also affected by the problem described in this report? If not, using those would be the recommended solution.
Comment 3 Henri Kemppainen 2017-06-01 08:41:07 UTC
No, this problem does not manifest with the amdgpu driver.
Comment 4 GitLab Migration User 2018-12-13 18:30:28 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/xserver/issues/183.


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.