mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 07:14:10 +08:00
- merge all the callbacks to single template class - store callback functions in global arrays - partially reuse callbacks on Linux Related-To: NEO-11080 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
34 lines
1.1 KiB
C++
34 lines
1.1 KiB
C++
/*
|
|
* Copyright (C) 2025 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#include "shared/source/command_stream/command_stream_receiver.h"
|
|
#include "shared/source/gmm_helper/gmm_callbacks.h"
|
|
#include "shared/source/helpers/gfx_core_helper.h"
|
|
|
|
namespace NEO {
|
|
|
|
template <typename GfxFamily>
|
|
int __stdcall GmmCallbacks<GfxFamily>::writeL3Address(void *queueHandle, uint64_t l3GfxAddress, uint64_t regOffset) {
|
|
auto csr = reinterpret_cast<CommandStreamReceiver *>(queueHandle);
|
|
|
|
LriHelper<GfxFamily>::program(&csr->getCS(0),
|
|
static_cast<uint32_t>(regOffset & 0xFFFFFFFF),
|
|
static_cast<uint32_t>(l3GfxAddress & 0xFFFFFFFF),
|
|
true,
|
|
false);
|
|
|
|
LriHelper<GfxFamily>::program(&csr->getCS(0),
|
|
static_cast<uint32_t>(regOffset >> 32),
|
|
static_cast<uint32_t>(l3GfxAddress >> 32),
|
|
true,
|
|
false);
|
|
|
|
return 1;
|
|
}
|
|
|
|
} // namespace NEO
|