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]
このコミットが含まれているのは:
@@ -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]);
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
// ================================================================================================
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする