diff options
author | Dylan Reid <dgreid@chromium.org> | 2018-06-07 15:42:41 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-07-09 17:59:23 -0700 |
commit | 228e4a6a91ea2972b2443d3959c14d862a23c358 (patch) | |
tree | 4b7fd7bf8249b7dde2fbd8b958d836bc0a12d420 /aarch64/src/lib.rs | |
parent | 20d71f8928e1e95f6554c87cfca12f24f9f652cf (diff) | |
download | crosvm-228e4a6a91ea2972b2443d3959c14d862a23c358.tar crosvm-228e4a6a91ea2972b2443d3959c14d862a23c358.tar.gz crosvm-228e4a6a91ea2972b2443d3959c14d862a23c358.tar.bz2 crosvm-228e4a6a91ea2972b2443d3959c14d862a23c358.tar.lz crosvm-228e4a6a91ea2972b2443d3959c14d862a23c358.tar.xz crosvm-228e4a6a91ea2972b2443d3959c14d862a23c358.tar.zst crosvm-228e4a6a91ea2972b2443d3959c14d862a23c358.zip |
Move gpu allocator to resources
Combine GPU buffer allocation with the system resource allocator making life easier as only one allocator needs to get passed to the execute function. Change-Id: I199eb0fd6b99b629aaec1ae3295e8a1942da5309 Signed-off-by: Dylan Reid <dgreid@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1099856
Diffstat (limited to 'aarch64/src/lib.rs')
-rw-r--r-- | aarch64/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/aarch64/src/lib.rs b/aarch64/src/lib.rs index a030d5e..35da1fd 100644 --- a/aarch64/src/lib.rs +++ b/aarch64/src/lib.rs @@ -205,12 +205,12 @@ impl arch::LinuxArch for AArch64 { } /// Returns a system resource allocator. - fn get_resource_allocator(mem_size: u64) -> SystemAllocator { + fn get_resource_allocator(mem_size: u64, gpu_allocation: bool) -> SystemAllocator { let device_addr_start = Self::get_base_dev_pfn(mem_size) * sys_util::pagesize() as u64; AddressRanges::new() .add_device_addresses(device_addr_start, u64::max_value() - device_addr_start) .add_mmio_addresses(AARCH64_MMIO_BASE, 0x10000) - .create_allocator(AARCH64_IRQ_BASE).unwrap() + .create_allocator(AARCH64_IRQ_BASE, gpu_allocation).unwrap() } /// This adds any early platform devices for this architecture. |