mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-23 11:03:02 +08:00
Add advise for atomic and preferred location
If supported, allow atomic and preferred location advises. Hide this logic under IoctlHelper. Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
ee18008750
commit
242b08d72b
@@ -31,17 +31,6 @@ bool DrmAllocation::setCacheRegion(Drm *drm, CacheRegion regionIndex) {
|
||||
return setCacheAdvice(drm, 0, regionIndex);
|
||||
}
|
||||
|
||||
bool DrmAllocation::setMemAdvise(Drm *drm, MemAdviseFlags flags) {
|
||||
if (flags.cached_memory != enabledMemAdviseFlags.cached_memory) {
|
||||
CachePolicy memType = flags.cached_memory ? CachePolicy::WriteBack : CachePolicy::Uncached;
|
||||
setCachePolicy(memType);
|
||||
}
|
||||
|
||||
enabledMemAdviseFlags = flags;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DrmAllocation::shouldAllocationPageFault(const Drm *drm) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user