diff options
author | Ankit Goyal <layog@google.com> | 2022-05-05 15:33:00 -0700 |
---|---|---|
committer | Ankit Goyal <layog@google.com> | 2022-05-23 22:12:37 +0000 |
commit | 84a9217b9aac4dd6809de7be21ebd1b4d390bfb1 (patch) | |
tree | 5478064dcefdf91985aabaa2a0fd096c4b5652ce | |
parent | e0b9db90f3602383cc68838f0e600145154c5ba8 (diff) | |
download | gchips-84a9217b9aac4dd6809de7be21ebd1b4d390bfb1.tar.gz |
Deprecate allocator 4.0 in favor of AIDL V1
Fix: 220910504
Fix: 228405226
Test: go/allocator4-deprecate
Change-Id: Iabe64f0f3d89494269b5060469b1a9fa2381db92
-rw-r--r-- | gralloc4/service/4.x/Android.bp | 46 | ||||
-rw-r--r-- | gralloc4/service/4.x/android.hardware.graphics.allocator@4.0-service.rc | 7 | ||||
-rw-r--r-- | gralloc4/service/4.x/service.cpp | 45 | ||||
-rw-r--r-- | gralloc4/src/4.x/Android.bp | 19 |
4 files changed, 0 insertions, 117 deletions
diff --git a/gralloc4/service/4.x/Android.bp b/gralloc4/service/4.x/Android.bp deleted file mode 100644 index dbdfbec..0000000 --- a/gralloc4/service/4.x/Android.bp +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2020 Arm Limited. - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package { - default_applicable_licenses: ["Android-Apache-2.0"], -} - -cc_binary { - name: "android.hardware.graphics.allocator@4.0-service", - proprietary: true, - relative_install_path: "hw", - srcs: [ - "service.cpp", - ], - init_rc: [ - "android.hardware.graphics.allocator@4.0-service.rc", - ], - header_libs: [ - "libgralloc_headers", - ], - shared_libs: [ - "android.hardware.graphics.allocator@4.0", - "android.hardware.graphics.allocator@4.0-impl", - "android.hardware.graphics.common-V3-ndk", - "libhidlbase", - "liblog", - "libutils", - ], - required: [ - "android.hardware.graphics.allocator@4.0-impl", - ], -} diff --git a/gralloc4/service/4.x/android.hardware.graphics.allocator@4.0-service.rc b/gralloc4/service/4.x/android.hardware.graphics.allocator@4.0-service.rc deleted file mode 100644 index 6523f4e..0000000 --- a/gralloc4/service/4.x/android.hardware.graphics.allocator@4.0-service.rc +++ /dev/null @@ -1,7 +0,0 @@ -service vendor.gralloc-4-0 /vendor/bin/hw/android.hardware.graphics.allocator@4.0-service - class hal animation - interface android.hardware.graphics.allocator@4.0::IAllocator default - user system - group graphics drmrpc - capabilities SYS_NICE - onrestart restart surfaceflinger diff --git a/gralloc4/service/4.x/service.cpp b/gralloc4/service/4.x/service.cpp deleted file mode 100644 index d540086..0000000 --- a/gralloc4/service/4.x/service.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (C) 2020 Arm Limited. - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#define LOG_TAG "android.hardware.graphics.allocator@4.0-service" - -#include <hidl/HidlTransportSupport.h> -#include <hidl/Status.h> -#include <utils/StrongPointer.h> - -#include "4.x/GrallocAllocator.h" - -using android::hardware::configureRpcThreadpool; -using android::hardware::joinRpcThreadpool; -using android::hardware::setMinSchedulerPolicy; -using arm::allocator::GrallocAllocator; - -int main() { - android::sp<GrallocAllocator> service = new GrallocAllocator(); - configureRpcThreadpool(4, true /* callerWillJoin */); - - if (!setMinSchedulerPolicy(service, SCHED_NORMAL, -20)) { - ALOGW("Cannot bump allocator priority"); - } - - if (service->registerAsService() != android::OK) { - ALOGE("Cannot register allocator service"); - return -EINVAL; - } - - joinRpcThreadpool(); - return 0; -} diff --git a/gralloc4/src/4.x/Android.bp b/gralloc4/src/4.x/Android.bp index ab0fead..88c7a01 100644 --- a/gralloc4/src/4.x/Android.bp +++ b/gralloc4/src/4.x/Android.bp @@ -73,25 +73,6 @@ cc_defaults { } cc_library_shared { - name: "android.hardware.graphics.allocator@4.0-impl", - defaults: [ - "arm_gralloc_api_4x_defaults", - ], - shared_libs: [ - "android.hardware.graphics.allocator@4.0", - "android.hardware.graphics.mapper@4.0", - ], - srcs: [ - "GrallocAllocator.cpp", - ":libgralloc_hidl_common_allocator", - ":libgralloc_hidl_common_shared_metadata", - ], - include_dirs: [ - "hardware/google/gchips/include", - ], -} - -cc_library_shared { name: "android.hardware.graphics.mapper@4.0-impl", defaults: [ "arm_gralloc_api_4x_defaults", |