2018-11-08 13:05:46 +01:00
|
|
|
/*
|
2019-02-27 11:17:17 +01:00
|
|
|
* Copyright (C) 2018-2019 Intel Corporation
|
2018-11-08 13:05:46 +01:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "runtime/os_interface/os_context.h"
|
|
|
|
|
|
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-20 10:56:22 +01:00
|
|
|
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; }
|
2018-12-11 08:21:56 +01:00
|
|
|
uint32_t getDrmContextId() const { return drmContextId; }
|
2018-11-08 13:05:46 +01:00
|
|
|
|
|
|
|
|
protected:
|
2018-11-26 14:04:52 +01:00
|
|
|
unsigned int engineFlag = 0;
|
2018-12-11 08:21:56 +01:00
|
|
|
uint32_t drmContextId = 0;
|
2018-11-08 13:05:46 +01:00
|
|
|
Drm &drm;
|
|
|
|
|
};
|
2019-03-26 11:59:46 +01:00
|
|
|
} // namespace NEO
|