test: improve handling mock queue id
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
parent
4024906ace
commit
ed05912c40
|
@ -32,7 +32,7 @@ struct DrmMockXe : public DrmMockCustom {
|
|||
const uint16_t devId = 0xabc;
|
||||
|
||||
uint64_t queryConfig[7]{}; // 1 qword for num params and 1 qwords per param
|
||||
static constexpr uint32_t mockExecQueueId = 1234;
|
||||
uint32_t mockExecQueueId = 1234;
|
||||
static constexpr int32_t mockMaxExecQueuePriority = 3;
|
||||
static constexpr int32_t mockDefaultCxlType = 0;
|
||||
static constexpr uint32_t mockTimestampFrequency = 12500000;
|
||||
|
|
|
@ -170,14 +170,11 @@ int DrmMockXe::ioctl(DrmIoctl request, void *arg) {
|
|||
handleContextCreateExtensions(ext);
|
||||
extension = ext->next_extension;
|
||||
}
|
||||
queueCreate->exec_queue_id = mockExecQueueId;
|
||||
queueCreate->exec_queue_id = ++mockExecQueueId;
|
||||
ret = 0;
|
||||
} break;
|
||||
case DrmIoctl::gemContextDestroy: {
|
||||
auto queueDestroy = static_cast<drm_xe_exec_queue_destroy *>(arg);
|
||||
if (queueDestroy->exec_queue_id == mockExecQueueId) {
|
||||
ret = 0;
|
||||
}
|
||||
} break;
|
||||
case DrmIoctl::perfOpen: {
|
||||
ret = 0;
|
||||
|
|
Loading…
Reference in New Issue