mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 07:14:10 +08:00
Improve query PCI info
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
9e677da83e
commit
2829226937
@@ -103,7 +103,10 @@ class Drm : public DriverModel {
|
||||
|
||||
MOCKABLE_VIRTUAL void checkPreemptionSupport();
|
||||
inline int getFileDescriptor() const { return hwDeviceId->getFileDescriptor(); }
|
||||
ADAPTER_BDF getAdapterBDF() const;
|
||||
ADAPTER_BDF getAdapterBDF() const {
|
||||
return adapterBDF;
|
||||
}
|
||||
int queryAdapterBDF();
|
||||
int createDrmVirtualMemory(uint32_t &drmVmId);
|
||||
void destroyDrmVirtualMemory(uint32_t drmVmId);
|
||||
uint32_t createDrmContext(uint32_t drmVmId, bool isSpecialContextRequested);
|
||||
@@ -212,48 +215,18 @@ class Drm : public DriverModel {
|
||||
struct TopologyMapping {
|
||||
std::vector<int> sliceIndices;
|
||||
};
|
||||
|
||||
Drm(std::unique_ptr<HwDeviceIdDrm> hwDeviceIdIn, RootDeviceEnvironment &rootDeviceEnvironment);
|
||||
|
||||
int getQueueSliceCount(drm_i915_gem_context_param_sseu *sseu);
|
||||
bool translateTopologyInfo(const drm_i915_query_topology_info *queryTopologyInfo, QueryTopologyData &data, TopologyMapping &mapping);
|
||||
std::string generateUUID();
|
||||
std::string generateElfUUID(const void *data);
|
||||
bool sliceCountChangeSupported = false;
|
||||
drm_i915_gem_context_param_sseu sseu{};
|
||||
bool preemptionSupported = false;
|
||||
bool nonPersistentContextsSupported = false;
|
||||
bool requirePerContextVM = false;
|
||||
bool bindAvailable = false;
|
||||
bool directSubmissionActive = false;
|
||||
bool contextDebugSupported = false;
|
||||
bool newResourceBound = false;
|
||||
std::once_flag checkBindOnce;
|
||||
std::unique_ptr<HwDeviceIdDrm> hwDeviceId;
|
||||
int deviceId = 0;
|
||||
int revisionId = 0;
|
||||
GTTYPE eGtType = GTTYPE_UNDEFINED;
|
||||
RootDeviceEnvironment &rootDeviceEnvironment;
|
||||
uint64_t uuid = 0;
|
||||
|
||||
Drm(std::unique_ptr<HwDeviceIdDrm> hwDeviceIdIn, RootDeviceEnvironment &rootDeviceEnvironment);
|
||||
std::unique_ptr<SystemInfo> systemInfo;
|
||||
std::unique_ptr<CacheInfo> cacheInfo;
|
||||
std::unique_ptr<EngineInfo> engineInfo;
|
||||
std::unique_ptr<MemoryInfo> memoryInfo;
|
||||
std::vector<uint32_t> virtualMemoryIds;
|
||||
|
||||
std::array<uint64_t, EngineLimits::maxHandleCount> pagingFence;
|
||||
std::array<uint64_t, EngineLimits::maxHandleCount> fenceVal;
|
||||
|
||||
std::unordered_map<uint32_t, TopologyMapping> topologyMap;
|
||||
|
||||
std::string getSysFsPciPath();
|
||||
std::unique_ptr<uint8_t[]> query(uint32_t queryId, uint32_t queryItemFlags, int32_t &length);
|
||||
|
||||
StackVec<uint32_t, size_t(ResourceClass::MaxSize)> classHandles;
|
||||
|
||||
std::unordered_map<unsigned long, std::pair<long long, uint64_t>> ioctlStatistics;
|
||||
void printIoctlStatistics();
|
||||
std::string ioctlToString(unsigned long request);
|
||||
std::string ioctlToStringImpl(unsigned long request);
|
||||
std::string getSysFsPciPath();
|
||||
std::unique_ptr<uint8_t[]> query(uint32_t queryId, uint32_t queryItemFlags, int32_t &length);
|
||||
void printIoctlStatistics();
|
||||
|
||||
#pragma pack(1)
|
||||
struct PCIConfig {
|
||||
@@ -282,6 +255,42 @@ class Drm : public DriverModel {
|
||||
uint8_t MaxLatency;
|
||||
};
|
||||
#pragma pack()
|
||||
|
||||
drm_i915_gem_context_param_sseu sseu{};
|
||||
ADAPTER_BDF adapterBDF{};
|
||||
|
||||
std::unordered_map<uint32_t, TopologyMapping> topologyMap;
|
||||
std::unordered_map<unsigned long, std::pair<long long, uint64_t>> ioctlStatistics;
|
||||
|
||||
std::array<uint64_t, EngineLimits::maxHandleCount> pagingFence;
|
||||
std::array<uint64_t, EngineLimits::maxHandleCount> fenceVal;
|
||||
StackVec<uint32_t, size_t(ResourceClass::MaxSize)> classHandles;
|
||||
std::vector<uint32_t> virtualMemoryIds;
|
||||
|
||||
std::unique_ptr<HwDeviceIdDrm> hwDeviceId;
|
||||
std::unique_ptr<SystemInfo> systemInfo;
|
||||
std::unique_ptr<CacheInfo> cacheInfo;
|
||||
std::unique_ptr<EngineInfo> engineInfo;
|
||||
std::unique_ptr<MemoryInfo> memoryInfo;
|
||||
|
||||
std::once_flag checkBindOnce;
|
||||
|
||||
RootDeviceEnvironment &rootDeviceEnvironment;
|
||||
uint64_t uuid = 0;
|
||||
|
||||
int deviceId = 0;
|
||||
int revisionId = 0;
|
||||
GTTYPE eGtType = GTTYPE_UNDEFINED;
|
||||
|
||||
bool sliceCountChangeSupported = false;
|
||||
bool preemptionSupported = false;
|
||||
bool nonPersistentContextsSupported = false;
|
||||
bool requirePerContextVM = false;
|
||||
bool bindAvailable = false;
|
||||
bool directSubmissionActive = false;
|
||||
bool contextDebugSupported = false;
|
||||
bool newResourceBound = false;
|
||||
|
||||
private:
|
||||
int getParamIoctl(int param, int *dstValue);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user