diff options
author | Alyssa Ross <hi@alyssa.is> | 2020-05-08 15:27:56 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2020-05-10 02:39:28 +0000 |
commit | 2f8d50adc97cc7fca6f710bd575b4f71ccb40f6b (patch) | |
tree | fefaf2c13796f8f2fa9a13b99b09c3b40ab5966b /resources/src | |
parent | 00c41c28bbc44b37fc8dcf5d2a5b4679f2aa4297 (diff) | |
parent | 03a54abf852984f696e7a101ff9590f05ebcba5b (diff) | |
download | crosvm-2f8d50adc97cc7fca6f710bd575b4f71ccb40f6b.tar crosvm-2f8d50adc97cc7fca6f710bd575b4f71ccb40f6b.tar.gz crosvm-2f8d50adc97cc7fca6f710bd575b4f71ccb40f6b.tar.bz2 crosvm-2f8d50adc97cc7fca6f710bd575b4f71ccb40f6b.tar.lz crosvm-2f8d50adc97cc7fca6f710bd575b4f71ccb40f6b.tar.xz crosvm-2f8d50adc97cc7fca6f710bd575b4f71ccb40f6b.tar.zst crosvm-2f8d50adc97cc7fca6f710bd575b4f71ccb40f6b.zip |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'resources/src')
-rw-r--r-- | resources/src/gpu_allocator.rs | 3 | ||||
-rw-r--r-- | resources/src/lib.rs | 4 | ||||
-rw-r--r-- | resources/src/system_allocator.rs | 5 |
3 files changed, 5 insertions, 7 deletions
diff --git a/resources/src/gpu_allocator.rs b/resources/src/gpu_allocator.rs index 478d0d4..cbf21a2 100644 --- a/resources/src/gpu_allocator.rs +++ b/resources/src/gpu_allocator.rs @@ -8,10 +8,7 @@ use std::fs::File; #[cfg(feature = "wl-dmabuf")] use libc::EINVAL; -#[cfg(feature = "wl-dmabuf")] -use gpu_buffer; use msg_socket::MsgOnSocket; -use sys_util; #[allow(dead_code)] #[derive(Debug, Eq, PartialEq)] diff --git a/resources/src/lib.rs b/resources/src/lib.rs index a6beceb..cf36cc1 100644 --- a/resources/src/lib.rs +++ b/resources/src/lib.rs @@ -24,8 +24,8 @@ pub enum Alloc { /// Should only be instantiated through `SystemAllocator::get_anon_alloc()`. /// Avoid using these. Instead, use / create a more descriptive Alloc variant. Anon(usize), - /// A PCI BAR region with associated bus, device, and bar numbers. - PciBar { bus: u8, dev: u8, bar: u8 }, + /// A PCI BAR region with associated bus, device, function and bar numbers. + PciBar { bus: u8, dev: u8, func: u8, bar: u8 }, /// GPU render node region. GpuRenderNode, /// Pmem device region with associated device index. diff --git a/resources/src/system_allocator.rs b/resources/src/system_allocator.rs index 984bc51..889fe01 100644 --- a/resources/src/system_allocator.rs +++ b/resources/src/system_allocator.rs @@ -25,13 +25,14 @@ use crate::{Alloc, Error, Result}; /// a.mmio_allocator(MmioType::High) /// .allocate( /// 0x100, -/// Alloc::PciBar { bus: 0, dev: 0, bar: 0 }, +/// Alloc::PciBar { bus: 0, dev: 0, func: 0, bar: 0 }, /// "bar0".to_string() /// ), /// Ok(0x10000000) /// ); /// assert_eq!( -/// a.mmio_allocator(MmioType::High).get(&Alloc::PciBar { bus: 0, dev: 0, bar: 0 }), +/// a.mmio_allocator(MmioType::High) +/// .get(&Alloc::PciBar { bus: 0, dev: 0, func: 0, bar: 0 }), /// Some(&(0x10000000, 0x100, "bar0".to_string())) /// ); /// } |