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:
Maciej Bielski
2024-07-30 17:53:09 +00:00
committed by Compute-Runtime-Automation
parent 1f79f867e6
commit 790bb84841
10 changed files with 32 additions and 34 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2022 Intel Corporation
* Copyright (C) 2021-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -16,14 +16,14 @@
namespace NEO {
class Drm;
class IoctlHelper;
struct CacheInfo {
CacheInfo(Drm &drm, size_t maxReservationCacheSize, uint32_t maxReservationNumCacheRegions, uint16_t maxReservationNumWays)
CacheInfo(IoctlHelper &ioctlHelper, size_t maxReservationCacheSize, uint32_t maxReservationNumCacheRegions, uint16_t maxReservationNumWays)
: maxReservationCacheSize(maxReservationCacheSize),
maxReservationNumCacheRegions(maxReservationNumCacheRegions),
maxReservationNumWays(maxReservationNumWays),
cacheReserve(drm) {
cacheReserve{ioctlHelper} {
}
MOCKABLE_VIRTUAL ~CacheInfo();