SWDEV-259998 - Change the location of RGP init calls

Move StartLateDeviceInit() and FinishDeviceInit() calls in RGP
server to avoid a timeout

Change-Id: Ifd681859c7dc76259d7296aa8cc15305d563c9b2


[ROCm/clr commit: ecea224bcf]
このコミットが含まれているのは:
German Andryeyev
2022-06-07 13:20:21 -04:00
コミット 2b3296a4ef
2個のファイルの変更18行の追加11行の削除
+18
ファイルの表示
@@ -57,6 +57,14 @@
#include <sstream>
#include <tuple>
#ifdef PAL_GPUOPEN_OCL
// gpuutil headers
#include "gpuUtil/palGpaSession.h"
#include "devDriverServer.h"
#include "protocols/rgpServer.h"
#include "protocols/driverControlServer.h"
#endif // PAL_GPUOPEN_OCL
namespace {
//! Define the mapping from PAL asic revision enumeration values to the
@@ -1289,6 +1297,16 @@ bool Device::init() {
return false;
}
#ifdef PAL_GPUOPEN_OCL
if ((platform_->GetDevDriverServer() != nullptr) &&
(platform_->GetDevDriverServer()->GetDriverControlServer() != nullptr)) {
// Make sure the devdriver initialization is done after Pal platform creation
// to avoid a timeout in RGP server
platform_->GetDevDriverServer()->GetDriverControlServer()->StartLateDeviceInit();
platform_->GetDevDriverServer()->GetDriverControlServer()->FinishDeviceInit();
}
#endif // PAL_GPUOPEN_OCL
// Get the total number of active devices
// Count up all the devices in the system.
platform_->EnumerateDevices(&gNumDevices, &gDeviceList[0]);
-11
ファイルの表示
@@ -245,8 +245,6 @@ void RgpCaptureMgr::Finalize() {
rgp_server_->DisableTraces();
}
dev_driver_server_->GetDriverControlServer()->StartLateDeviceInit();
// Finalize the devmode manager
dev_driver_server_->Finalize();
@@ -776,15 +774,6 @@ void RgpCaptureMgr::PostDeviceCreate() {
auto* pDriverControlServer = dev_driver_server_->GetDriverControlServer();
assert(pDriverControlServer != nullptr);
// If the driver hasn't been marked as fully initialized yet, mark it now.
// We consider the time after the logical device creation to be the fully initialized driver
// position. This is mainly because PAL is fully initialized at this point and we also know
// whether or not the debug vmid has been acquired. External tools use this information to
// decide when it's reasonable to make certain requests of the driver through protocol functions.
if (pDriverControlServer->IsDriverInitialized() == false) {
pDriverControlServer->FinishDeviceInit();
}
}
// ================================================================================================