libdrm_amdgpu_sys

Crates.iolibdrm_amdgpu_sys
lib.rslibdrm_amdgpu_sys
version
sourcesrc
created_at2022-05-28 23:20:42.36693
updated_at2024-12-13 01:41:04.727952
descriptionlibdrm_amdgpu bindings for Rust, and some methods ported from Mesa3D.
homepage
repositoryhttps://github.com/Umio-Yasuno/libdrm-amdgpu-sys-rs
max_upload_size
id596084
Cargo.toml error:TOML parse error at line 19, column 1 | 19 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Umio Yasuno (Umio-Yasuno)

documentation

README

libdrm-amdgpu-sys-rs

libdrm_amdgpu bindings for Rust, and some methods ported from Mesa3D (mainly ac_gpu_info.c).

Reference

License

  • MIT License

Documentation

Dependent dynamic libraries

  • libdrm
  • libdrm_amdgpu

Distribution specific instructions

Debian/Ubuntu

sudo apt install libdrm-dev

Examples

let (amdgpu_dev, drm_major, drm_minor) = {
    use std::fs::OpenOptions;
    use std::os::fd::IntoRawFd;

    let fd = OpenOptions::new().read(true).write(true).open("/dev/dri/renderD128").unwrap();

    AMDGPU::DeviceHandle::init(fd.into_raw_fd()).unwrap()
};
let mark_name = amdgpu_dev.get_marketing_name().unwrap();
let device_info = amdgpu_dev.device_info().unwrap();

amdgpu_info

cargo run --example amdgpu_info

vbios_dump

cargo run --example vbios_dump

gpu_metrics

cargo run --example gpu_metrics

Build

To generate a new bindings/drm.rs .

cargo build --features=buildtime_bindgen
Commit count: 359

cargo fmt