Jesse Hall | fc038bd | 2016-03-26 22:20:22 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
Yiwei Zhang | cb9d4e4 | 2019-02-06 20:22:59 -0800 | [diff] [blame] | 17 | #define ATRACE_TAG ATRACE_TAG_GRAPHICS |
| 18 | |
sergiuferentz | e562203 | 2023-06-26 18:01:47 +0000 | [diff] [blame] | 19 | #include "gpuservice/GpuService.h" |
Jesse Hall | fc038bd | 2016-03-26 22:20:22 -0700 | [diff] [blame] | 20 | |
Yiwei Zhang | bb4eaf6 | 2019-02-23 17:53:27 -0800 | [diff] [blame] | 21 | #include <android-base/stringprintf.h> |
Yuxin Hu | b69e988 | 2023-04-13 03:51:41 +0000 | [diff] [blame] | 22 | #include <android-base/properties.h> |
Yiwei Zhang | bb4eaf6 | 2019-02-23 17:53:27 -0800 | [diff] [blame] | 23 | #include <binder/IPCThreadState.h> |
Jesse Hall | c0b1577 | 2016-12-20 14:47:45 -0800 | [diff] [blame] | 24 | #include <binder/IResultReceiver.h> |
Jesse Hall | fc038bd | 2016-03-26 22:20:22 -0700 | [diff] [blame] | 25 | #include <binder/Parcel.h> |
Yiwei Zhang | bb4eaf6 | 2019-02-23 17:53:27 -0800 | [diff] [blame] | 26 | #include <binder/PermissionCache.h> |
Yiwei Zhang | 2a61c15 | 2019-02-27 11:27:18 -0800 | [diff] [blame] | 27 | #include <cutils/properties.h> |
Yiwei Zhang | 252e5f6 | 2020-02-19 15:44:17 -0800 | [diff] [blame] | 28 | #include <gpumem/GpuMem.h> |
Paul Thomson | f44c6b8 | 2021-12-01 13:53:58 +0000 | [diff] [blame] | 29 | #include <gpuwork/GpuWork.h> |
Yiwei Zhang | baaef88 | 2020-02-02 17:45:30 -0800 | [diff] [blame] | 30 | #include <gpustats/GpuStats.h> |
Yiwei Zhang | bb4eaf6 | 2019-02-23 17:53:27 -0800 | [diff] [blame] | 31 | #include <private/android_filesystem_config.h> |
Adithya Srinivasan | b9f62d6 | 2020-06-18 11:28:12 -0700 | [diff] [blame] | 32 | #include <tracing/GpuMemTracer.h> |
Jesse Hall | 8b0d55e | 2016-03-31 19:29:36 -0700 | [diff] [blame] | 33 | #include <utils/String8.h> |
Yiwei Zhang | cb9d4e4 | 2019-02-06 20:22:59 -0800 | [diff] [blame] | 34 | #include <utils/Trace.h> |
Jesse Hall | 8b0d55e | 2016-03-31 19:29:36 -0700 | [diff] [blame] | 35 | #include <vkjson.h> |
Jesse Hall | fc038bd | 2016-03-26 22:20:22 -0700 | [diff] [blame] | 36 | |
Yiwei Zhang | a265b40 | 2020-06-25 22:02:29 -0700 | [diff] [blame] | 37 | #include <thread> |
sergiuferentz | e562203 | 2023-06-26 18:01:47 +0000 | [diff] [blame] | 38 | #include <memory> |
Yiwei Zhang | a265b40 | 2020-06-25 22:02:29 -0700 | [diff] [blame] | 39 | |
Jesse Hall | fc038bd | 2016-03-26 22:20:22 -0700 | [diff] [blame] | 40 | namespace android { |
| 41 | |
Yiwei Zhang | bb4eaf6 | 2019-02-23 17:53:27 -0800 | [diff] [blame] | 42 | using base::StringAppendF; |
Jesse Hall | fc038bd | 2016-03-26 22:20:22 -0700 | [diff] [blame] | 43 | |
Jesse Hall | 8b0d55e | 2016-03-31 19:29:36 -0700 | [diff] [blame] | 44 | namespace { |
Yiwei Zhang | bb4eaf6 | 2019-02-23 17:53:27 -0800 | [diff] [blame] | 45 | status_t cmdHelp(int out); |
| 46 | status_t cmdVkjson(int out, int err); |
Yiwei Zhang | 2a61c15 | 2019-02-27 11:27:18 -0800 | [diff] [blame] | 47 | void dumpGameDriverInfo(std::string* result); |
Yiwei Zhang | bb4eaf6 | 2019-02-23 17:53:27 -0800 | [diff] [blame] | 48 | } // namespace |
| 49 | |
| 50 | const String16 sDump("android.permission.DUMP"); |
Yuxin Hu | b69e988 | 2023-04-13 03:51:41 +0000 | [diff] [blame] | 51 | const String16 sAccessGpuServicePermission("android.permission.ACCESS_GPU_SERVICE"); |
| 52 | const std::string sAngleGlesDriverSuffix = "angle"; |
Jesse Hall | 8b0d55e | 2016-03-31 19:29:36 -0700 | [diff] [blame] | 53 | |
Yiwei Zhang | 423d080 | 2018-11-16 10:56:12 -0800 | [diff] [blame] | 54 | const char* const GpuService::SERVICE_NAME = "gpu"; |
Jesse Hall | fc038bd | 2016-03-26 22:20:22 -0700 | [diff] [blame] | 55 | |
Yiwei Zhang | 252e5f6 | 2020-02-19 15:44:17 -0800 | [diff] [blame] | 56 | GpuService::GpuService() |
Adithya Srinivasan | b9f62d6 | 2020-06-18 11:28:12 -0700 | [diff] [blame] | 57 | : mGpuMem(std::make_shared<GpuMem>()), |
Paul Thomson | f44c6b8 | 2021-12-01 13:53:58 +0000 | [diff] [blame] | 58 | mGpuWork(std::make_shared<gpuwork::GpuWork>()), |
Adithya Srinivasan | b9f62d6 | 2020-06-18 11:28:12 -0700 | [diff] [blame] | 59 | mGpuStats(std::make_unique<GpuStats>()), |
| 60 | mGpuMemTracer(std::make_unique<GpuMemTracer>()) { |
Paul Thomson | f44c6b8 | 2021-12-01 13:53:58 +0000 | [diff] [blame] | 61 | |
sergiuferentz | e562203 | 2023-06-26 18:01:47 +0000 | [diff] [blame] | 62 | mGpuMemAsyncInitThread = std::make_unique<std::thread>([this] (){ |
Adithya Srinivasan | b9f62d6 | 2020-06-18 11:28:12 -0700 | [diff] [blame] | 63 | mGpuMem->initialize(); |
| 64 | mGpuMemTracer->initialize(mGpuMem); |
| 65 | }); |
Paul Thomson | f44c6b8 | 2021-12-01 13:53:58 +0000 | [diff] [blame] | 66 | |
sergiuferentz | e562203 | 2023-06-26 18:01:47 +0000 | [diff] [blame] | 67 | mGpuWorkAsyncInitThread = std::make_unique<std::thread>([this]() { |
Paul Thomson | f44c6b8 | 2021-12-01 13:53:58 +0000 | [diff] [blame] | 68 | mGpuWork->initialize(); |
| 69 | }); |
Yiwei Zhang | 252e5f6 | 2020-02-19 15:44:17 -0800 | [diff] [blame] | 70 | }; |
Jesse Hall | fc038bd | 2016-03-26 22:20:22 -0700 | [diff] [blame] | 71 | |
sergiuferentz | e562203 | 2023-06-26 18:01:47 +0000 | [diff] [blame] | 72 | GpuService::~GpuService() { |
Steven Moreland | 52361b4 | 2024-04-26 21:53:06 +0000 | [diff] [blame^] | 73 | mGpuMem->stop(); |
| 74 | mGpuWork->stop(); |
| 75 | |
sergiuferentz | e562203 | 2023-06-26 18:01:47 +0000 | [diff] [blame] | 76 | mGpuWorkAsyncInitThread->join(); |
| 77 | mGpuMemAsyncInitThread->join(); |
| 78 | } |
| 79 | |
Greg Kaiser | 210bb7e | 2019-02-12 12:40:05 -0800 | [diff] [blame] | 80 | void GpuService::setGpuStats(const std::string& driverPackageName, |
Yiwei Zhang | d986181 | 2019-02-13 11:51:55 -0800 | [diff] [blame] | 81 | const std::string& driverVersionName, uint64_t driverVersionCode, |
Yiwei Zhang | 96c0171 | 2019-02-19 16:00:25 -0800 | [diff] [blame] | 82 | int64_t driverBuildTime, const std::string& appPackageName, |
Yiwei Zhang | 27ab3ac | 2019-07-02 18:10:55 -0700 | [diff] [blame] | 83 | const int32_t vulkanVersion, GpuStatsInfo::Driver driver, |
Yiwei Zhang | 794d295 | 2019-05-06 17:43:59 -0700 | [diff] [blame] | 84 | bool isDriverLoaded, int64_t driverLoadingTime) { |
Yiwei Zhang | fdd7e78 | 2020-01-31 15:59:34 -0800 | [diff] [blame] | 85 | mGpuStats->insertDriverStats(driverPackageName, driverVersionName, driverVersionCode, |
| 86 | driverBuildTime, appPackageName, vulkanVersion, driver, |
| 87 | isDriverLoaded, driverLoadingTime); |
Yiwei Zhang | cb9d4e4 | 2019-02-06 20:22:59 -0800 | [diff] [blame] | 88 | } |
| 89 | |
Yiwei Zhang | bcba411 | 2019-07-03 13:39:32 -0700 | [diff] [blame] | 90 | void GpuService::setTargetStats(const std::string& appPackageName, const uint64_t driverVersionCode, |
| 91 | const GpuStatsInfo::Stats stats, const uint64_t value) { |
| 92 | mGpuStats->insertTargetStats(appPackageName, driverVersionCode, stats, value); |
Yiwei Zhang | 8c5e3bd | 2019-05-09 14:34:19 -0700 | [diff] [blame] | 93 | } |
| 94 | |
Serdar Kocdemir | b2901c9 | 2022-11-17 00:39:05 +0000 | [diff] [blame] | 95 | void GpuService::setTargetStatsArray(const std::string& appPackageName, |
| 96 | const uint64_t driverVersionCode, const GpuStatsInfo::Stats stats, |
| 97 | const uint64_t* values, const uint32_t valueCount) { |
| 98 | mGpuStats->insertTargetStatsArray(appPackageName, driverVersionCode, stats, values, valueCount); |
| 99 | } |
| 100 | |
Yuxin Hu | b69e988 | 2023-04-13 03:51:41 +0000 | [diff] [blame] | 101 | void GpuService::toggleAngleAsSystemDriver(bool enabled) { |
| 102 | IPCThreadState* ipc = IPCThreadState::self(); |
| 103 | const int pid = ipc->getCallingPid(); |
| 104 | const int uid = ipc->getCallingUid(); |
| 105 | |
| 106 | // only system_server with the ACCESS_GPU_SERVICE permission is allowed to set |
| 107 | // persist.graphics.egl |
| 108 | if (uid != AID_SYSTEM || |
| 109 | !PermissionCache::checkPermission(sAccessGpuServicePermission, pid, uid)) { |
| 110 | ALOGE("Permission Denial: can't set persist.graphics.egl from setAngleAsSystemDriver() " |
| 111 | "pid=%d, uid=%d\n", pid, uid); |
| 112 | return; |
| 113 | } |
| 114 | |
| 115 | std::lock_guard<std::mutex> lock(mLock); |
| 116 | if (enabled) { |
| 117 | android::base::SetProperty("persist.graphics.egl", sAngleGlesDriverSuffix); |
| 118 | } else { |
| 119 | android::base::SetProperty("persist.graphics.egl", ""); |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | |
Peiyong Lin | 0acbfdc | 2020-06-17 18:47:12 -0700 | [diff] [blame] | 124 | void GpuService::setUpdatableDriverPath(const std::string& driverPath) { |
Yiwei Zhang | c7cdd05 | 2020-07-28 23:11:21 -0700 | [diff] [blame] | 125 | IPCThreadState* ipc = IPCThreadState::self(); |
| 126 | const int pid = ipc->getCallingPid(); |
| 127 | const int uid = ipc->getCallingUid(); |
| 128 | |
| 129 | // only system_server is allowed to set updatable driver path |
| 130 | if (uid != AID_SYSTEM) { |
| 131 | ALOGE("Permission Denial: can't set updatable driver path from pid=%d, uid=%d\n", pid, uid); |
| 132 | return; |
| 133 | } |
| 134 | |
| 135 | std::lock_guard<std::mutex> lock(mLock); |
| 136 | mDeveloperDriverPath = driverPath; |
Peiyong Lin | 0acbfdc | 2020-06-17 18:47:12 -0700 | [diff] [blame] | 137 | } |
| 138 | |
| 139 | std::string GpuService::getUpdatableDriverPath() { |
Yiwei Zhang | c7cdd05 | 2020-07-28 23:11:21 -0700 | [diff] [blame] | 140 | std::lock_guard<std::mutex> lock(mLock); |
| 141 | return mDeveloperDriverPath; |
Peiyong Lin | 0acbfdc | 2020-06-17 18:47:12 -0700 | [diff] [blame] | 142 | } |
| 143 | |
Yiwei Zhang | cb9d4e4 | 2019-02-06 20:22:59 -0800 | [diff] [blame] | 144 | status_t GpuService::shellCommand(int /*in*/, int out, int err, std::vector<String16>& args) { |
| 145 | ATRACE_CALL(); |
| 146 | |
| 147 | ALOGV("shellCommand"); |
Jesse Hall | 8b0d55e | 2016-03-31 19:29:36 -0700 | [diff] [blame] | 148 | for (size_t i = 0, n = args.size(); i < n; i++) |
Tomasz Wasilczyk | 0e1adf4 | 2023-08-11 00:06:51 +0000 | [diff] [blame] | 149 | ALOGV(" arg[%zu]: '%s'", i, String8(args[i]).c_str()); |
Jesse Hall | 8b0d55e | 2016-03-31 19:29:36 -0700 | [diff] [blame] | 150 | |
Jesse Hall | 3e26b13 | 2016-12-20 14:31:28 -0800 | [diff] [blame] | 151 | if (args.size() >= 1) { |
Yiwei Zhang | bb4eaf6 | 2019-02-23 17:53:27 -0800 | [diff] [blame] | 152 | if (args[0] == String16("vkjson")) return cmdVkjson(out, err); |
| 153 | if (args[0] == String16("help")) return cmdHelp(out); |
Jesse Hall | 3e26b13 | 2016-12-20 14:31:28 -0800 | [diff] [blame] | 154 | } |
| 155 | // no command, or unrecognized command |
Yiwei Zhang | bb4eaf6 | 2019-02-23 17:53:27 -0800 | [diff] [blame] | 156 | cmdHelp(err); |
Jesse Hall | 3e26b13 | 2016-12-20 14:31:28 -0800 | [diff] [blame] | 157 | return BAD_VALUE; |
Jesse Hall | fc038bd | 2016-03-26 22:20:22 -0700 | [diff] [blame] | 158 | } |
| 159 | |
Yiwei Zhang | 2d4c188 | 2019-02-24 22:28:08 -0800 | [diff] [blame] | 160 | status_t GpuService::doDump(int fd, const Vector<String16>& args, bool /*asProto*/) { |
Yiwei Zhang | bb4eaf6 | 2019-02-23 17:53:27 -0800 | [diff] [blame] | 161 | std::string result; |
| 162 | |
| 163 | IPCThreadState* ipc = IPCThreadState::self(); |
| 164 | const int pid = ipc->getCallingPid(); |
| 165 | const int uid = ipc->getCallingUid(); |
| 166 | |
| 167 | if ((uid != AID_SHELL) && !PermissionCache::checkPermission(sDump, pid, uid)) { |
| 168 | StringAppendF(&result, "Permission Denial: can't dump gpu from pid=%d, uid=%d\n", pid, uid); |
| 169 | } else { |
Yiwei Zhang | 2d4c188 | 2019-02-24 22:28:08 -0800 | [diff] [blame] | 170 | bool dumpAll = true; |
Mikael Pessa | 3d14605 | 2019-07-09 09:25:38 -0700 | [diff] [blame] | 171 | bool dumpDriverInfo = false; |
Yiwei Zhang | 252e5f6 | 2020-02-19 15:44:17 -0800 | [diff] [blame] | 172 | bool dumpMem = false; |
Mikael Pessa | 3d14605 | 2019-07-09 09:25:38 -0700 | [diff] [blame] | 173 | bool dumpStats = false; |
Paul Thomson | f44c6b8 | 2021-12-01 13:53:58 +0000 | [diff] [blame] | 174 | bool dumpWork = false; |
Yiwei Zhang | 2d4c188 | 2019-02-24 22:28:08 -0800 | [diff] [blame] | 175 | size_t numArgs = args.size(); |
| 176 | |
| 177 | if (numArgs) { |
Mikael Pessa | 3d14605 | 2019-07-09 09:25:38 -0700 | [diff] [blame] | 178 | for (size_t index = 0; index < numArgs; ++index) { |
| 179 | if (args[index] == String16("--gpustats")) { |
| 180 | dumpStats = true; |
| 181 | } else if (args[index] == String16("--gpudriverinfo")) { |
| 182 | dumpDriverInfo = true; |
Yiwei Zhang | 252e5f6 | 2020-02-19 15:44:17 -0800 | [diff] [blame] | 183 | } else if (args[index] == String16("--gpumem")) { |
| 184 | dumpMem = true; |
Paul Thomson | f44c6b8 | 2021-12-01 13:53:58 +0000 | [diff] [blame] | 185 | } else if (args[index] == String16("--gpuwork")) { |
| 186 | dumpWork = true; |
Mikael Pessa | 3d14605 | 2019-07-09 09:25:38 -0700 | [diff] [blame] | 187 | } |
Yiwei Zhang | 2d4c188 | 2019-02-24 22:28:08 -0800 | [diff] [blame] | 188 | } |
Paul Thomson | f44c6b8 | 2021-12-01 13:53:58 +0000 | [diff] [blame] | 189 | dumpAll = !(dumpDriverInfo || dumpMem || dumpStats || dumpWork); |
Yiwei Zhang | 2d4c188 | 2019-02-24 22:28:08 -0800 | [diff] [blame] | 190 | } |
| 191 | |
Mikael Pessa | 3d14605 | 2019-07-09 09:25:38 -0700 | [diff] [blame] | 192 | if (dumpAll || dumpDriverInfo) { |
Yiwei Zhang | 2a61c15 | 2019-02-27 11:27:18 -0800 | [diff] [blame] | 193 | dumpGameDriverInfo(&result); |
| 194 | result.append("\n"); |
Mikael Pessa | 3d14605 | 2019-07-09 09:25:38 -0700 | [diff] [blame] | 195 | } |
Yiwei Zhang | 252e5f6 | 2020-02-19 15:44:17 -0800 | [diff] [blame] | 196 | if (dumpAll || dumpMem) { |
| 197 | mGpuMem->dump(args, &result); |
| 198 | result.append("\n"); |
| 199 | } |
Mikael Pessa | 3d14605 | 2019-07-09 09:25:38 -0700 | [diff] [blame] | 200 | if (dumpAll || dumpStats) { |
Yiwei Zhang | 8cf7c7b | 2019-08-28 13:07:30 -0700 | [diff] [blame] | 201 | mGpuStats->dump(args, &result); |
Yiwei Zhang | 2a61c15 | 2019-02-27 11:27:18 -0800 | [diff] [blame] | 202 | result.append("\n"); |
Yiwei Zhang | 2d4c188 | 2019-02-24 22:28:08 -0800 | [diff] [blame] | 203 | } |
Paul Thomson | f44c6b8 | 2021-12-01 13:53:58 +0000 | [diff] [blame] | 204 | if (dumpAll || dumpWork) { |
| 205 | mGpuWork->dump(args, &result); |
| 206 | result.append("\n"); |
| 207 | } |
Yiwei Zhang | bb4eaf6 | 2019-02-23 17:53:27 -0800 | [diff] [blame] | 208 | } |
| 209 | |
| 210 | write(fd, result.c_str(), result.size()); |
| 211 | return NO_ERROR; |
| 212 | } |
| 213 | |
Jesse Hall | 8b0d55e | 2016-03-31 19:29:36 -0700 | [diff] [blame] | 214 | namespace { |
| 215 | |
Yiwei Zhang | bb4eaf6 | 2019-02-23 17:53:27 -0800 | [diff] [blame] | 216 | status_t cmdHelp(int out) { |
Jesse Hall | 8b0d55e | 2016-03-31 19:29:36 -0700 | [diff] [blame] | 217 | FILE* outs = fdopen(out, "w"); |
| 218 | if (!outs) { |
Yiwei Zhang | bb4eaf6 | 2019-02-23 17:53:27 -0800 | [diff] [blame] | 219 | ALOGE("vkjson: failed to create out stream: %s (%d)", strerror(errno), errno); |
Jesse Hall | 8b0d55e | 2016-03-31 19:29:36 -0700 | [diff] [blame] | 220 | return BAD_VALUE; |
| 221 | } |
| 222 | fprintf(outs, |
Yiwei Zhang | bb4eaf6 | 2019-02-23 17:53:27 -0800 | [diff] [blame] | 223 | "GPU Service commands:\n" |
| 224 | " vkjson dump Vulkan properties as JSON\n"); |
Jesse Hall | 8b0d55e | 2016-03-31 19:29:36 -0700 | [diff] [blame] | 225 | fclose(outs); |
| 226 | return NO_ERROR; |
| 227 | } |
| 228 | |
Jesse Hall | 3841bf4 | 2016-06-12 15:08:28 -0700 | [diff] [blame] | 229 | void vkjsonPrint(FILE* out) { |
| 230 | std::string json = VkJsonInstanceToJson(VkJsonGetInstance()); |
| 231 | fwrite(json.data(), 1, json.size(), out); |
| 232 | fputc('\n', out); |
Jesse Hall | 8b0d55e | 2016-03-31 19:29:36 -0700 | [diff] [blame] | 233 | } |
| 234 | |
Yiwei Zhang | bb4eaf6 | 2019-02-23 17:53:27 -0800 | [diff] [blame] | 235 | status_t cmdVkjson(int out, int /*err*/) { |
Jesse Hall | 8b0d55e | 2016-03-31 19:29:36 -0700 | [diff] [blame] | 236 | FILE* outs = fdopen(out, "w"); |
| 237 | if (!outs) { |
Jesse Hall | 3841bf4 | 2016-06-12 15:08:28 -0700 | [diff] [blame] | 238 | int errnum = errno; |
Jesse Hall | 8b0d55e | 2016-03-31 19:29:36 -0700 | [diff] [blame] | 239 | ALOGE("vkjson: failed to create output stream: %s", strerror(errnum)); |
| 240 | return -errnum; |
| 241 | } |
Jesse Hall | 3841bf4 | 2016-06-12 15:08:28 -0700 | [diff] [blame] | 242 | vkjsonPrint(outs); |
Jesse Hall | 8b0d55e | 2016-03-31 19:29:36 -0700 | [diff] [blame] | 243 | fclose(outs); |
Jesse Hall | 3841bf4 | 2016-06-12 15:08:28 -0700 | [diff] [blame] | 244 | return NO_ERROR; |
Jesse Hall | 8b0d55e | 2016-03-31 19:29:36 -0700 | [diff] [blame] | 245 | } |
| 246 | |
Yiwei Zhang | 2a61c15 | 2019-02-27 11:27:18 -0800 | [diff] [blame] | 247 | void dumpGameDriverInfo(std::string* result) { |
| 248 | if (!result) return; |
| 249 | |
| 250 | char stableGameDriver[PROPERTY_VALUE_MAX] = {}; |
| 251 | property_get("ro.gfx.driver.0", stableGameDriver, "unsupported"); |
| 252 | StringAppendF(result, "Stable Game Driver: %s\n", stableGameDriver); |
| 253 | |
| 254 | char preReleaseGameDriver[PROPERTY_VALUE_MAX] = {}; |
| 255 | property_get("ro.gfx.driver.1", preReleaseGameDriver, "unsupported"); |
| 256 | StringAppendF(result, "Pre-release Game Driver: %s\n", preReleaseGameDriver); |
| 257 | } |
| 258 | |
Jesse Hall | 8b0d55e | 2016-03-31 19:29:36 -0700 | [diff] [blame] | 259 | } // anonymous namespace |
| 260 | |
Jesse Hall | fc038bd | 2016-03-26 22:20:22 -0700 | [diff] [blame] | 261 | } // namespace android |