mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
feature: Add support for optional PF enable flag for exec queue create
Related-to: NEO-8306 Signed-off-by: Brandon Yates <brandon.yates@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
9419e702cc
commit
f7e63ba0d0
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2024 Intel Corporation
|
||||
# Copyright (C) 2024-2025 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
@@ -21,6 +21,7 @@ if(NEO_ENABLE_XE_EU_DEBUG_SUPPORT)
|
||||
list(APPEND NEO_CORE_OS_INTERFACE_LINUX_XE_EUDEBUG
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/eudebug_interface_prelim.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/eudebug_interface_prelim.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}eudebug_interface_prelim_extra.cpp
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
* Copyright (C) 2024-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -16,6 +16,7 @@ class EuDebugInterface {
|
||||
public:
|
||||
static std::unique_ptr<EuDebugInterface> create(const std::string &sysFsPciPath);
|
||||
virtual uint32_t getParamValue(EuDebugParam param) const = 0;
|
||||
virtual bool isExecQueuePageFaultEnableSupported() { return false; };
|
||||
virtual ~EuDebugInterface() = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -56,6 +56,8 @@ uint32_t EuDebugInterfacePrelim::getParamValue(EuDebugParam param) const {
|
||||
return PRELIM_DRM_XE_EUDEBUG_EVENT_VM_BIND_FLAG_UFENCE;
|
||||
case EuDebugParam::execQueueSetPropertyEuDebug:
|
||||
return PRELIM_DRM_XE_EXEC_QUEUE_SET_PROPERTY_EUDEBUG;
|
||||
case EuDebugParam::execQueueSetPropertyValueEnable:
|
||||
return PRELIM_DRM_XE_EXEC_QUEUE_EUDEBUG_FLAG_ENABLE;
|
||||
case EuDebugParam::ioctlAckEvent:
|
||||
return PRELIM_DRM_XE_EUDEBUG_IOCTL_ACK_EVENT;
|
||||
case EuDebugParam::ioctlEuControl:
|
||||
@@ -82,6 +84,8 @@ uint32_t EuDebugInterfacePrelim::getParamValue(EuDebugParam param) const {
|
||||
return PRELIM_WORK_IN_PROGRESS_DRM_XE_DEBUG_METADATA_SIP_AREA;
|
||||
case EuDebugParam::vmBindOpExtensionsAttachDebug:
|
||||
return PRELIM_XE_VM_BIND_OP_EXTENSIONS_ATTACH_DEBUG;
|
||||
default:
|
||||
return getAdditionalParamValue(param);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
* Copyright (C) 2024-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -12,5 +12,7 @@ class EuDebugInterfacePrelim : public EuDebugInterface {
|
||||
public:
|
||||
static constexpr const char *sysFsXeEuDebugFile = "/device/prelim_enable_eudebug";
|
||||
uint32_t getParamValue(EuDebugParam param) const override;
|
||||
bool isExecQueuePageFaultEnableSupported() override;
|
||||
uint32_t getAdditionalParamValue(EuDebugParam param) const;
|
||||
};
|
||||
} // namespace NEO
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Copyright (C) 2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/os_interface/linux/xe/eudebug/eudebug_interface_prelim.h"
|
||||
|
||||
namespace NEO {
|
||||
bool EuDebugInterfacePrelim::isExecQueuePageFaultEnableSupported() {
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32_t EuDebugInterfacePrelim::getAdditionalParamValue(EuDebugParam param) const {
|
||||
return 0;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
@@ -55,6 +55,10 @@ uint32_t EuDebugInterfaceUpstream::getParamValue(EuDebugParam param) const {
|
||||
return DRM_XE_EUDEBUG_EVENT_VM_BIND_FLAG_UFENCE;
|
||||
case EuDebugParam::execQueueSetPropertyEuDebug:
|
||||
return DRM_XE_EXEC_QUEUE_SET_PROPERTY_EUDEBUG;
|
||||
case EuDebugParam::execQueueSetPropertyValueEnable:
|
||||
return DRM_XE_EXEC_QUEUE_EUDEBUG_FLAG_ENABLE;
|
||||
case EuDebugParam::execQueueSetPropertyValuePageFaultEnable:
|
||||
return 0;
|
||||
case EuDebugParam::ioctlAckEvent:
|
||||
return DRM_XE_EUDEBUG_IOCTL_ACK_EVENT;
|
||||
case EuDebugParam::ioctlEuControl:
|
||||
|
||||
@@ -204,6 +204,8 @@ enum class EuDebugParam {
|
||||
eventTypeVmBindUfence,
|
||||
eventVmBindFlagUfence,
|
||||
execQueueSetPropertyEuDebug,
|
||||
execQueueSetPropertyValueEnable,
|
||||
execQueueSetPropertyValuePageFaultEnable,
|
||||
ioctlAckEvent,
|
||||
ioctlEuControl,
|
||||
ioctlReadEvent,
|
||||
|
||||
@@ -1647,7 +1647,7 @@ void IoctlHelperXe::setOptionalContextProperties(Drm &drm, void *extProperties,
|
||||
ext[extIndexInOut].base.next_extension = 0;
|
||||
ext[extIndexInOut].base.name = DRM_XE_EXEC_QUEUE_EXTENSION_SET_PROPERTY;
|
||||
ext[extIndexInOut].property = getEudebugExtProperty();
|
||||
ext[extIndexInOut].value = 1;
|
||||
ext[extIndexInOut].value = getEudebugExtPropertyValue();
|
||||
extIndexInOut++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -153,6 +153,7 @@ class IoctlHelperXe : public IoctlHelper {
|
||||
int debuggerMetadataCreateIoctl(DrmIoctl request, void *arg);
|
||||
int debuggerMetadataDestroyIoctl(DrmIoctl request, void *arg);
|
||||
int getEudebugExtProperty();
|
||||
uint64_t getEudebugExtPropertyValue();
|
||||
virtual bool isExtraEngineClassAllowed(uint16_t engineClass) const { return false; }
|
||||
virtual std::optional<uint32_t> getCxlType() { return {}; }
|
||||
virtual uint32_t getNumEngines(uint64_t *enginesData) const;
|
||||
|
||||
@@ -53,6 +53,14 @@ int IoctlHelperXe::getEudebugExtProperty() {
|
||||
return euDebugInterface->getParamValue(EuDebugParam::execQueueSetPropertyEuDebug);
|
||||
}
|
||||
|
||||
uint64_t IoctlHelperXe::getEudebugExtPropertyValue() {
|
||||
uint64_t val = euDebugInterface->getParamValue(EuDebugParam::execQueueSetPropertyValueEnable);
|
||||
if (euDebugInterface->isExecQueuePageFaultEnableSupported()) {
|
||||
val |= euDebugInterface->getParamValue(EuDebugParam::execQueueSetPropertyValuePageFaultEnable);
|
||||
}
|
||||
return val;
|
||||
}
|
||||
|
||||
int IoctlHelperXe::getEuDebugSysFsEnable() {
|
||||
return euDebugInterface != nullptr ? 1 : 0;
|
||||
}
|
||||
|
||||
@@ -34,6 +34,11 @@ int IoctlHelperXe::getEudebugExtProperty() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64_t IoctlHelperXe::getEudebugExtPropertyValue() {
|
||||
UNRECOVERABLE_IF(true);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int IoctlHelperXe::getEuDebugSysFsEnable() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user