Files
compute-runtime/shared/source/gmm_helper/page_table_mngr_impl.cpp
Mateusz Jablonski 145f03c294 refactor: encapsulate gmm page table manager handle
wrap destruction logic within unique ptr

set csr handle when creating page table manager

Related-To: NEO-11080
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2025-10-24 12:50:10 +02:00

31 lines
997 B
C++

/*
* Copyright (C) 2018-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/gmm_helper/client_context/gmm_client_context.h"
#include "shared/source/gmm_helper/gmm.h"
#include "shared/source/gmm_helper/gmm_helper.h"
#include "shared/source/gmm_helper/page_table_mngr.h"
#include "shared/source/gmm_helper/resource_info.h"
namespace NEO {
bool GmmPageTableMngr::updateAuxTable(uint64_t gpuVa, Gmm *gmm, bool map) {
GMM_DDI_UPDATEAUXTABLE ddiUpdateAuxTable = {};
ddiUpdateAuxTable.BaseGpuVA = gpuVa;
ddiUpdateAuxTable.BaseResInfo = gmm->gmmResourceInfo->peekGmmResourceInfo();
ddiUpdateAuxTable.DoNotWait = true;
ddiUpdateAuxTable.Map = map;
return updateAuxTable(&ddiUpdateAuxTable) == GMM_STATUS::GMM_SUCCESS;
}
bool GmmPageTableMngr::initPageTableManagerRegisters(void *csrHandle) {
auto status = initContextAuxTableRegister(csrHandle, GMM_ENGINE_TYPE::ENGINE_TYPE_RCS);
return status == GMM_SUCCESS;
}
} // namespace NEO