mirror of
https://github.com/ilya-zlobintsev/LACT.git
synced 2025-02-25 18:55:26 -06:00
feat: show if resizeable bar is enabled
This commit is contained in:
12
Cargo.lock
generated
12
Cargo.lock
generated
@@ -1150,7 +1150,7 @@ checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lact"
|
name = "lact"
|
||||||
version = "0.4.5"
|
version = "0.4.6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"lact-cli",
|
"lact-cli",
|
||||||
@@ -1161,7 +1161,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lact-cli"
|
name = "lact-cli"
|
||||||
version = "0.4.5"
|
version = "0.4.6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"lact-client",
|
"lact-client",
|
||||||
@@ -1170,7 +1170,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lact-client"
|
name = "lact-client"
|
||||||
version = "0.4.5"
|
version = "0.4.6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"lact-schema",
|
"lact-schema",
|
||||||
@@ -1182,7 +1182,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lact-daemon"
|
name = "lact-daemon"
|
||||||
version = "0.4.5"
|
version = "0.4.6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bincode",
|
"bincode",
|
||||||
@@ -1204,7 +1204,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lact-gui"
|
name = "lact-gui"
|
||||||
version = "0.4.5"
|
version = "0.4.6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"gtk4",
|
"gtk4",
|
||||||
@@ -1218,7 +1218,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lact-schema"
|
name = "lact-schema"
|
||||||
version = "0.4.5"
|
version = "0.4.6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"amdgpu-sysfs",
|
"amdgpu-sysfs",
|
||||||
"clap",
|
"clap",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "lact-cli"
|
name = "lact-cli"
|
||||||
version = "0.4.5"
|
version = "0.4.6"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "lact-client"
|
name = "lact-client"
|
||||||
version = "0.4.5"
|
version = "0.4.6"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "lact-daemon"
|
name = "lact-daemon"
|
||||||
version = "0.4.5"
|
version = "0.4.6"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
|||||||
@@ -197,6 +197,7 @@ impl GpuController {
|
|||||||
drm_handle
|
drm_handle
|
||||||
.and_then(|handle| handle.memory_info().ok())
|
.and_then(|handle| handle.memory_info().ok())
|
||||||
.map(|memory_info| DrmMemoryInfo {
|
.map(|memory_info| DrmMemoryInfo {
|
||||||
|
resizeable_bar: memory_info.check_resizable_bar(),
|
||||||
cpu_accessible_used: memory_info.cpu_accessible_vram.heap_usage,
|
cpu_accessible_used: memory_info.cpu_accessible_vram.heap_usage,
|
||||||
cpu_accessible_total: memory_info.cpu_accessible_vram.total_heap_size,
|
cpu_accessible_total: memory_info.cpu_accessible_vram.total_heap_size,
|
||||||
});
|
});
|
||||||
@@ -211,7 +212,9 @@ impl GpuController {
|
|||||||
vram_type: drm_info.get_vram_type().to_string(),
|
vram_type: drm_info.get_vram_type().to_string(),
|
||||||
vram_bit_width: drm_info.vram_bit_width,
|
vram_bit_width: drm_info.vram_bit_width,
|
||||||
vram_max_bw: drm_info.peak_memory_bw_gb().to_string(),
|
vram_max_bw: drm_info.peak_memory_bw_gb().to_string(),
|
||||||
|
l1_cache_per_cu: drm_info.get_l1_cache_size(),
|
||||||
l2_cache: drm_info.calc_l2_cache_size(),
|
l2_cache: drm_info.calc_l2_cache_size(),
|
||||||
|
l3_cache_mb: drm_info.calc_l3_cache_size_mb(),
|
||||||
memory_info: drm_memory_info,
|
memory_info: drm_memory_info,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "lact-gui"
|
name = "lact-gui"
|
||||||
version = "0.4.5"
|
version = "0.4.6"
|
||||||
authors = ["Ilya Zlobintsev <ilya.zl@protonmail.com>"]
|
authors = ["Ilya Zlobintsev <ilya.zl@protonmail.com>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ pub struct InformationPage {
|
|||||||
vram_type_label: Label,
|
vram_type_label: Label,
|
||||||
vram_peak_bw_label: Label,
|
vram_peak_bw_label: Label,
|
||||||
compute_units_label: Label,
|
compute_units_label: Label,
|
||||||
|
resizable_bar_enabled: Label,
|
||||||
cpu_accessible_vram_label: Label,
|
cpu_accessible_vram_label: Label,
|
||||||
link_speed_label: Label,
|
link_speed_label: Label,
|
||||||
vulkan_info_frame: VulkanInfoFrame,
|
vulkan_info_frame: VulkanInfoFrame,
|
||||||
@@ -48,9 +49,10 @@ impl InformationPage {
|
|||||||
let vram_size_label = label_row("VRAM Size:", &values_grid, 7, 0, true);
|
let vram_size_label = label_row("VRAM Size:", &values_grid, 7, 0, true);
|
||||||
let vram_type_label = label_row("VRAM Type:", &values_grid, 8, 0, true);
|
let vram_type_label = label_row("VRAM Type:", &values_grid, 8, 0, true);
|
||||||
let vram_peak_bw_label = label_row("Peak VRAM Bandwidth:", &values_grid, 9, 0, true);
|
let vram_peak_bw_label = label_row("Peak VRAM Bandwidth:", &values_grid, 9, 0, true);
|
||||||
|
let resizable_bar_enabled = label_row("Resizeable BAR:", &values_grid, 10, 0, true);
|
||||||
let cpu_accessible_vram_label =
|
let cpu_accessible_vram_label =
|
||||||
label_row("CPU Accessible VRAM:", &values_grid, 10, 0, true);
|
label_row("CPU Accessible VRAM:", &values_grid, 11, 0, true);
|
||||||
let link_speed_label = label_row("Link Speed:", &values_grid, 11, 0, true);
|
let link_speed_label = label_row("Link Speed:", &values_grid, 12, 0, true);
|
||||||
|
|
||||||
info_container.append(&values_grid);
|
info_container.append(&values_grid);
|
||||||
vbox.append(&info_container);
|
vbox.append(&info_container);
|
||||||
@@ -88,6 +90,7 @@ impl InformationPage {
|
|||||||
family_name,
|
family_name,
|
||||||
asic_name,
|
asic_name,
|
||||||
vram_type_label,
|
vram_type_label,
|
||||||
|
resizable_bar_enabled,
|
||||||
cpu_accessible_vram_label,
|
cpu_accessible_vram_label,
|
||||||
compute_units_label,
|
compute_units_label,
|
||||||
vram_peak_bw_label,
|
vram_peak_bw_label,
|
||||||
@@ -130,6 +133,8 @@ impl InformationPage {
|
|||||||
let mut vram_type = "Unknown";
|
let mut vram_type = "Unknown";
|
||||||
let mut vram_max_bw = "Unknown";
|
let mut vram_max_bw = "Unknown";
|
||||||
let mut cpu_accessible_vram = "Unknown".to_owned();
|
let mut cpu_accessible_vram = "Unknown".to_owned();
|
||||||
|
let mut resizeable_bar_enabled = "Unknown";
|
||||||
|
|
||||||
if let Some(drm_info) = &gpu_info.drm_info {
|
if let Some(drm_info) = &gpu_info.drm_info {
|
||||||
family_name = &drm_info.family_name;
|
family_name = &drm_info.family_name;
|
||||||
asic_name = &drm_info.asic_name;
|
asic_name = &drm_info.asic_name;
|
||||||
@@ -138,6 +143,12 @@ impl InformationPage {
|
|||||||
vram_max_bw = &drm_info.vram_max_bw;
|
vram_max_bw = &drm_info.vram_max_bw;
|
||||||
|
|
||||||
if let Some(memory_info) = &drm_info.memory_info {
|
if let Some(memory_info) = &drm_info.memory_info {
|
||||||
|
resizeable_bar_enabled = if memory_info.resizeable_bar {
|
||||||
|
"Enabled"
|
||||||
|
} else {
|
||||||
|
"Disabled"
|
||||||
|
};
|
||||||
|
|
||||||
cpu_accessible_vram = (memory_info.cpu_accessible_total / 1024 / 1024).to_string();
|
cpu_accessible_vram = (memory_info.cpu_accessible_total / 1024 / 1024).to_string();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -152,6 +163,8 @@ impl InformationPage {
|
|||||||
self.vram_peak_bw_label
|
self.vram_peak_bw_label
|
||||||
.set_markup(&format!("<b>{vram_max_bw} GiB/s</b>"));
|
.set_markup(&format!("<b>{vram_max_bw} GiB/s</b>"));
|
||||||
|
|
||||||
|
self.resizable_bar_enabled
|
||||||
|
.set_markup(&format!("<b>{resizeable_bar_enabled}</b>"));
|
||||||
self.cpu_accessible_vram_label
|
self.cpu_accessible_vram_label
|
||||||
.set_markup(&format!("<b>{cpu_accessible_vram} MiB</b>"));
|
.set_markup(&format!("<b>{cpu_accessible_vram} MiB</b>"));
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "lact-schema"
|
name = "lact-schema"
|
||||||
version = "0.4.5"
|
version = "0.4.6"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
|||||||
@@ -102,7 +102,9 @@ pub struct DrmInfo {
|
|||||||
pub vram_type: String,
|
pub vram_type: String,
|
||||||
pub vram_bit_width: u32,
|
pub vram_bit_width: u32,
|
||||||
pub vram_max_bw: String,
|
pub vram_max_bw: String,
|
||||||
|
pub l1_cache_per_cu: u32,
|
||||||
pub l2_cache: u32,
|
pub l2_cache: u32,
|
||||||
|
pub l3_cache_mb: u32,
|
||||||
pub memory_info: Option<DrmMemoryInfo>,
|
pub memory_info: Option<DrmMemoryInfo>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -110,6 +112,7 @@ pub struct DrmInfo {
|
|||||||
pub struct DrmMemoryInfo {
|
pub struct DrmMemoryInfo {
|
||||||
pub cpu_accessible_used: u64,
|
pub cpu_accessible_used: u64,
|
||||||
pub cpu_accessible_total: u64,
|
pub cpu_accessible_total: u64,
|
||||||
|
pub resizeable_bar: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Default, Debug, Clone)]
|
#[derive(Serialize, Deserialize, Default, Debug, Clone)]
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "lact"
|
name = "lact"
|
||||||
version = "0.4.5"
|
version = "0.4.6"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ metadata:
|
|||||||
description: AMDGPU control utility
|
description: AMDGPU control utility
|
||||||
arch: x86_64
|
arch: x86_64
|
||||||
license: MIT
|
license: MIT
|
||||||
version: 0.4.5
|
version: 0.4.6
|
||||||
maintainer: ilya-zlobintsev
|
maintainer: ilya-zlobintsev
|
||||||
url: https://github.com/ilya-zlobintsev/lact
|
url: https://github.com/ilya-zlobintsev/lact
|
||||||
source:
|
source:
|
||||||
|
|||||||
Reference in New Issue
Block a user