fix: pass gmm helper to getDumpSurfaceInfo function

gmm may not exist for buffer allocation

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2023-07-03 09:44:27 +00:00
committed by Compute-Runtime-Automation
parent 39740da9d1
commit 30c5d8a681
13 changed files with 25 additions and 25 deletions

View File

@@ -57,11 +57,11 @@ GmmHelper::GmmHelper(const RootDeviceEnvironment &rootDeviceEnvironmentArg) : ro
UNRECOVERABLE_IF(!gmmClientContext);
}
uint64_t GmmHelper::canonize(uint64_t address) {
uint64_t GmmHelper::canonize(uint64_t address) const {
return static_cast<int64_t>(address << (64 - addressWidth)) >> (64 - addressWidth);
}
uint64_t GmmHelper::decanonize(uint64_t address) {
uint64_t GmmHelper::decanonize(uint64_t address) const {
return (address & maxNBitValue(addressWidth));
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2022 Intel Corporation
* Copyright (C) 2018-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -27,8 +27,8 @@ class GmmHelper {
static constexpr uint64_t maxPossiblePitch = (1ull << 31);
uint64_t canonize(uint64_t address);
uint64_t decanonize(uint64_t address);
uint64_t canonize(uint64_t address) const;
uint64_t decanonize(uint64_t address) const;
uint32_t getAddressWidth() { return addressWidth; };
void setAddressWidth(uint32_t width) { addressWidth = width; };