Created attachment 19455 [details] [review] xf86Crtc.c: new Option "UserModes" sets M_T_USERDEF modes. This extension reintroduces zoom support, the mode switching through the Ctrl+Alt+Keypad-{Plus,Minus} keypress. The user zoom mode list is defined in the monitor section and thus relates to an output. For example: Option "PreferredMode" "1600x1200@60" Option "UserModes" "1600x1200@50 1280x1024 1280x1024" gives the list 1600x1200@60, 1600x1200@50, 1280x1024 75Hz, 1280x1024 59.9Hz. The actual list follows from the screen modes which are a copy of the compat_output probed_modes, usually the smallest width*height detected monitor. An improvement might be to synchronize zoom modes of multiple outputs instead of cloning the selected compat_output mode. This would require a change in or around xf86OutputFindClosestMode(). Example log messages: (II) RADEON(0): Printing probed modes for output DVI-0 Modeline "1600x1200@60"x60.0 144.00 1600 1628 1788 1920 1200 1201 1204 1250 (75.0 kHz UuP) Modeline "1600x1200"x60.0 162.00 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync (75.0 kHz d) Modeline "1600x1200"x59.9 161.00 1600 1712 1880 2160 1200 1203 1207 1245 -hsync +vsync (74.5 kHz e) Modeline "1600x1200@50"x50.0 120.00 1600 1628 1788 1920 1200 1201 1204 1250 (62.5 kHz u) Modeline "1400x1050"x74.8 155.80 1400 1464 1784 1912 1050 1052 1064 1090 +hsync +vsync (81.5 kHz d) Modeline "1400x1050"x60.0 122.00 1400 1488 1640 1880 1050 1052 1064 1082 +hsync +vsync (64.9 kHz d) Modeline "1280x1024"x75.0 135.00 1280 1296 1440 1688 1024 1025 1028 1066 +hsync +vsync (80.0 kHz ud) Modeline "1280x1024"x59.9 109.00 1280 1368 1496 1712 1024 1027 1034 1063 -hsync +vsync (63.7 kHz eu)
This patch no longer applies and also is a bit disingenuous in its functionality. Could you respin this patch?
Please send this patch to xorg-devel@lists.x.org for a review. It's not going to be applied without a review.
Created attachment 50742 [details] [review] add monitor Option "ZoomModes" "name name ..." This patch adds support for the Option "ZoomModes" "1600x1200 1280x1024 1280x1024 640x480" in a monitor section. The code tries to match each mode name and sets the M_T_USERDEF mode type bit if found. A mode will not be rematched so specifying a name twice selects the next, usually lower refresh rate, mode. The option value is a string of mode names delimited by spaces. As such, name tokenization is done at output enable time. Ideally this should be done when parsing the Xorg.conf file. A check of xserver/hw/xfree86/parser/{Flags.c Monitor.c scan.c xf86Optrec.h} shows 2 other possibilities: 1. Allow a new keyword ZoomModes followed by multiple mode names. This would be a port of the Screen/Display/Modes code. 2. Allow generic options to be followed by multiple arguments. This requires either a char *opt_val[MAXVALS] thus introducing a compile time maximum, a linked list of values, or a flexible array using e.g. a char *opt_val[]. These alternatives are not forward compatible since an older X server will fail to parse such constructs. The option keyword extension is the logical choice but seems not worth the added complexity. Since enabling and disabling outputs is not a common event nor time critical the subideal form, the string of mode names, seems the best choice.
Created attachment 50743 [details] [review] xorg.conf manual page description
Created attachment 69915 [details] [review] monitor Option "ZoomModes": xserver code and manual page description Perhaps some might recall the xorg.conf Modes statement: Section "Screen" Identifier "Screen0" ... Subsection "Display" Modes "1600x1200" "1280x1024" "1280x1024" "640x480" ViewPort 0 0 EndSubsection EndSection which defined the screen modes list. All modes were available via the Ctrl+Alt+Keypad-{Plus,Minus} key combination and the first mode of the list was the initial mode. Multiple output device support was added and monitor video modes are since then stored per output. In the process the monitor Option "PreferredMode" appeared but mode switching was dropped. This patch adds support for the Option "ZoomModes" in a monitor section: Section "Monitor" Identifier "a21inch" Option "PreferredMode" "1600x1200" Option "ZoomModes" "1600x1200 1280x1024 1280x1024 640x480" EndSection The option's effect is to search for and mark once each named mode in the output modes list. So the specification order is free and the zoom modes order follows the order of the output modes list. This option has its use for monitor and television setups. It allows for easy switching between 60 Hz and 50 Hz modes even when a monitor refuses to display the input signal.
Created attachment 76345 [details] [review] Add monitor Option "ZoomModes".
Merged. 2967391..ac4c2ab master -> master
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.