Create enum for Ioctl request values

Related-To: NEO-6852
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2022-05-25 17:05:52 +00:00
committed by Compute-Runtime-Automation
parent 0bf3af37d3
commit b3814e41b4
44 changed files with 606 additions and 464 deletions

View File

@@ -49,7 +49,7 @@ DebugSession *DebugSession::create(const zet_debug_config_t &config, Device *dev
open.pid = config.pid;
open.events = 0;
auto debugFd = DrmHelper::ioctl(device, PRELIM_DRM_IOCTL_I915_DEBUGGER_OPEN, &open);
auto debugFd = DrmHelper::ioctl(device, NEO::DrmIoctl::DebuggerOpen, &open);
if (debugFd >= 0) {
PRINT_DEBUGGER_INFO_LOG("PRELIM_DRM_IOCTL_I915_DEBUGGER_OPEN: open.pid: %d, open.events: %d, debugFd: %d\n",
open.pid, open.events, debugFd);

View File

@@ -9,9 +9,11 @@
#include "shared/source/os_interface/linux/drm_neo.h"
#include "level_zero/core/source/device/device.h"
namespace L0 {
int DrmHelper::ioctl(Device *device, unsigned long request, void *arg) {
int DrmHelper::ioctl(Device *device, NEO::DrmIoctl request, void *arg) {
auto drm = device->getOsInterface().getDriverModel()->as<NEO::Drm>();
return drm->ioctl(request, arg);
}

View File

@@ -7,15 +7,18 @@
#include "shared/source/helpers/topology_map.h"
#include "level_zero/core/source/device/device.h"
namespace NEO {
struct EngineClassInstance;
enum class DrmIoctl;
} // namespace NEO
namespace aub_stream {
enum EngineType : uint32_t;
}
namespace L0 {
struct Device;
struct DrmHelper {
static int ioctl(Device *device, unsigned long request, void *arg);
static int ioctl(Device *device, NEO::DrmIoctl request, void *arg);
static int getErrno(Device *device);
static uint32_t getEngineTileIndex(Device *device, const NEO::EngineClassInstance &engine);
static const NEO::EngineClassInstance *getEngineInstance(Device *device, uint32_t tile, aub_stream::EngineType engineType);