mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 17:20:26 +08:00
feature: Add debug keys for chunking allocation and size
Related-to: NEO-7695 New debug keys added: EnableBOChunking is now a mask 0 = no chunking (default). 1 = shared allocations only 2 = device allocations only 3 = shared and device allocations MinimalAllocationSizeForChunking sets the minimum allocation size to apply chunking. Default is 2MB. Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
aa0beb8191
commit
23eeaf816d
@@ -279,3 +279,12 @@ bool DrmMockCustom::getChunkingAvailable() {
|
||||
return getChunkingAvailableCall.returnValue;
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t DrmMockCustom::getChunkingMode() {
|
||||
getChunkingModeCall.called++;
|
||||
if (getChunkingModeCall.callParent) {
|
||||
return Drm::getChunkingMode();
|
||||
} else {
|
||||
return getChunkingModeCall.returnValue;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,6 +127,12 @@ class DrmMockCustom : public Drm {
|
||||
uint32_t called = 0u;
|
||||
};
|
||||
|
||||
struct ChunkingModeCall {
|
||||
bool callParent = true;
|
||||
uint32_t returnValue = 0x00;
|
||||
uint32_t called = 0u;
|
||||
};
|
||||
|
||||
DrmMockCustom(RootDeviceEnvironment &rootDeviceEnvironment);
|
||||
|
||||
int waitUserFence(uint32_t ctxId, uint64_t address, uint64_t value, ValueWidth dataWidth, int64_t timeout, uint16_t flags) override;
|
||||
@@ -134,6 +140,7 @@ class DrmMockCustom : public Drm {
|
||||
bool getSetPairAvailable() override;
|
||||
|
||||
bool getChunkingAvailable() override;
|
||||
uint32_t getChunkingMode() override;
|
||||
bool isChunkingAvailable() override;
|
||||
|
||||
bool isVmBindAvailable() override;
|
||||
@@ -181,6 +188,7 @@ class DrmMockCustom : public Drm {
|
||||
IsVmBindAvailableCall isVmBindAvailableCall{};
|
||||
|
||||
IsChunkingAvailableCall getChunkingAvailableCall{};
|
||||
ChunkingModeCall getChunkingModeCall{};
|
||||
IsChunkingAvailableCall isChunkingAvailableCall{};
|
||||
|
||||
std::atomic<int> ioctlRes;
|
||||
|
||||
Reference in New Issue
Block a user