Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions shared/source/os_interface/linux/xe/ioctl_helper_xe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1304,6 +1304,7 @@ int IoctlHelperXe::createDrmContext(Drm &drm, OsContextLinux &osContext, uint32_
create.vm_id = drmVmId;
create.instances = castToUint64(contextParamEngine.data());
create.extensions = (extPropertyIndex > 0U ? castToUint64(extProperties.data()) : 0UL);
create.flags = DRM_XE_EXEC_QUEUE_LOW_LATENCY_HINT;
applyContextFlags(&create, allocateInterrupt);

int ret = IoctlHelper::ioctl(DrmIoctl::gemContextCreateExt, &create);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2590,3 +2590,20 @@ TEST_F(IoctlHelperXeTest, whenQueryDeviceIdAndRevisionThenProperValuesAreSet) {
EXPECT_EQ(mockDeviceId, hwInfo->platform.usDeviceID);
EXPECT_EQ(mockRevisionId, hwInfo->platform.usRevId);
}

TEST_F(IoctlHelperXeTest, givenXeIoctlHelperWhenCreateDrmContextThenLowLatencyFlagApplied) {
class MockLinuxOsContext : public OsContextLinux {
public:
using OsContextLinux::initializeContext;
using OsContextLinux::OsContextLinux;
};

auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
auto drm = DrmMockXe::create(*executionEnvironment->rootDeviceEnvironments[0]);
auto xeIoctlHelper = static_cast<MockIoctlHelperXe *>(drm->getIoctlHelper());
xeIoctlHelper->contextParamEngine.push_back(drm_xe_engine_class_instance{});
MockLinuxOsContext osContext(*drm, 0, 5u, NEO::EngineDescriptorHelper::getDefaultDescriptor({aub_stream::ENGINE_CCS, EngineUsage::regular}));

osContext.initializeContext(false);
EXPECT_EQ(static_cast<uint32_t>(DRM_XE_EXEC_QUEUE_LOW_LATENCY_HINT), drm->latestExecQueueCreate.flags);
}
1 change: 1 addition & 0 deletions third_party/uapi-eudebug/drm/xe_drm.h
Original file line number Diff line number Diff line change
Expand Up @@ -1148,6 +1148,7 @@ struct drm_xe_exec_queue_create {
/** @vm_id: VM to use for this exec queue */
__u32 vm_id;

#define DRM_XE_EXEC_QUEUE_LOW_LATENCY_HINT 1
/** @flags: MBZ */
__u32 flags;

Expand Down
1 change: 1 addition & 0 deletions third_party/uapi/drm-uapi-helper/xe/xe_drm.h
Original file line number Diff line number Diff line change
Expand Up @@ -1121,6 +1121,7 @@ struct drm_xe_exec_queue_create {
/** @vm_id: VM to use for this exec queue */
__u32 vm_id;

#define DRM_XE_EXEC_QUEUE_LOW_LATENCY_HINT 1
/** @flags: MBZ */
__u32 flags;

Expand Down
1 change: 1 addition & 0 deletions third_party/uapi/upstream/xe/xe_drm.h
Original file line number Diff line number Diff line change
Expand Up @@ -1121,6 +1121,7 @@ struct drm_xe_exec_queue_create {
/** @vm_id: VM to use for this exec queue */
__u32 vm_id;

#define DRM_XE_EXEC_QUEUE_LOW_LATENCY_HINT 1
/** @flags: MBZ */
__u32 flags;

Expand Down