mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 01:04:57 +08:00
refactor: bind drm context within IoctlHelper::createDrmContext method
Related-To: NEO-6999 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
efa19a0b18
commit
fffd56d7a6
@@ -14,7 +14,7 @@
|
||||
#include "shared/source/helpers/ptr_math.h"
|
||||
#include "shared/source/os_interface/linux/drm_neo.h"
|
||||
#include "shared/source/os_interface/linux/drm_wrappers.h"
|
||||
#include "shared/source/os_interface/os_context.h"
|
||||
#include "shared/source/os_interface/linux/os_context_linux.h"
|
||||
|
||||
#include "drm/i915_drm.h"
|
||||
|
||||
@@ -82,7 +82,7 @@ void IoctlHelper::logExecBuffer(const ExecBuffer &execBuffer, std::stringstream
|
||||
<< " }\n";
|
||||
}
|
||||
|
||||
uint32_t IoctlHelper::createDrmContext(Drm &drm, const OsContext &osContext, uint32_t drmVmId) {
|
||||
uint32_t IoctlHelper::createDrmContext(Drm &drm, OsContextLinux &osContext, uint32_t drmVmId, uint32_t deviceIndex) {
|
||||
|
||||
const auto numberOfCCS = drm.getRootDeviceEnvironment().getHardwareInfo()->gtSystemInfo.CCSInfo.NumberOfCCSEnabled;
|
||||
const bool debuggableContext = drm.isContextDebugSupported() && drm.getRootDeviceEnvironment().executionEnvironment.isDebuggingEnabled() && !osContext.isInternalEngine();
|
||||
@@ -103,6 +103,8 @@ uint32_t IoctlHelper::createDrmContext(Drm &drm, const OsContext &osContext, uin
|
||||
if (drm.isPreemptionSupported() && osContext.isLowPriority()) {
|
||||
drm.setLowPriorityContextParam(drmContextId);
|
||||
}
|
||||
auto engineFlag = drm.bindDrmContext(drmContextId, deviceIndex, osContext.getEngineType(), osContext.isEngineInstanced());
|
||||
osContext.setEngineFlag(engineFlag);
|
||||
return drmContextId;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user