• Home
  • Raw
  • Download

Lines Matching refs:heap_name

49 int BufferAllocator::OpenDmabufHeap(const std::string& heap_name) {  in OpenDmabufHeap()  argument
53 auto it = dmabuf_heap_fds_.find(heap_name); in OpenDmabufHeap()
69 it = dmabuf_heap_fds_.find(heap_name); in OpenDmabufHeap()
72 std::string heap_path = kDmaHeapRoot + heap_name; in OpenDmabufHeap()
76 LOG(INFO) << "Using DMA-BUF heap named: " << heap_name; in OpenDmabufHeap()
78 auto ret = dmabuf_heap_fds_.insert({heap_name, android::base::unique_fd(fd)}); in OpenDmabufHeap()
118 int BufferAllocator::MapNameToIonMask(const std::string& heap_name, unsigned int ion_heap_mask, in MapNameToIonMask() argument
125 heap_name_to_config_[heap_name] = heap_config; in MapNameToIonMask()
129 int BufferAllocator::GetIonHeapIdByName(const std::string& heap_name, unsigned int* heap_id) { in GetIonHeapIdByName() argument
131 if (heap_name == it.name) { in GetIonHeapIdByName()
137 LOG(ERROR) << "No ion heap of name " << heap_name << " exists"; in GetIonHeapIdByName()
141 int BufferAllocator::MapNameToIonName(const std::string& heap_name, in MapNameToIonName() argument
153 heap_name_to_config_[heap_name] = heap_config; in MapNameToIonName()
158 int BufferAllocator::MapNameToIonHeap(const std::string& heap_name, in MapNameToIonHeap() argument
164 int ret = OpenDmabufHeap(heap_name); in MapNameToIonHeap()
169 ret = MapNameToIonMask(heap_name, legacy_ion_heap_mask, legacy_ion_heap_flags); in MapNameToIonHeap()
171 ret = MapNameToIonName(heap_name, ion_heap_name, ion_heap_flags); in MapNameToIonHeap()
177 int BufferAllocator::GetIonConfig(const std::string& heap_name, IonHeapConfig& heap_config) { in GetIonConfig() argument
182 auto it = heap_name_to_config_.find(heap_name); in GetIonConfig()
194 ret = GetIonHeapIdByName(heap_name, &heap_id); in GetIonConfig()
200 heap_name_to_config_[heap_name] = heap_config; in GetIonConfig()
205 LOG(ERROR) << "No ion heap of name " << heap_name << " exists"; in GetIonConfig()
209 int BufferAllocator::DmabufAlloc(const std::string& heap_name, size_t len) { in DmabufAlloc() argument
210 int fd = OpenDmabufHeap(heap_name); in DmabufAlloc()
220 PLOG(ERROR) << "Unable to allocate from DMA-BUF heap: " << heap_name; in DmabufAlloc()
227 int BufferAllocator::IonAlloc(const std::string& heap_name, size_t len, in IonAlloc() argument
230 auto ret = GetIonConfig(heap_name, heap_config); in IonAlloc()
245 int BufferAllocator::Alloc(const std::string& heap_name, size_t len, in Alloc() argument
247 int fd = DmabufAlloc(heap_name, len); in Alloc()
250 fd = IonAlloc(heap_name, len, heap_flags, legacy_align); in Alloc()