Files
compute-runtime/runtime/os_interface/linux/drm_allocation.cpp
Jobczyk, Lukasz 172e75147e Make OsInterface root device specific
Related-To: NEO-3857

Change-Id: Ibcd80c731b5d3755b62e0e03d0ffeedb08b52ca0
Signed-off-by: Jobczyk, Lukasz <lukasz.jobczyk@intel.com>
2020-01-15 11:07:25 +01:00

30 lines
790 B
C++

/*
* Copyright (C) 2019-2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/os_interface/linux/drm_allocation.h"
#include "runtime/os_interface/linux/drm_buffer_object.h"
#include "runtime/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