Files
compute-runtime/core/os_interface/linux/drm_allocation.cpp
kamdiedrich f3fc466f5b Move memory_manager to core folder
Change-Id: I8d84d6982fea3cd785f1e15af0ee7fa361258a23
2020-02-08 15:24:13 +01:00

30 lines
781 B
C++

/*
* Copyright (C) 2019-2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "core/os_interface/linux/drm_allocation.h"
#include "core/os_interface/linux/drm_buffer_object.h"
#include "core/os_interface/linux/drm_memory_manager.h"
#include <sstream>
namespace NEO {
std::string DrmAllocation::getAllocationInfoString() const {
std::stringstream ss;
for (auto bo : bufferObjects) {
if (bo != nullptr) {
ss << " Handle: " << bo->peekHandle();
}
}
return ss.str();
}
uint64_t DrmAllocation::peekInternalHandle(MemoryManager *memoryManager) {
return static_cast<uint64_t>((static_cast<DrmMemoryManager *>(memoryManager))->obtainFdFromHandle(getBO()->peekHandle(), this->rootDeviceIndex));
}
} // namespace NEO