mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
Create wrappers for drm getparam, query, gem close, prime handle, version
Related-To: NEO-6852 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
07efa4a3a9
commit
05cb48976f
@@ -47,12 +47,12 @@ class DrmTipMock : public DrmMock {
|
||||
return EINVAL;
|
||||
}
|
||||
i915QuerySuccessCount--;
|
||||
auto query = static_cast<drm_i915_query *>(arg);
|
||||
if (query->items_ptr == 0) {
|
||||
auto query = static_cast<Query *>(arg);
|
||||
if (query->itemsPtr == 0) {
|
||||
return EINVAL;
|
||||
}
|
||||
for (auto i = 0u; i < query->num_items; i++) {
|
||||
handleQueryItem(reinterpret_cast<QueryItem *>(query->items_ptr) + i);
|
||||
for (auto i = 0u; i < query->numItems; i++) {
|
||||
handleQueryItem(reinterpret_cast<QueryItem *>(query->itemsPtr) + i);
|
||||
}
|
||||
return 0;
|
||||
} else if (request == DRM_IOCTL_I915_GEM_MMAP_OFFSET) {
|
||||
|
||||
@@ -47,12 +47,12 @@ int handlePrelimRequests(unsigned long request, void *arg, int ioctlRetVal, int
|
||||
auto closReserveArg = static_cast<prelim_drm_i915_gem_clos_reserve *>(arg);
|
||||
closReserveArg->clos_index = 1u;
|
||||
} else if (request == DRM_IOCTL_I915_QUERY) {
|
||||
auto query = static_cast<drm_i915_query *>(arg);
|
||||
if (query->items_ptr == 0) {
|
||||
auto query = static_cast<Query *>(arg);
|
||||
if (query->itemsPtr == 0) {
|
||||
return EINVAL;
|
||||
}
|
||||
for (auto i = 0u; i < query->num_items; i++) {
|
||||
auto queryItemPtr = reinterpret_cast<QueryItem *>(query->items_ptr) + i;
|
||||
for (auto i = 0u; i < query->numItems; i++) {
|
||||
auto queryItemPtr = reinterpret_cast<QueryItem *>(query->itemsPtr) + i;
|
||||
if (queryItemPtr->queryId == PRELIM_DRM_I915_QUERY_DISTANCE_INFO) {
|
||||
if (queryDistanceIoctlRetVal != 0) {
|
||||
return queryDistanceIoctlRetVal;
|
||||
|
||||
Reference in New Issue
Block a user