mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-11 04:26:38 +00:00
virtio-gpu: add a BAR for device
BUG=chromium:924405 TEST=compile Change-Id: I8a583df2a9db4ea7e066eb284eac54fc62580350 Reviewed-on: https://chromium-review.googlesource.com/1480744 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: kokoro <noreply+kokoro@google.com> Tested-by: Gurchetan Singh <gurchetansingh@chromium.org> Reviewed-by: Zach Reizner <zachr@chromium.org>
This commit is contained in:
parent
09358ef076
commit
e95f4d75c0
1 changed files with 13 additions and 0 deletions
|
@ -36,6 +36,7 @@ use super::{
|
|||
|
||||
use self::backend::Backend;
|
||||
use self::protocol::*;
|
||||
use pci::{PciBarConfiguration, PciBarPrefetchable, PciBarRegionType};
|
||||
|
||||
// First queue is for virtio gpu commands. Second queue is for cursor commands, which we expect
|
||||
// there to be fewer of.
|
||||
|
@ -809,4 +810,16 @@ impl VirtioDevice for Gpu {
|
|||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Require 1 BAR for mapping 3D buffers
|
||||
fn get_device_bars(&self) -> Option<Vec<PciBarConfiguration>> {
|
||||
let mut bars = Vec::new();
|
||||
bars.push(PciBarConfiguration::new(
|
||||
4,
|
||||
1 << 33,
|
||||
PciBarRegionType::Memory64BitRegion,
|
||||
PciBarPrefetchable::NotPrefetchable,
|
||||
));
|
||||
Some(bars)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue