renderer,config: add custom DRM modeline support (#2254)
This allows specifying custom display resolutions for the DRM backend.
This is useful for display overclocking, working around broken EDIDs,
etc. To use this feature, specify a modeline instead of a resolution
in the config, for example:
monitor = DP-1, modeline 1071.101 3840 3848 3880 3920 2160 2263 2271 2277 +hsync -vsync, 0x0, 1
This example is a custom 3840x2160@120Hz mode with tightened timings.
I use it because the standard timings don't work with my monitor and GPU
combination (M28U with RX580).
The syntax is compatible with Sway and Xorg.
This commit is contained in:
parent
e7c2ea9724
commit
2f87e4c2f3
4 changed files with 103 additions and 18 deletions
|
|
@ -11,6 +11,7 @@
|
|||
#include <algorithm>
|
||||
#include <regex>
|
||||
#include <optional>
|
||||
#include <xf86drmMode.h>
|
||||
#include "../Window.hpp"
|
||||
#include "../helpers/WLClasses.hpp"
|
||||
|
||||
|
|
@ -44,6 +45,7 @@ struct SMonitorRule {
|
|||
wl_output_transform transform = WL_OUTPUT_TRANSFORM_NORMAL;
|
||||
std::string mirrorOf = "";
|
||||
bool enable10bit = false;
|
||||
drmModeModeInfo drmMode = {};
|
||||
};
|
||||
|
||||
struct SWorkspaceRule {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue