SWDEV-272449 - Create RGP manager before CommitSettingsAndInit()
Enabling DebugVMID requires a certain sequence in
PAL initialization. StartLateDeviceInit() must be called before
CommitSettingsAndInit().
Change-Id: I7385a8cc89e7a8ad97a6b56ad6acbd2cf2f29728
[ROCm/clr commit: dee99ca807]
Этот коммит содержится в:
@@ -885,6 +885,13 @@ bool Device::create(Pal::IDevice* device) {
|
||||
// Make sure CP DMA can be used for all possible transfers
|
||||
palSettings->cpDmaCmdCopyMemoryMaxBytes = 0xFFFFFFFF;
|
||||
|
||||
// Create RGP capture manager
|
||||
// Note: RGP initialization in PAL must be performed before CommitSettingsAndInit()
|
||||
rgpCaptureMgr_ = RgpCaptureMgr::Create(platform_, *this);
|
||||
if (nullptr != rgpCaptureMgr_) {
|
||||
Pal::IPlatform::InstallDeveloperCb(iPlat(), &Device::PalDeveloperCallback, this);
|
||||
}
|
||||
|
||||
// Commit the new settings for the device
|
||||
result = iDev()->CommitSettingsAndInit();
|
||||
if (result != Pal::Result::Success) {
|
||||
@@ -1121,10 +1128,12 @@ bool Device::initializeHeapResources() {
|
||||
}
|
||||
xferQueue_->enableSyncedBlit();
|
||||
|
||||
// Create RGP capture manager
|
||||
rgpCaptureMgr_ = RgpCaptureMgr::Create(platform_, *this);
|
||||
if (nullptr != rgpCaptureMgr_) {
|
||||
Pal::IPlatform::InstallDeveloperCb(iPlat(), &Device::PalDeveloperCallback, this);
|
||||
// Update RGP capture manager
|
||||
if (rgpCaptureMgr_ != nullptr) {
|
||||
if (!rgpCaptureMgr_->Update(platform_)) {
|
||||
delete rgpCaptureMgr_;
|
||||
rgpCaptureMgr_ = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -81,7 +81,6 @@ bool RgpCaptureMgr::Init(Pal::IPlatform* platform) {
|
||||
if (dev_driver_server_ == nullptr) {
|
||||
return false;
|
||||
}
|
||||
const Settings& settings = device_.settings();
|
||||
// Tell RGP that the server (i.e. the driver) supports tracing if requested.
|
||||
rgp_server_ = dev_driver_server_->GetRGPServer();
|
||||
if (rgp_server_ == nullptr) {
|
||||
@@ -91,8 +90,14 @@ bool RgpCaptureMgr::Init(Pal::IPlatform* platform) {
|
||||
// Finalize RGP settings
|
||||
Finalize();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// ================================================================================================
|
||||
bool RgpCaptureMgr::Update(Pal::IPlatform* platform) {
|
||||
bool result = true;
|
||||
|
||||
const Settings& settings = device_.settings();
|
||||
// Fail initialization of trace resources if SQTT tracing has been force-disabled from
|
||||
// the panel (this will consequently fail the trace), or if the chosen device's gfxip
|
||||
// does not support SQTT.
|
||||
|
||||
@@ -311,6 +311,7 @@ class RgpCaptureMgr {
|
||||
bool RegisterTimedQueue(uint32_t queue_id, Pal::IQueue* iQueue, bool* debug_vmid) const;
|
||||
Pal::Result TimedQueueSubmit(Pal::IQueue* queue, uint64_t cmdId,
|
||||
const Pal::SubmitInfo& submitInfo) const;
|
||||
bool Update(Pal::IPlatform* platform);
|
||||
|
||||
private:
|
||||
// Steps that an RGP trace goes through
|
||||
|
||||
Ссылка в новой задаче
Block a user