mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-12 00:59:38 +08:00
Resolves: NEO-4310 Related-To: NEO-4208 Change-Id: Ib4ce27a18a860214b76505f6e122666c86207783 Signed-off-by: Jablonski, Mateusz <mateusz.jablonski@intel.com>
25 lines
570 B
C++
25 lines
570 B
C++
/*
|
|
* Copyright (C) 2019-2020 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "core/os_interface/linux/drm_neo.h"
|
|
#include "core/os_interface/os_interface.h"
|
|
|
|
#include "drm/i915_drm.h"
|
|
|
|
class DrmWrap : public NEO::Drm {
|
|
public:
|
|
static NEO::Drm *createDrm(RootDeviceEnvironment &rootDeviceEnvironment) {
|
|
auto hwDeviceIds = OSInterface::discoverDevices();
|
|
if (!hwDeviceIds.empty()) {
|
|
return NEO::Drm::create(std::move(hwDeviceIds[0]), rootDeviceEnvironment);
|
|
}
|
|
return nullptr;
|
|
}
|
|
};
|