P4 to Git Change 1535708 by rili@rili-ocl on 2018/04/02 17:07:56
SWDEV-147340 - Added function UpdateAppPowerProfile() that notices KMD to update applicaiton profile. Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/appprofile.cpp#20 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/appprofile.hpp#13 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.cpp#82 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.hpp#45 edit ... //depot/stg/opencl/drivers/opencl/runtime/os/os.hpp#31 edit ... //depot/stg/opencl/drivers/opencl/runtime/os/os_posix.cpp#43 edit ... //depot/stg/opencl/drivers/opencl/runtime/os/os_win32.cpp#49 edit
This commit is contained in:
1 parent
e7fb98dd94
commit
8dd0ed0240
7 files changed
+49
-14
No files matched your search
@@ -134,7 +134,7 @@ bool ADL::init() {
|
||||
#endif // BRAHMA
|
||||
|
||||
AppProfile::AppProfile() : gpuvmHighAddr_(false), profileOverridesAllSettings_(false) {
|
||||
appFileName_ = amd::Os::getAppFileName();
|
||||
amd::Os::getAppPathAndFileName(appFileName_, appPathAndFileName_);
|
||||
propertyDataMap_.insert(
|
||||
DataMap::value_type("BuildOptsAppend", PropertyData(DataType_String, &buildOptsAppend_)));
|
||||
}
|
||||
@@ -148,7 +148,8 @@ bool AppProfile::init() {
|
||||
|
||||
// Convert appName to wide char for X2_Search ADL interface
|
||||
size_t strLength = appFileName_.length() + 1;
|
||||
wchar_t* appName = new wchar_t[strLength];
|
||||
size_t strPathLength = appPathAndFileName_.length() + 1;
|
||||
wchar_t* appName = new wchar_t[strPathLength];
|
||||
|
||||
size_t success = mbstowcs(appName, appFileName_.c_str(), strLength);
|
||||
if (success > 0) {
|
||||
@@ -158,6 +159,14 @@ bool AppProfile::init() {
|
||||
|
||||
wsAppFileName_ = appName;
|
||||
|
||||
success = mbstowcs(appName, appPathAndFileName_.c_str(), strPathLength);
|
||||
if (success > 0) {
|
||||
// mbstowcs was able to convert to wide character successfully.
|
||||
appName[strPathLength - 1] = L'\0';
|
||||
}
|
||||
|
||||
wsAppPathAndFileName_ = appName;
|
||||
|
||||
delete[] appName;
|
||||
|
||||
ParseApplicationProfile();
|
||||
|
||||
Reference in new issue
Block a user