mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-22 02:01:55 +07:00
tty: Add support for disabling DRM devices
This commit is contained in:
committed by
Ivan Molodetskikh
parent
b7f1e382a2
commit
5c91e3191d
@@ -13,6 +13,7 @@ pub struct Debug {
|
||||
pub keep_max_bpc_unchanged: bool,
|
||||
pub restrict_primary_scanout_to_matching_format: bool,
|
||||
pub render_drm_device: Option<PathBuf>,
|
||||
pub ignored_drm_devices: Vec<PathBuf>,
|
||||
pub force_pipewire_invalid_modifier: bool,
|
||||
pub emulate_zero_presentation_time: bool,
|
||||
pub disable_resize_throttling: bool,
|
||||
@@ -45,6 +46,8 @@ pub struct DebugPart {
|
||||
pub restrict_primary_scanout_to_matching_format: Option<Flag>,
|
||||
#[knuffel(child, unwrap(argument))]
|
||||
pub render_drm_device: Option<PathBuf>,
|
||||
#[knuffel(children(name = "ignore-drm-device"), unwrap(argument))]
|
||||
pub ignored_drm_devices: Vec<PathBuf>,
|
||||
#[knuffel(child)]
|
||||
pub force_pipewire_invalid_modifier: Option<Flag>,
|
||||
#[knuffel(child)]
|
||||
@@ -91,6 +94,9 @@ impl MergeWith<DebugPart> for Debug {
|
||||
);
|
||||
|
||||
merge_clone_opt!((self, part), preview_render, render_drm_device);
|
||||
|
||||
self.ignored_drm_devices
|
||||
.extend(part.ignored_drm_devices.iter().cloned());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -831,6 +831,8 @@ mod tests {
|
||||
|
||||
debug {
|
||||
render-drm-device "/dev/dri/renderD129"
|
||||
ignore-drm-device "/dev/dri/renderD128"
|
||||
ignore-drm-device "/dev/dri/renderD130"
|
||||
}
|
||||
|
||||
workspace "workspace-1" {
|
||||
@@ -2008,6 +2010,10 @@ mod tests {
|
||||
render_drm_device: Some(
|
||||
"/dev/dri/renderD129",
|
||||
),
|
||||
ignored_drm_devices: [
|
||||
"/dev/dri/renderD128",
|
||||
"/dev/dri/renderD130",
|
||||
],
|
||||
force_pipewire_invalid_modifier: false,
|
||||
emulate_zero_presentation_time: false,
|
||||
disable_resize_throttling: false,
|
||||
|
||||
Reference in New Issue
Block a user