From e51bb49ce6ab268c850a3d5ce08cdc1456286194 Mon Sep 17 00:00:00 2001
From: foreman
Date: Wed, 18 Mar 2015 11:26:04 -0400
Subject: [PATCH] P4 to Git Change 1131897 by wchau@wchau_WINDOWS7_OCL on
2015/03/18 10:50:41
ECR #399840 - OpenCL Runtime HW Debug support development - add support to the VI asics & support the use case of debug registeration in a pre-dispatch callback function
** Cross branch check-in with CL1131894
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_debugger_amd.cpp#7 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudebugmanager.cpp#9 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#501 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.hpp#139 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gputrap.hpp#2 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.cpp#355 edit
---
opencl/api/opencl/amdocl/cl_debugger_amd.cpp | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/opencl/api/opencl/amdocl/cl_debugger_amd.cpp b/opencl/api/opencl/amdocl/cl_debugger_amd.cpp
index 7b1f12f852..ac6e090a81 100644
--- a/opencl/api/opencl/amdocl/cl_debugger_amd.cpp
+++ b/opencl/api/opencl/amdocl/cl_debugger_amd.cpp
@@ -415,9 +415,8 @@ RUNTIME_ENTRY(cl_int, clHwDbgRegisterDebuggerAMD, (
return CL_INVALID_VALUE;
}
- // check if the debugger has already registered
- if (NULL != as_amd(device)->hwDebugMgr()) {
- return CL_INVALID_VALUE;
+ if (NULL == as_amd(device)->hwDebugMgr()) {
+ return CL_HWDBG_MANAGER_NOT_AVAILABLE_AMD;
}
return as_amd(device)->hwDebugManagerInit(as_amd(context),
@@ -447,7 +446,7 @@ RUNTIME_ENTRY(cl_int, clHwDbgUnregisterDebuggerAMD, (
return CL_HWDBG_MANAGER_NOT_AVAILABLE_AMD;
}
- as_amd(device)->hwDebugManagerRemove();
+ debugManager->unregisterDebugger();
return CL_SUCCESS;