mirror of
https://github.com/ilya-zlobintsev/LACT.git
synced 2025-02-25 18:55:26 -06:00
feat: make DRM mandatory for amdgpu
This commit is contained in:
@@ -193,7 +193,7 @@ pub(crate) fn init_controller(
|
|||||||
// We use the AMD controller as the fallback even for non-AMD devices, it will at least
|
// We use the AMD controller as the fallback even for non-AMD devices, it will at least
|
||||||
// display basic device information from the SysFS
|
// display basic device information from the SysFS
|
||||||
Ok(Box::new(
|
Ok(Box::new(
|
||||||
AmdGpuController::new_from_path(common, amd_drm.as_ref())
|
AmdGpuController::new_from_path(common, None)
|
||||||
.context("Could initialize fallback controller")?,
|
.context("Could initialize fallback controller")?,
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,14 +67,12 @@ impl AmdGpuController {
|
|||||||
#[allow(unused_mut)]
|
#[allow(unused_mut)]
|
||||||
let mut drm_handle = None;
|
let mut drm_handle = None;
|
||||||
#[cfg(not(test))]
|
#[cfg(not(test))]
|
||||||
if matches!(handle.get_driver(), "amdgpu" | "radeon") && libdrm_amdgpu.is_some() {
|
if let Some(libdrm_amdgpu) = libdrm_amdgpu {
|
||||||
match get_drm_handle(&handle, libdrm_amdgpu.as_ref().unwrap()) {
|
if handle.get_driver() == "amdgpu" {
|
||||||
Ok(handle) => {
|
drm_handle = Some(
|
||||||
drm_handle = Some(handle);
|
get_drm_handle(&handle, libdrm_amdgpu)
|
||||||
}
|
.context("Could not get AMD DRM handle")?,
|
||||||
Err(err) => {
|
);
|
||||||
warn!("Could not get DRM handle: {err}");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user