mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 21:18:24 +08:00
refactor: decouple ClosCacheReservation from Drm
The dependency towards `Drm` is unnecessary and only makes testing more difficult. Instead, dependency towards `IoctlHelper` alone only is sufficient. Related-To: NEO-10158 Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
1f79f867e6
commit
790bb84841
@@ -979,7 +979,7 @@ void Drm::setupCacheInfo(const HardwareInfo &hwInfo) {
|
||||
auto &gfxCoreHelper = rootDeviceEnvironment.getHelper<GfxCoreHelper>();
|
||||
|
||||
if (debugManager.flags.ClosEnabled.get() == 0 || gfxCoreHelper.getNumCacheRegions() == 0) {
|
||||
this->cacheInfo.reset(new CacheInfo(*this, 0, 0, 0));
|
||||
this->cacheInfo.reset(new CacheInfo{*ioctlHelper, 0, 0, 0});
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -993,7 +993,7 @@ void Drm::setupCacheInfo(const HardwareInfo &hwInfo) {
|
||||
const size_t maxReservationCacheSize = (totalCacheSize * maxReservationNumWays) / maxNumWays;
|
||||
const uint32_t maxReservationNumCacheRegions = gfxCoreHelper.getNumCacheRegions() - 1;
|
||||
|
||||
this->cacheInfo.reset(new CacheInfo(*this, maxReservationCacheSize, maxReservationNumCacheRegions, maxReservationNumWays));
|
||||
this->cacheInfo.reset(new CacheInfo(*ioctlHelper, maxReservationCacheSize, maxReservationNumCacheRegions, maxReservationNumWays));
|
||||
}
|
||||
|
||||
void Drm::getPrelimVersion(std::string &prelimVersion) {
|
||||
|
||||
Reference in New Issue
Block a user