Skip to main content

device_is_integrated

Function device_is_integrated 

Source
pub fn device_is_integrated(
    name: Option<&str>,
    pci_device_id: Option<&str>,
    gfx_arch: Option<&str>,
    vram_bytes: Option<u64>,
) -> bool
Expand description

Combined, fail-safe classification of a single device.

Inputs are all optional — provide whatever the caller has. Returns true (integrated) when ANY of:

  • the PCI device id is a known iGPU (pci_device_id), OR
  • the gfx architecture is iGPU-only (gfx_arch, e.g. gfx1036 Raphael) — the structural fallback when the marketing name is empty, OR
  • the name classifies as integrated (name), OR
  • the name is ambiguous AND the device’s VRAM is readable and below DISCRETE_MIN_VRAM_BYTES (confirmation only).

Unreadable VRAM alone NEVER classifies a device as integrated (that would risk dropping a real dGPU on kernels lacking mem_info_vram_total); the PCI id, gfx arch, and name are the authoritative signals. A dGPU is never missed: every exclusion requires a positive iGPU signal.