mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 22:12:59 +08:00
fix: query drm info to 8 byte aligned storage
Related-To: NEO-9038 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
8a01619310
commit
9b344280d6
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "shared/source/helpers/ptr_math.h"
|
||||
#include "shared/source/os_interface/linux/drm_neo.h"
|
||||
#include "shared/source/os_interface/linux/ioctl_helper.h"
|
||||
#include "shared/source/os_interface/linux/system_info.h"
|
||||
@@ -265,7 +266,7 @@ struct MockEventNeoDrm : public Drm {
|
||||
mockMemoryType = memory;
|
||||
}
|
||||
|
||||
std::vector<uint8_t> getMemoryRegionsReturnsEmpty() {
|
||||
std::vector<uint64_t> getMemoryRegionsReturnsEmpty() {
|
||||
return {};
|
||||
}
|
||||
|
||||
@@ -279,8 +280,8 @@ struct MockEventNeoDrm : public Drm {
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
uint32_t hwBlob[] = {INTEL_HWCONFIG_MAX_MEMORY_CHANNELS, 1, 8, INTEL_HWCONFIG_MEMORY_TYPE, 0, mockMemoryType};
|
||||
std::vector<uint8_t> inputBlobData(reinterpret_cast<uint8_t *>(hwBlob), reinterpret_cast<uint8_t *>(hwBlob) + sizeof(hwBlob));
|
||||
alignas(64) uint32_t hwBlob[] = {INTEL_HWCONFIG_MAX_MEMORY_CHANNELS, 1, 8, INTEL_HWCONFIG_MEMORY_TYPE, 0, mockMemoryType};
|
||||
std::vector<uint64_t> inputBlobData(reinterpret_cast<uint64_t *>(hwBlob), reinterpret_cast<uint64_t *>(ptrOffset(hwBlob, sizeof(hwBlob))));
|
||||
this->systemInfo.reset(new SystemInfo(inputBlobData));
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
@@ -220,7 +220,7 @@ struct MockMemoryNeoDrm : public Drm {
|
||||
mockMemoryType = memory;
|
||||
}
|
||||
|
||||
std::vector<uint8_t> getMemoryRegionsReturnsEmpty() {
|
||||
std::vector<uint64_t> getMemoryRegionsReturnsEmpty() {
|
||||
return {};
|
||||
}
|
||||
|
||||
@@ -234,8 +234,8 @@ struct MockMemoryNeoDrm : public Drm {
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
uint32_t hwBlob[] = {INTEL_HWCONFIG_MAX_MEMORY_CHANNELS, 1, 8, INTEL_HWCONFIG_MEMORY_TYPE, 0, mockMemoryType};
|
||||
std::vector<uint8_t> inputBlobData(reinterpret_cast<uint8_t *>(hwBlob), reinterpret_cast<uint8_t *>(hwBlob) + sizeof(hwBlob));
|
||||
alignas(64) uint32_t hwBlob[] = {INTEL_HWCONFIG_MAX_MEMORY_CHANNELS, 1, 8, INTEL_HWCONFIG_MEMORY_TYPE, 0, mockMemoryType};
|
||||
std::vector<uint64_t> inputBlobData(reinterpret_cast<uint64_t *>(hwBlob), reinterpret_cast<uint64_t *>(ptrOffset(hwBlob, sizeof(hwBlob))));
|
||||
this->systemInfo.reset(new SystemInfo(inputBlobData));
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
@@ -669,7 +669,7 @@ struct MockRasNeoDrm : public Drm {
|
||||
mockMemoryType = memory;
|
||||
}
|
||||
|
||||
std::vector<uint8_t> getMemoryRegionsReturnsEmpty() {
|
||||
std::vector<uint64_t> getMemoryRegionsReturnsEmpty() {
|
||||
return {};
|
||||
}
|
||||
|
||||
@@ -683,8 +683,8 @@ struct MockRasNeoDrm : public Drm {
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
uint32_t hwBlob[] = {INTEL_HWCONFIG_MAX_MEMORY_CHANNELS, 1, 8, INTEL_HWCONFIG_MEMORY_TYPE, 0, mockMemoryType};
|
||||
std::vector<uint8_t> inputBlobData(reinterpret_cast<uint8_t *>(hwBlob), reinterpret_cast<uint8_t *>(hwBlob) + sizeof(hwBlob));
|
||||
alignas(64) uint32_t hwBlob[] = {INTEL_HWCONFIG_MAX_MEMORY_CHANNELS, 1, 8, INTEL_HWCONFIG_MEMORY_TYPE, 0, mockMemoryType};
|
||||
std::vector<uint64_t> inputBlobData(reinterpret_cast<uint64_t *>(hwBlob), reinterpret_cast<uint64_t *>(ptrOffset(hwBlob, sizeof(hwBlob))));
|
||||
this->systemInfo.reset(new SystemInfo(inputBlobData));
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user