2018-11-08 13:05:46 +01:00
|
|
|
/*
|
2020-01-13 14:47:05 +01:00
|
|
|
* Copyright (C) 2018-2020 Intel Corporation
|
2018-11-08 13:05:46 +01:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
2019-09-01 21:36:15 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
2020-02-23 22:44:01 +01:00
|
|
|
#include "shared/source/os_interface/os_context.h"
|
2018-11-08 13:05:46 +01:00
|
|
|
|
2019-07-11 14:29:45 +02:00
|
|
|
#include <vector>
|
|
|
|
|
|
2019-03-26 11:59:46 +01:00
|
|
|
namespace NEO {
|
2018-11-08 13:05:46 +01:00
|
|
|
class Drm;
|
|
|
|
|
|
2019-02-27 11:17:17 +01:00
|
|
|
class OsContextLinux : public OsContext {
|
2018-11-08 13:05:46 +01:00
|
|
|
public:
|
2019-02-27 11:17:17 +01:00
|
|
|
OsContextLinux() = delete;
|
|
|
|
|
~OsContextLinux() override;
|
2019-03-13 15:00:07 +01:00
|
|
|
OsContextLinux(Drm &drm, uint32_t contextId, DeviceBitfield deviceBitfield,
|
2019-03-27 10:06:29 +01:00
|
|
|
aub_stream::EngineType engineType, PreemptionMode preemptionMode, bool lowPriority);
|
2019-02-27 11:17:17 +01:00
|
|
|
|
2018-11-26 14:04:52 +01:00
|
|
|
unsigned int getEngineFlag() const { return engineFlag; }
|
2019-07-17 15:38:14 +02:00
|
|
|
const std::vector<uint32_t> &getDrmContextIds() const { return drmContextIds; }
|
2018-11-08 13:05:46 +01:00
|
|
|
|
|
|
|
|
protected:
|
2018-11-26 14:04:52 +01:00
|
|
|
unsigned int engineFlag = 0;
|
2019-07-11 14:29:45 +02:00
|
|
|
std::vector<uint32_t> drmContextIds;
|
2018-11-08 13:05:46 +01:00
|
|
|
Drm &drm;
|
|
|
|
|
};
|
2019-03-26 11:59:46 +01:00
|
|
|
} // namespace NEO
|