2021-01-26 02:11:42 +08:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2021 Intel Corporation
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "shared/source/os_interface/linux/drm_neo.h"
|
|
|
|
|
|
|
|
#include "drm_query_flags.h"
|
|
|
|
|
|
|
|
namespace NEO {
|
|
|
|
|
2021-01-27 00:03:12 +08:00
|
|
|
bool Drm::queryTopology(const HardwareInfo &hwInfo, int &sliceCount, int &subSliceCount, int &euCount) {
|
2021-01-26 02:11:42 +08:00
|
|
|
int32_t length;
|
|
|
|
auto dataQuery = this->query(DRM_I915_QUERY_TOPOLOGY_INFO, DrmQueryItemFlags::topology, length);
|
|
|
|
auto data = reinterpret_cast<drm_i915_query_topology_info *>(dataQuery.get());
|
|
|
|
|
|
|
|
if (!data) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2021-01-26 19:02:17 +08:00
|
|
|
return translateTopologyInfo(data, sliceCount, subSliceCount, euCount);
|
2021-01-26 02:11:42 +08:00
|
|
|
}
|
|
|
|
|
2021-02-24 01:57:27 +08:00
|
|
|
bool Drm::isDebugAttachAvailable() {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2021-01-26 02:11:42 +08:00
|
|
|
} // namespace NEO
|