Command streamers should use device default engine type

Change-Id: I7286f15ba78001729ea489a43576d96f109d44f0
This commit is contained in:
Zdanowicz, Zbigniew
2017-11-14 11:15:09 +01:00
parent 42ed21f7fa
commit 602474f868
52 changed files with 300 additions and 194 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Intel Corporation
* Copyright (c) 2017 - 2018, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -27,6 +27,7 @@
#include "runtime/mem_obj/buffer.h"
#include "runtime/os_interface/linux/drm_buffer_object.h"
#include "runtime/os_interface/linux/drm_command_stream.h"
#include "runtime/os_interface/linux/drm_engine_mapper.h"
#include "runtime/os_interface/linux/drm_memory_manager.h"
#include "runtime/os_interface/linux/drm_neo.h"
#include "runtime/os_interface/linux/os_interface.h"
@@ -47,8 +48,11 @@ DrmCommandStreamReceiver<GfxFamily>::DrmCommandStreamReceiver(const HardwareInfo
}
template <typename GfxFamily>
FlushStamp DrmCommandStreamReceiver<GfxFamily>::flush(BatchBuffer &batchBuffer, EngineType engineOrdinal, ResidencyContainer *allocationsForResidency) {
DEBUG_BREAK_IF(engineOrdinal != EngineType::ENGINE_RCS);
FlushStamp DrmCommandStreamReceiver<GfxFamily>::flush(BatchBuffer &batchBuffer, EngineType engineType, ResidencyContainer *allocationsForResidency) {
DEBUG_BREAK_IF(engineType != EngineType::ENGINE_RCS);
unsigned int engineFlag = 0xFF;
bool ret = DrmEngineMapper<GfxFamily>::engineNodeMap(engineType, engineFlag);
UNRECOVERABLE_IF(!(ret));
DrmAllocation *alloc = static_cast<DrmAllocation *>(batchBuffer.commandBufferAllocation);
DEBUG_BREAK_IF(!alloc);
@@ -71,7 +75,7 @@ FlushStamp DrmCommandStreamReceiver<GfxFamily>::flush(BatchBuffer &batchBuffer,
this->residency.reserve(512);
bb->exec(static_cast<uint32_t>(alignUp(batchBuffer.usedSize - batchBuffer.startOffset, 8)),
alignedStart, I915_EXEC_RENDER | I915_EXEC_NO_RELOC,
alignedStart, engineFlag | I915_EXEC_NO_RELOC,
batchBuffer.requiresCoherency,
batchBuffer.low_priority);