mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Extended DRM interface with function to set memory regions
Related-To: NEO-3008 Change-Id: I3f2d5571d670b43225e77e4f80e121aee215d61a Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
This commit is contained in:

committed by
sys_ocldev

parent
6b21ae07ad
commit
030945bcd3
@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "core/helpers/basic_math.h"
|
||||
#include "runtime/os_interface/linux/engine_info.h"
|
||||
#include "runtime/os_interface/linux/memory_info.h"
|
||||
#include "runtime/utilities/api_intercept.h"
|
||||
@ -74,6 +75,7 @@ class Drm {
|
||||
bool getSimplifiedMocsTableUsage() const;
|
||||
void queryEngineInfo();
|
||||
void queryMemoryInfo();
|
||||
void setMemoryRegions();
|
||||
|
||||
MemoryInfo *getMemoryInfo() const {
|
||||
return memoryInfo.get();
|
||||
@ -99,6 +101,9 @@ class Drm {
|
||||
std::string getSysFsPciPath(int deviceID);
|
||||
void *query(uint32_t queryId);
|
||||
|
||||
static inline uint16_t getMemoryTypeFromRegion(uint32_t region) { return Math::log2(region >> 16); };
|
||||
static inline uint16_t getInstanceFromRegion(uint32_t region) { return Math::log2(region & 0xFFFF); };
|
||||
|
||||
#pragma pack(1)
|
||||
struct PCIConfig {
|
||||
uint16_t VendorID;
|
||||
|
@ -21,6 +21,9 @@ void Drm::queryEngineInfo() {
|
||||
void Drm::queryMemoryInfo() {
|
||||
}
|
||||
|
||||
void Drm::setMemoryRegions() {
|
||||
}
|
||||
|
||||
unsigned int Drm::bindDrmContext(uint32_t drmContextId, uint32_t deviceIndex, aub_stream::EngineType engineType) {
|
||||
return DrmEngineMapper::engineNodeMap(engineType);
|
||||
}
|
||||
|
Reference in New Issue
Block a user