mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-06 10:26:29 +08:00
performance: add low latency hint on xe
Related-To: NEO-14708 Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
7494d9b80d
commit
d17255fe18
@@ -214,8 +214,17 @@ bool IoctlHelperXe::initialize() {
|
||||
|
||||
xeLog("DRM_XE_QUERY_CONFIG_MAX_EXEC_QUEUE_PRIORITY\t\t%#llx\n",
|
||||
config->info[DRM_XE_QUERY_CONFIG_MAX_EXEC_QUEUE_PRIORITY]);
|
||||
xeLog(" DRM_XE_QUERY_CONFIG_FLAG_HAS_LOW_LATENCY\t%s\n",
|
||||
config->info[DRM_XE_QUERY_CONFIG_FLAGS] &
|
||||
DRM_XE_QUERY_CONFIG_FLAG_HAS_LOW_LATENCY
|
||||
? "ON"
|
||||
: "OFF");
|
||||
|
||||
maxExecQueuePriority = config->info[DRM_XE_QUERY_CONFIG_MAX_EXEC_QUEUE_PRIORITY] & 0xffff;
|
||||
isLowLatencyHintAvailable = false;
|
||||
if (debugManager.flags.ForceLowLatencyHint.get() != -1) {
|
||||
isLowLatencyHintAvailable = !!debugManager.flags.ForceLowLatencyHint.get();
|
||||
}
|
||||
|
||||
memset(&queryConfig, 0, sizeof(queryConfig));
|
||||
queryConfig.query = DRM_XE_DEVICE_QUERY_HWCONFIG;
|
||||
@@ -1335,6 +1344,12 @@ void IoctlHelperXe::xeShowBindTable() {
|
||||
}
|
||||
}
|
||||
|
||||
void IoctlHelperXe::applyContextFlags(void *execQueueCreate, bool allocateInterrupt) {
|
||||
if (this->isLowLatencyHintAvailable) {
|
||||
reinterpret_cast<drm_xe_exec_queue_create *>(execQueueCreate)->flags |= DRM_XE_EXEC_QUEUE_LOW_LATENCY_HINT;
|
||||
}
|
||||
}
|
||||
|
||||
int IoctlHelperXe::createDrmContext(Drm &drm, OsContextLinux &osContext, uint32_t drmVmId, uint32_t deviceIndex, bool allocateInterrupt) {
|
||||
uint32_t drmContextId = 0;
|
||||
|
||||
|
||||
@@ -178,7 +178,7 @@ class IoctlHelperXe : public IoctlHelper {
|
||||
uint16_t getDefaultEngineClass(const aub_stream::EngineType &defaultEngineType);
|
||||
void setOptionalContextProperties(Drm &drm, void *extProperties, uint32_t &extIndexInOut);
|
||||
virtual void setContextProperties(const OsContextLinux &osContext, uint32_t deviceIndex, void *extProperties, uint32_t &extIndexInOut);
|
||||
virtual void applyContextFlags(void *execQueueCreate, bool allocateInterrupt){};
|
||||
virtual void applyContextFlags(void *execQueueCreate, bool allocateInterrupt);
|
||||
|
||||
struct GtIpVersion {
|
||||
uint16_t major;
|
||||
@@ -187,6 +187,7 @@ class IoctlHelperXe : public IoctlHelper {
|
||||
};
|
||||
bool queryHwIpVersion(GtIpVersion >IpVersion);
|
||||
|
||||
bool isLowLatencyHintAvailable = false;
|
||||
int maxExecQueuePriority = 0;
|
||||
std::mutex xeLock;
|
||||
std::mutex gemCloseLock;
|
||||
|
||||
Reference in New Issue
Block a user