Skip to main content

read_card_identity

Function read_card_identity 

Source
pub(crate) fn read_card_identity(device: &Path) -> CardIdentity
Expand description

Read a DRM card’s CardIdentity from sysfs.

The device’s uevent file is the primary source (DRIVER=, PCI_ID=, OF_COMPATIBLE_n=) because it is uniform across buses and readable in unprivileged containers. Each field has a fallback for cards whose uevent omits it: the vendor file for the PCI vendor, modalias (of:...C<compatible>) for the devicetree compatibles, and the driver symlink for the name.