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:
Szymon Morek
2021-12-14 14:09:19 +00:00
committed by Compute-Runtime-Automation
parent ee18008750
commit 242b08d72b
7 changed files with 174 additions and 11 deletions

View File

@@ -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;
}