Determine the engine flag while binding the context.
Related-To: NEO-3008 Change-Id: Id2a9a210ca3a611b6663d43f1442b26cfccddb10 Signed-off-by: Piotr Fusik <piotr.fusik@intel.com>
This commit is contained in:
parent
15faadbfcc
commit
57f88ee197
|
@ -65,7 +65,7 @@ class Drm {
|
|||
uint32_t createDrmContext();
|
||||
void destroyDrmContext(uint32_t drmContextId);
|
||||
void setLowPriorityContextParam(uint32_t drmContextId);
|
||||
int bindDrmContext(uint32_t drmContextId, DeviceBitfield deviceBitfield, aub_stream::EngineType engineType);
|
||||
unsigned int bindDrmContext(uint32_t drmContextId, DeviceBitfield deviceBitfield, aub_stream::EngineType engineType);
|
||||
|
||||
void setGtType(GTTYPE eGtType) { this->eGtType = eGtType; }
|
||||
GTTYPE getGtType() const { return this->eGtType; }
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "runtime/os_interface/linux/drm_engine_mapper.h"
|
||||
|
||||
#include "drm_neo.h"
|
||||
|
||||
namespace NEO {
|
||||
|
@ -19,8 +21,8 @@ void Drm::queryEngineInfo() {
|
|||
void Drm::queryMemoryInfo() {
|
||||
}
|
||||
|
||||
int Drm::bindDrmContext(uint32_t drmContextId, DeviceBitfield deviceBitfield, aub_stream::EngineType engineType) {
|
||||
return -1;
|
||||
unsigned int Drm::bindDrmContext(uint32_t drmContextId, DeviceBitfield deviceBitfield, aub_stream::EngineType engineType) {
|
||||
return DrmEngineMapper::engineNodeMap(engineType);
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
#include "runtime/os_interface/linux/os_context_linux.h"
|
||||
|
||||
#include "runtime/os_interface/linux/drm_engine_mapper.h"
|
||||
#include "runtime/os_interface/linux/drm_neo.h"
|
||||
#include "runtime/os_interface/linux/os_interface.h"
|
||||
#include "runtime/os_interface/os_context.h"
|
||||
|
@ -26,12 +25,11 @@ OsContextLinux::OsContextLinux(Drm &drm, uint32_t contextId, DeviceBitfield devi
|
|||
aub_stream::EngineType engineType, PreemptionMode preemptionMode, bool lowPriority)
|
||||
: OsContext(contextId, deviceBitfield, engineType, preemptionMode, lowPriority), drm(drm) {
|
||||
|
||||
engineFlag = DrmEngineMapper::engineNodeMap(engineType);
|
||||
this->drmContextId = drm.createDrmContext();
|
||||
if (drm.isPreemptionSupported() && lowPriority) {
|
||||
drm.setLowPriorityContextParam(this->drmContextId);
|
||||
}
|
||||
drm.bindDrmContext(this->drmContextId, deviceBitfield, engineType);
|
||||
this->engineFlag = drm.bindDrmContext(this->drmContextId, deviceBitfield, engineType);
|
||||
}
|
||||
|
||||
OsContextLinux::~OsContextLinux() {
|
||||
|
|
Loading…
Reference in New Issue