diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-03-19 09:00:00 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-03-19 09:00:00 +0400 |
| commit | c3327d36da25f37e86eb8f89bd74f2a4bc1ea744 (patch) | |
| tree | aabe99933931419b46eff45f5bc48ae1470b0a0e /src/backend | |
| parent | e0da101c73f1c6e7728632f43d2e49e19b8787b2 (diff) | |
| download | niri-c3327d36da25f37e86eb8f89bd74f2a4bc1ea744.tar.gz niri-c3327d36da25f37e86eb8f89bd74f2a4bc1ea744.tar.bz2 niri-c3327d36da25f37e86eb8f89bd74f2a4bc1ea744.zip | |
tty: Generalize DRM property helpers
Diffstat (limited to 'src/backend')
| -rw-r--r-- | src/backend/tty.rs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/backend/tty.rs b/src/backend/tty.rs index 7d80c251..82320ab4 100644 --- a/src/backend/tty.rs +++ b/src/backend/tty.rs @@ -38,6 +38,7 @@ use smithay::reexports::calloop::timer::{TimeoutAction, Timer}; use smithay::reexports::calloop::{Dispatcher, LoopHandle, RegistrationToken}; use smithay::reexports::drm::control::{ self, connector, crtc, property, Device, Mode as DrmMode, ModeFlags, ModeTypeFlags, + ResourceHandle, }; use smithay::reexports::gbm::Modifier; use smithay::reexports::input::Libinput; @@ -1812,13 +1813,13 @@ fn surface_dmabuf_feedback( fn find_drm_property( drm: &DrmDevice, - crtc: crtc::Handle, + resource: impl ResourceHandle, name: &str, ) -> Option<(property::Handle, property::RawValue)> { - let props = match drm.get_properties(crtc) { + let props = match drm.get_properties(resource) { Ok(props) => props, Err(err) => { - warn!("error getting CRTC properties: {err:?}"); + warn!("error getting properties: {err:?}"); return None; } }; @@ -1833,13 +1834,13 @@ fn find_drm_property( fn get_drm_property( drm: &DrmDevice, - crtc: crtc::Handle, + resource: impl ResourceHandle, prop: property::Handle, ) -> Option<property::RawValue> { - let props = match drm.get_properties(crtc) { + let props = match drm.get_properties(resource) { Ok(props) => props, Err(err) => { - warn!("error getting CRTC properties: {err:?}"); + warn!("error getting properties: {err:?}"); return None; } }; |
