refactor: cleanup includes

Signed-off-by: Jaroslaw Warchulski <jaroslaw.warchulski@intel.com>
This commit is contained in:
Jaroslaw Warchulski
2025-12-09 17:35:47 +00:00
committed by Compute-Runtime-Automation
parent 0775972769
commit 60376bd98a
14 changed files with 88 additions and 48 deletions

View File

@@ -29,6 +29,26 @@
namespace NEO {
DrmAllocation::DrmAllocation(uint32_t rootDeviceIndex, size_t numGmms, AllocationType allocationType, BufferObject *bo, void *ptrIn, size_t sizeIn, osHandle sharedHandle, MemoryPool pool, uint64_t canonizedGpuAddress)
: GraphicsAllocation(rootDeviceIndex, numGmms, allocationType, ptrIn, sizeIn, sharedHandle, pool, MemoryManager::maxOsContextCount, canonizedGpuAddress) {
bufferObjects.push_back(bo);
resizeBufferObjects(EngineLimits::maxHandleCount);
handles.resize(EngineLimits::maxHandleCount, std::numeric_limits<uint64_t>::max());
}
DrmAllocation::DrmAllocation(uint32_t rootDeviceIndex, size_t numGmms, AllocationType allocationType, BufferObject *bo, void *ptrIn, uint64_t canonizedGpuAddress, size_t sizeIn, MemoryPool pool)
: GraphicsAllocation(rootDeviceIndex, numGmms, allocationType, ptrIn, canonizedGpuAddress, 0, sizeIn, pool, MemoryManager::maxOsContextCount) {
bufferObjects.push_back(bo);
resizeBufferObjects(EngineLimits::maxHandleCount);
handles.resize(EngineLimits::maxHandleCount, std::numeric_limits<uint64_t>::max());
}
DrmAllocation::DrmAllocation(uint32_t rootDeviceIndex, size_t numGmms, AllocationType allocationType, BufferObjects &bos, void *ptrIn, uint64_t canonizedGpuAddress, size_t sizeIn, MemoryPool pool)
: GraphicsAllocation(rootDeviceIndex, numGmms, allocationType, ptrIn, canonizedGpuAddress, 0, sizeIn, pool, MemoryManager::maxOsContextCount),
bufferObjects(bos) {
handles.resize(EngineLimits::maxHandleCount, std::numeric_limits<uint64_t>::max());
}
DrmAllocation::~DrmAllocation() {
[[maybe_unused]] int retCode;
for (auto &memory : this->memoryToUnmap) {

View File

@@ -6,13 +6,15 @@
*/
#pragma once
#include "shared/source/device/sub_device_ids_vec.h"
#include "shared/source/memory_manager/graphics_allocation.h"
#include "shared/source/memory_manager/memadvise_flags.h"
#include "shared/source/memory_manager/memory_manager.h"
namespace NEO {
class BufferObject;
class MemoryManager;
class OsContext;
class ProductHelper;
class Drm;
class OsContextLinux;
enum class CachePolicy : uint32_t;
@@ -36,25 +38,9 @@ class DrmAllocation : public GraphicsAllocation {
MemoryUnmapFunction unmapFunction;
};
DrmAllocation(uint32_t rootDeviceIndex, size_t numGmms, AllocationType allocationType, BufferObject *bo, void *ptrIn, size_t sizeIn, osHandle sharedHandle, MemoryPool pool, uint64_t canonizedGpuAddress)
: GraphicsAllocation(rootDeviceIndex, numGmms, allocationType, ptrIn, sizeIn, sharedHandle, pool, MemoryManager::maxOsContextCount, canonizedGpuAddress) {
bufferObjects.push_back(bo);
resizeBufferObjects(EngineLimits::maxHandleCount);
handles.resize(EngineLimits::maxHandleCount, std::numeric_limits<uint64_t>::max());
}
DrmAllocation(uint32_t rootDeviceIndex, size_t numGmms, AllocationType allocationType, BufferObject *bo, void *ptrIn, uint64_t canonizedGpuAddress, size_t sizeIn, MemoryPool pool)
: GraphicsAllocation(rootDeviceIndex, numGmms, allocationType, ptrIn, canonizedGpuAddress, 0, sizeIn, pool, MemoryManager::maxOsContextCount) {
bufferObjects.push_back(bo);
resizeBufferObjects(EngineLimits::maxHandleCount);
handles.resize(EngineLimits::maxHandleCount, std::numeric_limits<uint64_t>::max());
}
DrmAllocation(uint32_t rootDeviceIndex, size_t numGmms, AllocationType allocationType, BufferObjects &bos, void *ptrIn, uint64_t canonizedGpuAddress, size_t sizeIn, MemoryPool pool)
: GraphicsAllocation(rootDeviceIndex, numGmms, allocationType, ptrIn, canonizedGpuAddress, 0, sizeIn, pool, MemoryManager::maxOsContextCount),
bufferObjects(bos) {
handles.resize(EngineLimits::maxHandleCount, std::numeric_limits<uint64_t>::max());
}
DrmAllocation(uint32_t rootDeviceIndex, size_t numGmms, AllocationType allocationType, BufferObject *bo, void *ptrIn, size_t sizeIn, osHandle sharedHandle, MemoryPool pool, uint64_t canonizedGpuAddress);
DrmAllocation(uint32_t rootDeviceIndex, size_t numGmms, AllocationType allocationType, BufferObject *bo, void *ptrIn, uint64_t canonizedGpuAddress, size_t sizeIn, MemoryPool pool);
DrmAllocation(uint32_t rootDeviceIndex, size_t numGmms, AllocationType allocationType, BufferObjects &bos, void *ptrIn, uint64_t canonizedGpuAddress, size_t sizeIn, MemoryPool pool);
~DrmAllocation() override;

View File

@@ -13,6 +13,7 @@
#include "shared/source/helpers/hw_info.h"
#include "shared/source/helpers/ptr_math.h"
#include "shared/source/helpers/register_offsets.h"
#include "shared/source/memory_manager/memory_manager.h"
#include "shared/source/os_interface/linux/drm_neo.h"
#include "shared/source/os_interface/linux/drm_wrappers.h"
#include "shared/source/os_interface/linux/engine_info.h"

View File

@@ -7,7 +7,6 @@
#include "shared/source/os_interface/linux/xe/ioctl_helper_xe.h"
#include "shared/source/debugger/debugger.h"
#include "shared/source/execution_environment/execution_environment.h"
#include "shared/source/execution_environment/root_device_environment.h"
#include "shared/source/gmm_helper/client_context/gmm_client_context.h"
@@ -16,16 +15,13 @@
#include "shared/source/helpers/basic_math.h"
#include "shared/source/helpers/common_types.h"
#include "shared/source/helpers/constants.h"
#include "shared/source/helpers/engine_control.h"
#include "shared/source/helpers/gfx_core_helper.h"
#include "shared/source/helpers/hw_info.h"
#include "shared/source/helpers/ptr_math.h"
#include "shared/source/helpers/string.h"
#include "shared/source/helpers/topology.h"
#include "shared/source/memory_manager/memory_manager.h"
#include "shared/source/os_interface/linux/drm_buffer_object.h"
#include "shared/source/os_interface/linux/drm_neo.h"
#include "shared/source/os_interface/linux/engine_info.h"
#include "shared/source/os_interface/linux/file_descriptor.h"
#include "shared/source/os_interface/linux/memory_info.h"
#include "shared/source/os_interface/linux/os_context_linux.h"
#include "shared/source/os_interface/linux/sys_calls.h"
@@ -37,6 +33,7 @@
#include <iostream>
#include <limits>
#include <sstream>
#include <sys/mman.h>
#define STRINGIFY_ME(X) return #X
#define RETURN_ME(X) return X