mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-13 18:23:03 +08:00
Related-To: NEO-4208 Change-Id: Ia4405745d1ae22f03ce344a92f2b664ef6e1b957 Signed-off-by: Jablonski, Mateusz <mateusz.jablonski@intel.com>
27 lines
620 B
C++
27 lines
620 B
C++
/*
|
|
* Copyright (C) 2019-2020 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "core/os_interface/linux/drm_neo.h"
|
|
|
|
#include "drm/i915_drm.h"
|
|
|
|
class DrmWrap : public NEO::Drm {
|
|
public:
|
|
static NEO::Drm *createDrm(RootDeviceEnvironment &rootDeviceEnvironment) {
|
|
auto hwDeviceId = Drm::discoverDevices();
|
|
if (hwDeviceId != nullptr) {
|
|
return NEO::Drm::create(std::move(hwDeviceId), rootDeviceEnvironment);
|
|
}
|
|
return nullptr;
|
|
}
|
|
static void closeDevice(int32_t deviceOrdinal) {
|
|
NEO::Drm::closeDevice(deviceOrdinal);
|
|
};
|
|
};
|