diff --git a/uis7885/hardware/BUILD.gn b/uis7885/hardware/BUILD.gn old mode 100755 new mode 100644 index c1ff2b286512e31433740f8f0d03982e85d3c655..af654c05294e7e4c952eff2b8f65df54ca820d62 --- a/uis7885/hardware/BUILD.gn +++ b/uis7885/hardware/BUILD.gn @@ -16,7 +16,7 @@ import("//build/ohos.gni") group("hardware_group") { deps = [ "aosp:aosp", -# "gpu:gpu_vendor", + "gpu:gpu_vendor", "omx_il:lib_omx", "location:location_group", "display:display_buffer_model", diff --git a/uis7885/hardware/aosp/BUILD.gn b/uis7885/hardware/aosp/BUILD.gn index f0cfcccf979482e663e31a63ffe9a8130ff4ae45..f2a3645b292dcc4dd8fa46f63fef07bc25e82b43 100755 --- a/uis7885/hardware/aosp/BUILD.gn +++ b/uis7885/hardware/aosp/BUILD.gn @@ -33,6 +33,7 @@ group("aosp"){ "system/memory/libdmabufheap:libaosp_dmabufheap", "system/memory/libmemion:libmemion", "vendor/sprd/modules/minidump:group_minidump", + "frameworks/native/libs/ui:ui", ] } diff --git a/uis7885/hardware/aosp/frameworks/native/libs/gralloc/types/lib/libgralloctypes.z.so b/uis7885/hardware/aosp/frameworks/native/libs/gralloc/types/lib/libgralloctypes.z.so index 698be4889d530dc2cd4d798a75bb79cbfe3daf65..45760489166be1adc697bdbb656125e3a2196abc 100755 Binary files a/uis7885/hardware/aosp/frameworks/native/libs/gralloc/types/lib/libgralloctypes.z.so and b/uis7885/hardware/aosp/frameworks/native/libs/gralloc/types/lib/libgralloctypes.z.so differ diff --git a/uis7885/hardware/aosp/frameworks/native/libs/nativewindow/lib/libnativewindow.z.so b/uis7885/hardware/aosp/frameworks/native/libs/nativewindow/lib/libnativewindow.z.so index c862d5121d76ecdaa6044c72fced8effb9e096fe..f0c484259450e0a67f4bf552e1cc127eb11c7fa4 100755 Binary files a/uis7885/hardware/aosp/frameworks/native/libs/nativewindow/lib/libnativewindow.z.so and b/uis7885/hardware/aosp/frameworks/native/libs/nativewindow/lib/libnativewindow.z.so differ diff --git a/uis7885/hardware/aosp/frameworks/native/libs/ui/lib/libui.z.so b/uis7885/hardware/aosp/frameworks/native/libs/ui/lib/libui.z.so index b830afce03a9cc49179d95914ed48c3bb223763b..64ee12a6e0c7ce2c4102ac7b5a115727c870e702 100755 Binary files a/uis7885/hardware/aosp/frameworks/native/libs/ui/lib/libui.z.so and b/uis7885/hardware/aosp/frameworks/native/libs/ui/lib/libui.z.so differ diff --git a/uis7885/hardware/aosp/hardware/interfaces/graphics/allocator/2.0/BUILD.gn b/uis7885/hardware/aosp/hardware/interfaces/graphics/allocator/2.0/BUILD.gn index 75a7b16f618b7a10e550ff16f9245b6411562d7f..89201983caba19e50e3133af6c5ec638344cb9f1 100755 --- a/uis7885/hardware/aosp/hardware/interfaces/graphics/allocator/2.0/BUILD.gn +++ b/uis7885/hardware/aosp/hardware/interfaces/graphics/allocator/2.0/BUILD.gn @@ -22,15 +22,16 @@ ohos_prebuilt_shared_library( "allocator2.0") { subsystem_name = "${SUBSYSTEM_NAME}" } -ohos_prebuilt_shared_library( "allocator_passthrough2.0") { - source = "lib/liballocator_passthrough2.0.z.so" +# ohos_prebuilt_shared_library( "allocator_passthrough2.0") { +# source = "lib/liballocator_passthrough2.0.z.so" - relative_install_dir = "hw" - #output_name = "android.hardware.graphics.allocator@2.0-impl.so" - symlink_target_name = [ "android.hardware.graphics.allocator@2.0-impl.so" ] +# relative_install_dir = "hw" +# #output_name = "android.hardware.graphics.allocator@2.0-impl.so" +# symlink_target_name = [ "android.hardware.graphics.allocator@2.0-impl.so" ] + +# install_enable = true +# install_images = [ chipset_base_dir ] +# subsystem_name = "${SUBSYSTEM_NAME}" +# part_name = "${PART_NAME}" +# } - install_enable = true - install_images = [ chipset_base_dir ] - subsystem_name = "${SUBSYSTEM_NAME}" - part_name = "${PART_NAME}" -} diff --git a/uis7885/hardware/aosp/hardware/interfaces/graphics/allocator/2.0/lib/liballocator2.0.z.so b/uis7885/hardware/aosp/hardware/interfaces/graphics/allocator/2.0/lib/liballocator2.0.z.so index a526bd22682efc8b0ba587a1ab8e8e55a82ae392..7dbc3af669d2a78a1182754f208e389edf5ef56d 100755 Binary files a/uis7885/hardware/aosp/hardware/interfaces/graphics/allocator/2.0/lib/liballocator2.0.z.so and b/uis7885/hardware/aosp/hardware/interfaces/graphics/allocator/2.0/lib/liballocator2.0.z.so differ diff --git a/uis7885/hardware/aosp/hardware/interfaces/graphics/allocator/3.0/BUILD.gn b/uis7885/hardware/aosp/hardware/interfaces/graphics/allocator/3.0/BUILD.gn index 446ee04de5e65237556f0929fd317442bd388c58..1e4a6e6f1b3fb3eef46376e5a6f10e1e00892c1a 100755 --- a/uis7885/hardware/aosp/hardware/interfaces/graphics/allocator/3.0/BUILD.gn +++ b/uis7885/hardware/aosp/hardware/interfaces/graphics/allocator/3.0/BUILD.gn @@ -14,7 +14,7 @@ import("//build/ohos.gni") import("../../../../../aosp.gni") -ohos_prebuilt_shared_library( "allocator3.0") { +ohos_prebuilt_shared_library("allocator3.0") { source = "lib/liballocator3.0.z.so" install_enable = true install_images = [ chipset_base_dir ] diff --git a/uis7885/hardware/aosp/hardware/interfaces/graphics/allocator/3.0/lib/liballocator3.0.z.so b/uis7885/hardware/aosp/hardware/interfaces/graphics/allocator/3.0/lib/liballocator3.0.z.so index 7bad62ebc8c48c99e161c417f7e6b06ba3732604..102f3e13778a1413720286439991528ce1d785ec 100755 Binary files a/uis7885/hardware/aosp/hardware/interfaces/graphics/allocator/3.0/lib/liballocator3.0.z.so and b/uis7885/hardware/aosp/hardware/interfaces/graphics/allocator/3.0/lib/liballocator3.0.z.so differ diff --git a/uis7885/hardware/aosp/hardware/interfaces/graphics/allocator/4.0/lib/liballocator4.0.z.so b/uis7885/hardware/aosp/hardware/interfaces/graphics/allocator/4.0/lib/liballocator4.0.z.so index f7529741c2e56c4eb73977b22f72eb12e5ca32ad..d51dc15c10e9cd372a3840b48c35b12f40453cf4 100755 Binary files a/uis7885/hardware/aosp/hardware/interfaces/graphics/allocator/4.0/lib/liballocator4.0.z.so and b/uis7885/hardware/aosp/hardware/interfaces/graphics/allocator/4.0/lib/liballocator4.0.z.so differ diff --git a/uis7885/hardware/aosp/hardware/interfaces/graphics/common/1.0/BUILD.gn b/uis7885/hardware/aosp/hardware/interfaces/graphics/common/1.0/BUILD.gn index d15e457553dab22e457b95978fa6c61863c6eece..9b8ae37618d418c1e7b28c4a1166324711f99f47 100755 --- a/uis7885/hardware/aosp/hardware/interfaces/graphics/common/1.0/BUILD.gn +++ b/uis7885/hardware/aosp/hardware/interfaces/graphics/common/1.0/BUILD.gn @@ -14,7 +14,7 @@ import("//build/ohos.gni") import("../../../../../aosp.gni") -ohos_prebuilt_shared_library( "common1.0") { +ohos_prebuilt_shared_library("common1.0") { source = "lib/libcommon1.0.z.so" install_enable = true install_images = [ chipset_base_dir ] diff --git a/uis7885/hardware/aosp/hardware/interfaces/graphics/common/1.0/lib/libcommon1.0.z.so b/uis7885/hardware/aosp/hardware/interfaces/graphics/common/1.0/lib/libcommon1.0.z.so index bf1f2a87eff03a355ca0494650aa8d09a33eac7b..602ef7461046fec84575fecebd802af5cfc745b4 100755 Binary files a/uis7885/hardware/aosp/hardware/interfaces/graphics/common/1.0/lib/libcommon1.0.z.so and b/uis7885/hardware/aosp/hardware/interfaces/graphics/common/1.0/lib/libcommon1.0.z.so differ diff --git a/uis7885/hardware/aosp/hardware/interfaces/graphics/common/1.1/lib/libcommon1.1.z.so b/uis7885/hardware/aosp/hardware/interfaces/graphics/common/1.1/lib/libcommon1.1.z.so index 1407a97d8762a6e052b353ad00481bd73cf6b7c8..e236b0ae85b379bd16cf4210088d11eb76579921 100755 Binary files a/uis7885/hardware/aosp/hardware/interfaces/graphics/common/1.1/lib/libcommon1.1.z.so and b/uis7885/hardware/aosp/hardware/interfaces/graphics/common/1.1/lib/libcommon1.1.z.so differ diff --git a/uis7885/hardware/aosp/hardware/interfaces/graphics/common/1.2/BUILD.gn b/uis7885/hardware/aosp/hardware/interfaces/graphics/common/1.2/BUILD.gn index 1eaa2b7453a1c6d3f0b52c6a329948a33203b63a..05651366883dbf85ad04e260ea55b0226562e808 100755 --- a/uis7885/hardware/aosp/hardware/interfaces/graphics/common/1.2/BUILD.gn +++ b/uis7885/hardware/aosp/hardware/interfaces/graphics/common/1.2/BUILD.gn @@ -21,3 +21,4 @@ ohos_prebuilt_shared_library( "common1.2") { part_name = "${PART_NAME}" subsystem_name = "${SUBSYSTEM_NAME}" } + diff --git a/uis7885/hardware/aosp/hardware/interfaces/graphics/common/1.2/lib/libcommon1.2.z.so b/uis7885/hardware/aosp/hardware/interfaces/graphics/common/1.2/lib/libcommon1.2.z.so index a57f15ad563744da359786b4cb12e7f5833481d4..1989c05d14f986f4cd2ab1d0f8bac69e8876390d 100755 Binary files a/uis7885/hardware/aosp/hardware/interfaces/graphics/common/1.2/lib/libcommon1.2.z.so and b/uis7885/hardware/aosp/hardware/interfaces/graphics/common/1.2/lib/libcommon1.2.z.so differ diff --git a/uis7885/hardware/aosp/hardware/interfaces/graphics/common/aidl/android/hardware/graphics/common/BUILD.gn b/uis7885/hardware/aosp/hardware/interfaces/graphics/common/aidl/android/hardware/graphics/common/BUILD.gn index 144e98e09065e03d9061204b0948c6835353bf8a..ed8b4bf567031143f3f88cf6993e8dddd298dde9 100755 --- a/uis7885/hardware/aosp/hardware/interfaces/graphics/common/aidl/android/hardware/graphics/common/BUILD.gn +++ b/uis7885/hardware/aosp/hardware/interfaces/graphics/common/aidl/android/hardware/graphics/common/BUILD.gn @@ -21,3 +21,4 @@ ohos_prebuilt_shared_library("common-V3-ndk") { subsystem_name = "${SUBSYSTEM_NAME}" part_name = "${PART_NAME}" } + diff --git a/uis7885/hardware/aosp/hardware/interfaces/graphics/common/aidl/android/hardware/graphics/common/lib/libcommon-V3-ndk.z.so b/uis7885/hardware/aosp/hardware/interfaces/graphics/common/aidl/android/hardware/graphics/common/lib/libcommon-V3-ndk.z.so index a81bab15baf27c66ecda86926676e4221befa8ab..0a3e25e0b82bff29f3239fe9237d57fa874164a3 100755 Binary files a/uis7885/hardware/aosp/hardware/interfaces/graphics/common/aidl/android/hardware/graphics/common/lib/libcommon-V3-ndk.z.so and b/uis7885/hardware/aosp/hardware/interfaces/graphics/common/aidl/android/hardware/graphics/common/lib/libcommon-V3-ndk.z.so differ diff --git a/uis7885/hardware/aosp/hardware/interfaces/graphics/mapper/2.0/BUILD.gn b/uis7885/hardware/aosp/hardware/interfaces/graphics/mapper/2.0/BUILD.gn index ecd844ad24e7c2774ac96643b0ec0e79b761dcdb..d7f8b0791c31d1a519e4662d7e62625b5744f014 100755 --- a/uis7885/hardware/aosp/hardware/interfaces/graphics/mapper/2.0/BUILD.gn +++ b/uis7885/hardware/aosp/hardware/interfaces/graphics/mapper/2.0/BUILD.gn @@ -14,7 +14,7 @@ import("//build/ohos.gni") import("../../../../../aosp.gni") -ohos_prebuilt_shared_library( "mapper2.0") { +ohos_prebuilt_shared_library("mapper2.0") { source = "lib/libmapper2.0.z.so" install_enable = true install_images = [ chipset_base_dir ] @@ -22,7 +22,7 @@ ohos_prebuilt_shared_library( "mapper2.0") { part_name = "${PART_NAME}" } -ohos_prebuilt_shared_library( "mapper_passthrough2.0") { +ohos_prebuilt_shared_library("mapper_passthrough2.0") { source = "lib/libmapper_passthrough2.0.z.so" relative_install_dir = "hw" @@ -34,3 +34,4 @@ ohos_prebuilt_shared_library( "mapper_passthrough2.0") { subsystem_name = "${SUBSYSTEM_NAME}" part_name = "${PART_NAME}" } + diff --git a/uis7885/hardware/aosp/hardware/interfaces/graphics/mapper/2.0/default/Android.bp b/uis7885/hardware/aosp/hardware/interfaces/graphics/mapper/2.0/default/Android.bp deleted file mode 100755 index fffea3b5f2e14673cf3f7ecf6d7468561d9a5ab3..0000000000000000000000000000000000000000 --- a/uis7885/hardware/aosp/hardware/interfaces/graphics/mapper/2.0/default/Android.bp +++ /dev/null @@ -1,45 +0,0 @@ -// -// Copyright (C) 2016 The Android Open Source Project -// -// 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 { - // See: http://go/android-license-faq - // A large-scale-change added 'default_applicable_licenses' to import - // all of the 'license_kinds' from "hardware_interfaces_license" - // to get the below license kinds: - // SPDX-license-identifier-Apache-2.0 - default_applicable_licenses: ["hardware_interfaces_license"], -} - -cc_library_shared { - name: "android.hardware.graphics.mapper@2.0-impl", - defaults: ["hidl_defaults"], - vendor: true, - relative_install_path: "hw", - srcs: ["passthrough.cpp"], - header_libs: [ - "android.hardware.graphics.mapper@2.0-passthrough" - ], - shared_libs: [ - "android.hardware.graphics.mapper@2.0", - "libbase", - "libcutils", - "libhardware", - "libhidlbase", - "liblog", - "libsync", - "libutils", - ], - cflags: ["-DLOG_TAG=\"MapperHal\""], -} diff --git a/uis7885/hardware/aosp/hardware/interfaces/graphics/mapper/2.0/lib/libmapper2.0.z.so b/uis7885/hardware/aosp/hardware/interfaces/graphics/mapper/2.0/lib/libmapper2.0.z.so index 8166cd8b5454fbcbc9224e76b79a09fae74d7b35..ad8efc7d06ecbb8f3239bb73e44fb24ec2833252 100755 Binary files a/uis7885/hardware/aosp/hardware/interfaces/graphics/mapper/2.0/lib/libmapper2.0.z.so and b/uis7885/hardware/aosp/hardware/interfaces/graphics/mapper/2.0/lib/libmapper2.0.z.so differ diff --git a/uis7885/hardware/aosp/hardware/interfaces/graphics/mapper/2.1/BUILD.gn b/uis7885/hardware/aosp/hardware/interfaces/graphics/mapper/2.1/BUILD.gn index f2ca086f1e2478289a33d001c57940ad0882cc81..ca78f6a3256d5e0637a66e63e3905a04879cc1d1 100755 --- a/uis7885/hardware/aosp/hardware/interfaces/graphics/mapper/2.1/BUILD.gn +++ b/uis7885/hardware/aosp/hardware/interfaces/graphics/mapper/2.1/BUILD.gn @@ -14,7 +14,7 @@ import("//build/ohos.gni") import("../../../../../aosp.gni") -ohos_prebuilt_shared_library( "mapper2.1") { +ohos_prebuilt_shared_library("mapper2.1") { source = "lib/libmapper2.1.z.so" install_enable = true install_images = [ chipset_base_dir ] @@ -22,7 +22,7 @@ ohos_prebuilt_shared_library( "mapper2.1") { part_name = "${PART_NAME}" } -ohos_prebuilt_shared_library( "mapper_passthrough2.1") { +ohos_prebuilt_shared_library("mapper_passthrough2.1") { source = "lib/libmapper_passthrough2.1.z.so" relative_install_dir = "hw" diff --git a/uis7885/hardware/aosp/hardware/interfaces/graphics/mapper/2.1/lib/libmapper2.1.z.so b/uis7885/hardware/aosp/hardware/interfaces/graphics/mapper/2.1/lib/libmapper2.1.z.so index 5dc73b6dbf1b0648f1b30061670008f040cfd77d..9ae9d96774728620ec3b21dd92b291822ffbbe60 100755 Binary files a/uis7885/hardware/aosp/hardware/interfaces/graphics/mapper/2.1/lib/libmapper2.1.z.so and b/uis7885/hardware/aosp/hardware/interfaces/graphics/mapper/2.1/lib/libmapper2.1.z.so differ diff --git a/uis7885/hardware/aosp/hardware/interfaces/graphics/mapper/3.0/BUILD.gn b/uis7885/hardware/aosp/hardware/interfaces/graphics/mapper/3.0/BUILD.gn index 671bf01eaa2cf3fa6749c7eaaab0cd1dada07908..46a6cad2a864d1e8439e1a0abab6e07a6db379c5 100755 --- a/uis7885/hardware/aosp/hardware/interfaces/graphics/mapper/3.0/BUILD.gn +++ b/uis7885/hardware/aosp/hardware/interfaces/graphics/mapper/3.0/BUILD.gn @@ -14,10 +14,11 @@ import("//build/ohos.gni") import("../../../../../aosp.gni") -ohos_prebuilt_shared_library( "mapper3.0") { +ohos_prebuilt_shared_library("mapper3.0") { source = "lib/libmapper3.0.z.so" install_enable = true install_images = [ chipset_base_dir ] subsystem_name = "${SUBSYSTEM_NAME}" part_name = "${PART_NAME}" } + diff --git a/uis7885/hardware/aosp/hardware/interfaces/graphics/mapper/3.0/lib/libmapper3.0.z.so b/uis7885/hardware/aosp/hardware/interfaces/graphics/mapper/3.0/lib/libmapper3.0.z.so index e5e8d5d61ea120c408786edc8a7e6b88584b6b1d..942afbc01d3d79d176927aca68fb49df9abe4dcb 100755 Binary files a/uis7885/hardware/aosp/hardware/interfaces/graphics/mapper/3.0/lib/libmapper3.0.z.so and b/uis7885/hardware/aosp/hardware/interfaces/graphics/mapper/3.0/lib/libmapper3.0.z.so differ diff --git a/uis7885/hardware/aosp/hardware/interfaces/graphics/mapper/4.0/BUILD.gn b/uis7885/hardware/aosp/hardware/interfaces/graphics/mapper/4.0/BUILD.gn index fbb5c90f23e33eff4c80b149d412dd3371dda840..5e91b44208d51376fd3c3ea9d3112911d1319706 100755 --- a/uis7885/hardware/aosp/hardware/interfaces/graphics/mapper/4.0/BUILD.gn +++ b/uis7885/hardware/aosp/hardware/interfaces/graphics/mapper/4.0/BUILD.gn @@ -14,10 +14,11 @@ import("//build/ohos.gni") import("../../../../../aosp.gni") -ohos_prebuilt_shared_library( "mapper4.0") { +ohos_prebuilt_shared_library("mapper4.0") { source = "lib/libmapper4.0.z.so" install_enable = true install_images = [ chipset_base_dir ] subsystem_name = "${SUBSYSTEM_NAME}" part_name = "${PART_NAME}" } + diff --git a/uis7885/hardware/aosp/hardware/interfaces/graphics/mapper/4.0/lib/libmapper4.0.z.so b/uis7885/hardware/aosp/hardware/interfaces/graphics/mapper/4.0/lib/libmapper4.0.z.so index 47914b27b8ee0a9d842fe8248196f42b042f132e..3d4a59ee3032fe2a4151a86370a6206ca88f4195 100755 Binary files a/uis7885/hardware/aosp/hardware/interfaces/graphics/mapper/4.0/lib/libmapper4.0.z.so and b/uis7885/hardware/aosp/hardware/interfaces/graphics/mapper/4.0/lib/libmapper4.0.z.so differ diff --git a/uis7885/hardware/aosp/hardware/libhardware/BUILD.gn b/uis7885/hardware/aosp/hardware/libhardware/BUILD.gn index d92fcc0ec184203d16fbf6326b96c4a7fda5d814..23eea721530f690b1ab8334d4e97ffe178b51db5 100755 --- a/uis7885/hardware/aosp/hardware/libhardware/BUILD.gn +++ b/uis7885/hardware/aosp/hardware/libhardware/BUILD.gn @@ -14,7 +14,7 @@ import("//build/ohos.gni") import("../../aosp.gni") -ohos_prebuilt_shared_library("hardware") { +ohos_prebuilt_shared_library( "hardware") { source = "lib/libhardware.z.so" install_enable = true install_images = [ chipset_base_dir ] diff --git a/uis7885/hardware/aosp/hardware/libhardware/lib/libhardware.z.so b/uis7885/hardware/aosp/hardware/libhardware/lib/libhardware.z.so index 2acde901d0b8f142278f87085605d06bac0862e8..1e529a4b9dd4e922277032f8e75cc4e1db48bb9d 100755 Binary files a/uis7885/hardware/aosp/hardware/libhardware/lib/libhardware.z.so and b/uis7885/hardware/aosp/hardware/libhardware/lib/libhardware.z.so differ diff --git a/uis7885/hardware/aosp/hardware/libhardware/modules/gralloc/BUILD.gn b/uis7885/hardware/aosp/hardware/libhardware/modules/gralloc/BUILD.gn index 36f2180f727b31105043a6f7aac7c6c667d09b7e..a1a2bfb48257dadd83734876a666a4cfce440374 100755 --- a/uis7885/hardware/aosp/hardware/libhardware/modules/gralloc/BUILD.gn +++ b/uis7885/hardware/aosp/hardware/libhardware/modules/gralloc/BUILD.gn @@ -14,7 +14,7 @@ import("//build/ohos.gni") import("../../../../aosp.gni") -ohos_prebuilt_shared_library( "gralloc.default") { +ohos_prebuilt_shared_library("gralloc.default") { source = "lib/libgralloc.default.z.so" relative_install_dir = "hw" symlink_target_name = [ "gralloc.default.so" ] diff --git a/uis7885/hardware/aosp/hardware/libhardware/modules/gralloc/gr.h b/uis7885/hardware/aosp/hardware/libhardware/modules/gralloc/gr.h deleted file mode 100755 index bb0777a4c0c7497933c86fed677e8ff0d39eff23..0000000000000000000000000000000000000000 --- a/uis7885/hardware/aosp/hardware/libhardware/modules/gralloc/gr.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (C) 2008 The Android Open Source Project - * - * 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. - */ - -#ifndef GR_H_ -#define GR_H_ - -#include -#include -#include -// #include -#include -#include -#include - -#include - -/*****************************************************************************/ -// zmy add -#define PAGE_SHIFT 12 -#define PAGE_SIZE (1UL << PAGE_SHIFT) - -struct private_module_t; -struct private_handle_t; - -inline size_t roundUpToPageSize(size_t x) { - return (x + (PAGE_SIZE-1)) & ~(PAGE_SIZE-1); -} - -int mapFrameBufferLocked(struct private_module_t* module, int format); -int terminateBuffer(gralloc_module_t const* module, private_handle_t* hnd); -int mapBuffer(gralloc_module_t const* module, private_handle_t* hnd); - -/*****************************************************************************/ - -class Locker { - pthread_mutex_t mutex; -public: - class Autolock { - Locker& locker; - public: - inline explicit Autolock(Locker& locker) : locker(locker) { locker.lock(); } - inline ~Autolock() { locker.unlock(); } - }; - inline Locker() { pthread_mutex_init(&mutex, 0); } - inline ~Locker() { pthread_mutex_destroy(&mutex); } - inline void lock() { pthread_mutex_lock(&mutex); } - inline void unlock() { pthread_mutex_unlock(&mutex); } -}; - -#endif /* GR_H_ */ diff --git a/uis7885/hardware/aosp/hardware/libhardware/modules/gralloc/gralloc_priv.h b/uis7885/hardware/aosp/hardware/libhardware/modules/gralloc/gralloc_priv.h deleted file mode 100755 index bf45ab7512fe357e5d221b24888184b3d475c2d3..0000000000000000000000000000000000000000 --- a/uis7885/hardware/aosp/hardware/libhardware/modules/gralloc/gralloc_priv.h +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (C) 2008 The Android Open Source Project - * - * 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. - */ - -#ifndef GRALLOC_PRIV_H_ -#define GRALLOC_PRIV_H_ - -#include -#include -// #include -#include -#include -#include -#include - -#include - -#include - -/*****************************************************************************/ - -struct private_module_t; -struct private_handle_t; - -struct private_module_t { - gralloc_module_t base; - - private_handle_t* framebuffer; - uint32_t flags; - uint32_t numBuffers; - uint32_t bufferMask; - pthread_mutex_t lock; - buffer_handle_t currentBuffer; - int pmem_master; - void* pmem_master_base; - - struct fb_var_screeninfo info; - struct fb_fix_screeninfo finfo; - float xdpi; - float ydpi; - float fps; -}; - -/*****************************************************************************/ - -#ifdef __cplusplus -struct private_handle_t : public native_handle { -#else -struct private_handle_t { - struct native_handle nativeHandle; -#endif - - enum { - PRIV_FLAGS_FRAMEBUFFER = 0x00000001 - }; - - // file-descriptors - int fd; - // ints - int magic; - int flags; - int size; - int offset; - - // FIXME: the attributes below should be out-of-line - uint64_t base __attribute__((aligned(8))); - int pid; - -#ifdef __cplusplus - static inline int sNumInts() { - return (((sizeof(private_handle_t) - sizeof(native_handle_t))/sizeof(int)) - sNumFds); - } - static const int sNumFds = 1; - static const int sMagic = 0x3141592; - - private_handle_t(int fd, int size, int flags) : - fd(fd), magic(sMagic), flags(flags), size(size), offset(0), - base(0), pid(getpid()) - { - version = sizeof(native_handle); - numInts = sNumInts(); - numFds = sNumFds; - } - ~private_handle_t() { - magic = 0; - } - - static int validate(const native_handle* h) { - const private_handle_t* hnd = (const private_handle_t*)h; - if (!h || h->version != sizeof(native_handle) || - h->numInts != sNumInts() || h->numFds != sNumFds || - hnd->magic != sMagic) - { - ALOGE("invalid gralloc handle (at %p)", h); - return -EINVAL; - } - return 0; - } -#endif -}; - -#endif /* GRALLOC_PRIV_H_ */ diff --git a/uis7885/hardware/aosp/hardware/libhardware/modules/gralloc/lib/libgralloc.default.z.so b/uis7885/hardware/aosp/hardware/libhardware/modules/gralloc/lib/libgralloc.default.z.so index 55dd2977d4b685155202bf195cca881518d32771..d191c0bd375e1b330407ad6079d2d3339d9287ec 100755 Binary files a/uis7885/hardware/aosp/hardware/libhardware/modules/gralloc/lib/libgralloc.default.z.so and b/uis7885/hardware/aosp/hardware/libhardware/modules/gralloc/lib/libgralloc.default.z.so differ diff --git a/uis7885/hardware/aosp/hardware/libhardware/vndksupport/linker.h b/uis7885/hardware/aosp/hardware/libhardware/vndksupport/linker.h deleted file mode 100755 index 5f48c39748515e4d5a5a78753101ecad3a1c4ad7..0000000000000000000000000000000000000000 --- a/uis7885/hardware/aosp/hardware/libhardware/vndksupport/linker.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (C) 2017 The Android Open Source Project - * - * 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. - */ -#ifndef VNDKSUPPORT_LINKER_H_ -#define VNDKSUPPORT_LINKER_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Returns whether the current process is a vendor process. - * - * Note that this is only checking what process is running and has nothing to - * do with what namespace the caller is loaded at. For example, a VNDK-SP - * library loaded by SP-HAL calling this function may still get a 'false', - * because it is running in a system process. - */ -int android_is_in_vendor_process(); - -void* android_load_sphal_library(const char* name, int flag); - -int android_unload_sphal_library(void* handle); - -#ifdef __cplusplus -} -#endif - -#endif // VNDKSUPPORT_LINKER_H_ diff --git a/uis7885/hardware/aosp/system/core/libcutils/BUILD.gn b/uis7885/hardware/aosp/system/core/libcutils/BUILD.gn index 1742d421b814f4ed129eba7ea7e79574854a43bd..e18cfcb993586125156cce805ebbf1559277a84f 100755 --- a/uis7885/hardware/aosp/system/core/libcutils/BUILD.gn +++ b/uis7885/hardware/aosp/system/core/libcutils/BUILD.gn @@ -14,7 +14,7 @@ import("//build/ohos.gni") import("../../../aosp.gni") -ohos_prebuilt_shared_library( "aosp_cutils") { +ohos_prebuilt_shared_library("aosp_cutils") { source = "lib/libaosp_cutils.z.so" install_enable = true install_images = [ chipset_base_dir ] diff --git a/uis7885/hardware/aosp/system/core/libcutils/lib/libaosp_cutils.z.so b/uis7885/hardware/aosp/system/core/libcutils/lib/libaosp_cutils.z.so index 2d8b28d42cedd8208a5e3f6d57df585f536aa331..e00f8281ac9ded361548d1d36ea1f98f1bb5a178 100755 Binary files a/uis7885/hardware/aosp/system/core/libcutils/lib/libaosp_cutils.z.so and b/uis7885/hardware/aosp/system/core/libcutils/lib/libaosp_cutils.z.so differ diff --git a/uis7885/hardware/aosp/system/core/libgrallocusage/BUILD.gn b/uis7885/hardware/aosp/system/core/libgrallocusage/BUILD.gn index 458b2910bb9482734e66b184e0e4ef7e3dba304a..bffaa0af665f592c78e7243b43723bd496ef7220 100755 --- a/uis7885/hardware/aosp/system/core/libgrallocusage/BUILD.gn +++ b/uis7885/hardware/aosp/system/core/libgrallocusage/BUILD.gn @@ -21,3 +21,4 @@ ohos_prebuilt_shared_library( "grallocusage") { subsystem_name = "${SUBSYSTEM_NAME}" part_name = "${PART_NAME}" } + diff --git a/uis7885/hardware/aosp/system/core/libgrallocusage/include/grallocusage/GrallocUsageConversion.h b/uis7885/hardware/aosp/system/core/libgrallocusage/include/grallocusage/GrallocUsageConversion.h deleted file mode 100755 index 5c94343c26478e1f5f5347ca65c1767b79ce0e9d..0000000000000000000000000000000000000000 --- a/uis7885/hardware/aosp/system/core/libgrallocusage/include/grallocusage/GrallocUsageConversion.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2017 The Android Open Source Project - * - * 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. - */ - -#ifndef ANDROID_GRALLOCUSAGE_GRALLOC_USAGE_CONVERSION_H -#define ANDROID_GRALLOCUSAGE_GRALLOC_USAGE_CONVERSION_H 1 - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -// Conversion functions are out-of-line so that users don't have to be exposed to -// android/hardware/graphics/allocator/2.0/types.h and link against -// android.hardware.graphics.allocator@2.0 to get that in their search path. - -// Convert a 32-bit gralloc0 usage mask to a producer/consumer pair of 64-bit usage masks as used -// by android.hardware.graphics.allocator@2.0 (and gralloc1). This conversion properly handles the -// mismatch between a.h.g.allocator@2.0's CPU_{READ,WRITE}_OFTEN and gralloc0's -// SW_{READ,WRITE}_OFTEN. -void android_convertGralloc0To1Usage(int32_t usage, uint64_t* producerUsage, - uint64_t* consumerUsage); - -// Convert a producer/consumer pair of 64-bit usage masks as used by -// android.hardware.graphics.allocator@2.0 (and gralloc1) to a 32-bit gralloc0 usage mask. This -// conversion properly handles the mismatch between a.h.g.allocator@2.0's CPU_{READ,WRITE}_OFTEN -// and gralloc0's SW_{READ,WRITE}_OFTEN. -int32_t android_convertGralloc1To0Usage(uint64_t producerUsage, uint64_t consumerUsage); - -#ifdef __cplusplus -} -#endif - -#endif // ANDROID_GRALLOCUSAGE_GRALLOC_USAGE_CONVERSION_H diff --git a/uis7885/hardware/aosp/system/core/libgrallocusage/lib/libgrallocusage.z.so b/uis7885/hardware/aosp/system/core/libgrallocusage/lib/libgrallocusage.z.so index a41705d12f54594f093eba9f52cb0ceb5e16ad3f..03bf8a29bdbd63147a70873751253a7eddad0394 100755 Binary files a/uis7885/hardware/aosp/system/core/libgrallocusage/lib/libgrallocusage.z.so and b/uis7885/hardware/aosp/system/core/libgrallocusage/lib/libgrallocusage.z.so differ diff --git a/uis7885/hardware/aosp/system/core/libsync/BUILD.gn b/uis7885/hardware/aosp/system/core/libsync/BUILD.gn index 622f48e342f8f8fc8c56945ce0c4f1c47bcab743..23ea716d3db71c2b4aa0286313654d4c3d7b8393 100755 --- a/uis7885/hardware/aosp/system/core/libsync/BUILD.gn +++ b/uis7885/hardware/aosp/system/core/libsync/BUILD.gn @@ -14,7 +14,7 @@ import("//build/ohos.gni") import("../../../aosp.gni") -ohos_prebuilt_shared_library( "sync") { +ohos_prebuilt_shared_library("sync") { source = "lib/libsync.z.so" install_enable = true install_images = [ chipset_base_dir ] diff --git a/uis7885/hardware/aosp/system/core/libsync/include/android/sync.h b/uis7885/hardware/aosp/system/core/libsync/include/android/sync.h deleted file mode 100755 index 774c3bb3acb82e88d42f2bdf0a4f02c7cb20c90a..0000000000000000000000000000000000000000 --- a/uis7885/hardware/aosp/system/core/libsync/include/android/sync.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * sync.h - * - * Copyright 2012 Google, Inc - * - * 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. - */ - -#ifndef __SYS_CORE_SYNC_H -#define __SYS_CORE_SYNC_H - -/* This file contains the legacy sync interface used by Android platform and - * device code. The direct contents will be removed over time as code - * transitions to using the updated interface in ndk/sync.h. When this file is - * empty other than the ndk/sync.h include, that file will be renamed to - * replace this one. - * - * New code should continue to include this file (#include ) - * instead of ndk/sync.h so the eventual rename is seamless, but should only - * use the things declared in ndk/sync.h. - * - * This file used to be called sync/sync.h, but we renamed to that both the - * platform and NDK call it android/sync.h. A symlink from the old name to this - * one exists temporarily to avoid having to change all sync clients - * simultaneously. It will be removed when they've been updated, and probably - * after this change has been delivered to AOSP so that integrations don't - * break builds. - */ - -#include "../ndk/sync.h" - -// __BEGIN_DECLS -#ifdef __cplusplus -extern "C" { -#endif - -/* timeout in msecs */ -int sync_wait(int fd, int timeout); - -// __END_DECLS - -#ifdef __cplusplus -} -#endif - -#endif /* __SYS_CORE_SYNC_H */ diff --git a/uis7885/hardware/aosp/system/core/libsync/include/ndk/sync.h b/uis7885/hardware/aosp/system/core/libsync/include/ndk/sync.h deleted file mode 100755 index 12c51e1e1d7d84263415107f82a3bd8d69688af1..0000000000000000000000000000000000000000 --- a/uis7885/hardware/aosp/system/core/libsync/include/ndk/sync.h +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright 2017 The Android Open Source Project - * - * 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. - */ - -/** - * @addtogroup Sync - * @{ - */ - -/** - * @file sync.h - */ - -#ifndef ANDROID_SYNC_H -#define ANDROID_SYNC_H - -#include -// #include - -#include - -// __BEGIN_DECLS -#ifdef __cplusplus -extern "C" { -#endif - -/* Fences indicate the status of an asynchronous task. They are initially - * in unsignaled state (0), and make a one-time transition to either signaled - * (1) or error (< 0) state. A sync file is a collection of one or more fences; - * the sync file's status is error if any of its fences are in error state, - * signaled if all of the child fences are signaled, or unsignaled otherwise. - * - * Sync files are created by various device APIs in response to submitting - * tasks to the device. Standard file descriptor lifetime syscalls like dup() - * and close() are used to manage sync file lifetime. - * - * The poll(), ppoll(), or select() syscalls can be used to wait for the sync - * file to change status, or (with a timeout of zero) to check its status. - * - * The functions below provide a few additional sync-specific operations. - */ - -/** - * Merge two sync files. - * - * This produces a new sync file with the given name which has the union of the - * two original sync file's fences; redundant fences may be removed. - * - * If one of the input sync files is signaled or invalid, then this function - * may behave like dup(): the new file descriptor refers to the valid/unsignaled - * sync file with its original name, rather than a new sync file. - * - * The original fences remain valid, and the caller is responsible for closing - * them. - * - * Available since API level 26. - */ -int32_t sync_merge(const char* name, int32_t fd1, int32_t fd2); - -/** - * Retrieve detailed information about a sync file and its fences. - * - * The returned sync_file_info must be freed by calling sync_file_info_free(). - * - * Available since API level 26. - */ -struct sync_file_info* sync_file_info(int32_t fd); - -/** - * Get the array of fence infos from the sync file's info. - * - * The returned array is owned by the parent sync file info, and has - * info->num_fences entries. - * - * Available since API level 26. - */ -static inline struct sync_fence_info* sync_get_fence_info(const struct sync_file_info* info) { -// This header should compile in C, but some C++ projects enable -// warnings-as-error for C-style casts. -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wold-style-cast" - return (struct sync_fence_info *)(uintptr_t)(info->sync_fence_info); -#pragma GCC diagnostic pop -} - -/** - * Free a struct sync_file_info structure - * - * Available since API level 26. - */ -void sync_file_info_free(struct sync_file_info* info); - -// __END_DECLS -#ifdef __cplusplus -} -#endif - -#endif /* ANDROID_SYNC_H */ - -/** @} */ diff --git a/uis7885/hardware/aosp/system/core/libsync/include/sync/sync.h b/uis7885/hardware/aosp/system/core/libsync/include/sync/sync.h deleted file mode 100755 index 774c3bb3acb82e88d42f2bdf0a4f02c7cb20c90a..0000000000000000000000000000000000000000 --- a/uis7885/hardware/aosp/system/core/libsync/include/sync/sync.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * sync.h - * - * Copyright 2012 Google, Inc - * - * 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. - */ - -#ifndef __SYS_CORE_SYNC_H -#define __SYS_CORE_SYNC_H - -/* This file contains the legacy sync interface used by Android platform and - * device code. The direct contents will be removed over time as code - * transitions to using the updated interface in ndk/sync.h. When this file is - * empty other than the ndk/sync.h include, that file will be renamed to - * replace this one. - * - * New code should continue to include this file (#include ) - * instead of ndk/sync.h so the eventual rename is seamless, but should only - * use the things declared in ndk/sync.h. - * - * This file used to be called sync/sync.h, but we renamed to that both the - * platform and NDK call it android/sync.h. A symlink from the old name to this - * one exists temporarily to avoid having to change all sync clients - * simultaneously. It will be removed when they've been updated, and probably - * after this change has been delivered to AOSP so that integrations don't - * break builds. - */ - -#include "../ndk/sync.h" - -// __BEGIN_DECLS -#ifdef __cplusplus -extern "C" { -#endif - -/* timeout in msecs */ -int sync_wait(int fd, int timeout); - -// __END_DECLS - -#ifdef __cplusplus -} -#endif - -#endif /* __SYS_CORE_SYNC_H */ diff --git a/uis7885/hardware/aosp/system/core/libsync/lib/libsync.z.so b/uis7885/hardware/aosp/system/core/libsync/lib/libsync.z.so index a5fd406ab85fc53fc38754bcd024b20932461246..c25fd3d7487bf22d4ace509fa24b1eadffc23f45 100755 Binary files a/uis7885/hardware/aosp/system/core/libsync/lib/libsync.z.so and b/uis7885/hardware/aosp/system/core/libsync/lib/libsync.z.so differ diff --git a/uis7885/hardware/aosp/system/core/libutils/BUILD.gn b/uis7885/hardware/aosp/system/core/libutils/BUILD.gn index e049eea6410ae463f0dd49582fe1f0911e96d938..9e5d148f4126833f661d8c502383ca00a8b447d2 100755 --- a/uis7885/hardware/aosp/system/core/libutils/BUILD.gn +++ b/uis7885/hardware/aosp/system/core/libutils/BUILD.gn @@ -14,10 +14,11 @@ import("//build/ohos.gni") import("../../../aosp.gni") -ohos_prebuilt_shared_library( "aosp_utils") { +ohos_prebuilt_shared_library("aosp_utils") { source = "lib/libaosp_utils.z.so" install_enable = true install_images = [ chipset_base_dir ] subsystem_name = "${SUBSYSTEM_NAME}" part_name = "${PART_NAME}" } + diff --git a/uis7885/hardware/aosp/system/core/libutils/FuzzFormatTypes.h b/uis7885/hardware/aosp/system/core/libutils/FuzzFormatTypes.h deleted file mode 100755 index aa9e503ff6b9657d77c048d1eb49c94fdfb21297..0000000000000000000000000000000000000000 --- a/uis7885/hardware/aosp/system/core/libutils/FuzzFormatTypes.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2020 The Android Open Source Project - * - * 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. - */ - -#pragma once -#include - -static const std::string kFormatChars = std::string("duoxXfFeEgGaAcsp"); -static constexpr int32_t kMaxFormatFlagValue = INT16_MAX; -enum FormatChar : uint8_t { - SIGNED_DECIMAL = 0, - UNSIGNED_DECIMAL = 1, - UNSIGNED_OCTAL = 2, - UNSIGNED_HEX_LOWER = 3, - UNSIGNED_HEX_UPPER = 4, - // Uppercase/lowercase floating point impacts 'inf', 'infinity', and 'nan' - FLOAT_LOWER = 5, - FLOAT_UPPER = 6, - // Upper/lower impacts the "e" in exponents. - EXPONENT_LOWER = 7, - EXPONENT_UPPER = 8, - // %g will use %e or %f, whichever is shortest - SHORT_EXP_LOWER = 9, - // %G will use %E or %F, whichever is shortest - SHORT_EXP_UPPER = 10, - HEX_FLOAT_LOWER = 11, - HEX_FLOAT_UPPER = 12, - CHAR = 13, - STRING = 14, - POINTER = 15, - // Used by libfuzzer - kMaxValue = POINTER -}; - -bool canApplyFlag(FormatChar formatChar, char modifier) { - if (modifier == '#') { - return formatChar == UNSIGNED_OCTAL || formatChar == UNSIGNED_HEX_LOWER || - formatChar == UNSIGNED_HEX_UPPER || formatChar == FLOAT_LOWER || - formatChar == FLOAT_UPPER || formatChar == SHORT_EXP_LOWER || - formatChar == SHORT_EXP_UPPER; - } else if (modifier == '.') { - return formatChar == SIGNED_DECIMAL || formatChar == UNSIGNED_DECIMAL || - formatChar == UNSIGNED_OCTAL || formatChar == UNSIGNED_HEX_LOWER || - formatChar == UNSIGNED_HEX_UPPER || formatChar == FLOAT_LOWER || - formatChar == FLOAT_UPPER || formatChar == SHORT_EXP_LOWER || - formatChar == SHORT_EXP_UPPER || formatChar == STRING; - } - return true; -} diff --git a/uis7885/hardware/aosp/system/core/libutils/Looper_test_pipe.h b/uis7885/hardware/aosp/system/core/libutils/Looper_test_pipe.h deleted file mode 100755 index 77b7b8b368450a9a800b0ead5bd2ef988bf09276..0000000000000000000000000000000000000000 --- a/uis7885/hardware/aosp/system/core/libutils/Looper_test_pipe.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2020 The Android Open Source Project - * - * 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. - */ - -#pragma once -#include -/** - * A pipe class for use when testing or fuzzing Looper - */ -class Pipe { - public: - int sendFd; - int receiveFd; - - Pipe() { - int fds[2]; - ::pipe(fds); - - receiveFd = fds[0]; - sendFd = fds[1]; - } - - ~Pipe() { - if (sendFd != -1) { - ::close(sendFd); - } - - if (receiveFd != -1) { - ::close(receiveFd); - } - } - - android::status_t writeSignal() { - ssize_t nWritten = ::write(sendFd, "*", 1); - return nWritten == 1 ? 0 : -errno; - } - - android::status_t readSignal() { - char buf[1]; - ssize_t nRead = ::read(receiveFd, buf, 1); - return nRead == 1 ? 0 : nRead == 0 ? -EPIPE : -errno; - } -}; diff --git a/uis7885/hardware/aosp/system/core/libutils/SharedBuffer.h b/uis7885/hardware/aosp/system/core/libutils/SharedBuffer.h deleted file mode 100755 index 80d43a4fcd6dec5ae1402efa754c4b7147dcd9da..0000000000000000000000000000000000000000 --- a/uis7885/hardware/aosp/system/core/libutils/SharedBuffer.h +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Copyright (C) 2005 The Android Open Source Project - * - * 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. - */ - -/* - * DEPRECATED. DO NOT USE FOR NEW CODE. - */ - -#ifndef ANDROID_SHARED_BUFFER_H -#define ANDROID_SHARED_BUFFER_H - -#include -#include -#include - -// --------------------------------------------------------------------------- - -namespace OHOS { -namespace android { - -class SharedBuffer -{ -public: - - /* flags to use with release() */ - enum { - eKeepStorage = 0x00000001 - }; - - /*! allocate a buffer of size 'size' and acquire() it. - * call release() to free it. - */ - static SharedBuffer* alloc(size_t size); - - /*! free the memory associated with the SharedBuffer. - * Fails if there are any users associated with this SharedBuffer. - * In other words, the buffer must have been release by all its - * users. - */ - static void dealloc(const SharedBuffer* released); - - //! access the data for read - inline const void* data() const; - - //! access the data for read/write - inline void* data(); - - //! get size of the buffer - inline size_t size() const; - - //! get back a SharedBuffer object from its data - static inline SharedBuffer* bufferFromData(void* data); - - //! get back a SharedBuffer object from its data - static inline const SharedBuffer* bufferFromData(const void* data); - - //! get the size of a SharedBuffer object from its data - static inline size_t sizeFromData(const void* data); - - //! edit the buffer (get a writtable, or non-const, version of it) - SharedBuffer* edit() const; - - //! edit the buffer, resizing if needed - SharedBuffer* editResize(size_t size) const; - - //! like edit() but fails if a copy is required - SharedBuffer* attemptEdit() const; - - //! resize and edit the buffer, loose it's content. - SharedBuffer* reset(size_t size) const; - - //! acquire/release a reference on this buffer - void acquire() const; - - /*! release a reference on this buffer, with the option of not - * freeing the memory associated with it if it was the last reference - * returns the previous reference count - */ - int32_t release(uint32_t flags = 0) const; - - //! returns wether or not we're the only owner - inline bool onlyOwner() const; - - -private: - inline SharedBuffer() { } - inline ~SharedBuffer() { } - SharedBuffer(const SharedBuffer&); - SharedBuffer& operator = (const SharedBuffer&); - - // Must be sized to preserve correct alignment. - mutable std::atomic mRefs; - size_t mSize; - uint32_t mReserved; -public: - // mClientMetadata is reserved for client use. It is initialized to 0 - // and the clients can do whatever they want with it. Note that this is - // placed last so that it is adjcent to the buffer allocated. - uint32_t mClientMetadata; -}; - -static_assert(sizeof(SharedBuffer) % 8 == 0 - && (sizeof(size_t) > 4 || sizeof(SharedBuffer) == 16), - "SharedBuffer has unexpected size"); - -// --------------------------------------------------------------------------- - -const void* SharedBuffer::data() const { - return this + 1; -} - -void* SharedBuffer::data() { - return this + 1; -} - -size_t SharedBuffer::size() const { - return mSize; -} - -SharedBuffer* SharedBuffer::bufferFromData(void* data) { - return data ? static_cast(data)-1 : nullptr; -} - -const SharedBuffer* SharedBuffer::bufferFromData(const void* data) { - return data ? static_cast(data)-1 : nullptr; -} - -size_t SharedBuffer::sizeFromData(const void* data) { - return data ? bufferFromData(data)->mSize : 0; -} - -bool SharedBuffer::onlyOwner() const { - return (mRefs.load(std::memory_order_acquire) == 1); -} - -} // namespace android -} // namespace OHOS - -// --------------------------------------------------------------------------- - -#endif // ANDROID_VECTOR_H diff --git a/uis7885/hardware/aosp/system/core/libutils/Singleton_test.h b/uis7885/hardware/aosp/system/core/libutils/Singleton_test.h deleted file mode 100755 index c77d9ffe669a98c69f46c7642eb64770e42e1562..0000000000000000000000000000000000000000 --- a/uis7885/hardware/aosp/system/core/libutils/Singleton_test.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (C) 2017 The Android Open Source Project - * - * 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. - */ - -#ifndef ANDROID_UTILS_SINGLETON_TEST_H -#define ANDROID_UTILS_SINGLETON_TEST_H - -#include - -#include "Singleton_test.h" - -namespace android { - -struct SingletonTestData : Singleton { - unsigned int contents; -}; - -__BEGIN_DECLS - -unsigned int singletonGetInstanceContents(); -void singletonSetInstanceContents(unsigned int); -bool singletonHasInstance(); - -__END_DECLS - -} - -#endif // ANDROID_UTILS_SINGLETON_TEST_H - diff --git a/uis7885/hardware/aosp/system/core/libutils/lib/libaosp_utils.z.so b/uis7885/hardware/aosp/system/core/libutils/lib/libaosp_utils.z.so index 5640449ddca8cdafa225ba3fdd13431f736b678e..f27602bb05982bddb52a5848e0fafb782b6a50be 100755 Binary files a/uis7885/hardware/aosp/system/core/libutils/lib/libaosp_utils.z.so and b/uis7885/hardware/aosp/system/core/libutils/lib/libaosp_utils.z.so differ diff --git a/uis7885/hardware/aosp/system/libbase/lib/libaosp_base.z.so b/uis7885/hardware/aosp/system/libbase/lib/libaosp_base.z.so index ac890ac6dcf1a9fd3d22a3975e07094b65d14d1c..480accf4d82ac3c4ee0a862031aa5b52ac082281 100755 Binary files a/uis7885/hardware/aosp/system/libbase/lib/libaosp_base.z.so and b/uis7885/hardware/aosp/system/libbase/lib/libaosp_base.z.so differ diff --git a/uis7885/hardware/aosp/system/libfmq/base/fmq/MQDescriptorBase.h b/uis7885/hardware/aosp/system/libfmq/base/fmq/MQDescriptorBase.h deleted file mode 100755 index 3a45f0a2f280b4118c63f6edaedfcc110b313d86..0000000000000000000000000000000000000000 --- a/uis7885/hardware/aosp/system/libfmq/base/fmq/MQDescriptorBase.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (C) 2020 The Android Open Source Project - * - * 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. - */ - -#pragma once - -#include -#include -namespace OHOS { -namespace android { -namespace hardware { - -enum MQFlavor : uint32_t { - /* - * kSynchronizedReadWrite represents the wait-free synchronized flavor of the - * FMQ. It is intended to be have a single reader and single writer. - * Attempts to overflow/underflow returns a failure. - */ - kSynchronizedReadWrite = 0x01, - /* - * kUnsynchronizedWrite represents the flavor of FMQ where writes always - * succeed. This flavor allows one writer and many readers. A read operation - * can detect an overwrite and reset the read counter. - */ - kUnsynchronizedWrite = 0x02 -}; - -struct GrantorDescriptor { - uint32_t flags __attribute__((aligned(4))); - uint32_t fdIndex __attribute__((aligned(4))); - uint32_t offset __attribute__((aligned(4))); - uint64_t extent __attribute__((aligned(8))); -}; - -static_assert(offsetof(GrantorDescriptor, flags) == 0, "wrong offset"); -static_assert(offsetof(GrantorDescriptor, fdIndex) == 4, "wrong offset"); -static_assert(offsetof(GrantorDescriptor, offset) == 8, "wrong offset"); -static_assert(offsetof(GrantorDescriptor, extent) == 16, "wrong offset"); -static_assert(sizeof(GrantorDescriptor) == 24, "wrong size"); -static_assert(__alignof(GrantorDescriptor) == 8, "wrong alignment"); - -namespace details { - -void logError(const std::string& message); -void errorWriteLog(int tag, const char* message); -void check(bool exp, const char* message); - -typedef uint64_t RingBufferPosition; -enum GrantorType : int { READPTRPOS = 0, WRITEPTRPOS, DATAPTRPOS, EVFLAGWORDPOS }; -/* - * There should at least be GrantorDescriptors for the read counter, write - * counter and data buffer. A GrantorDescriptor for an EventFlag word is - * not required if there is no need for blocking FMQ operations. - */ -static constexpr int32_t kMinGrantorCount = DATAPTRPOS + 1; - -/* - * Minimum number of GrantorDescriptors required if EventFlag support is - * needed for blocking FMQ operations. - */ -static constexpr int32_t kMinGrantorCountForEvFlagSupport = EVFLAGWORDPOS + 1; - -static inline size_t alignToWordBoundary(size_t length) { - constexpr size_t kAlignmentSize = 64; - static_assert(kAlignmentSize % sizeof(long) == 0, "Incompatible word size"); - - /* - * Check if alignment to word boundary would cause an overflow. - */ - check(length <= SIZE_MAX - kAlignmentSize / 8 + 1, "Queue size too large"); - - return (length + kAlignmentSize / 8 - 1) & ~(kAlignmentSize / 8 - 1U); -} - -static inline size_t isAlignedToWordBoundary(size_t offset) { - constexpr size_t kAlignmentSize = 64; - return (offset & (kAlignmentSize / 8 - 1)) == 0; -} - -} // namespace details -} // namespace hardware -} // namespace android -} // namespace OHOS diff --git a/uis7885/hardware/aosp/system/libfmq/tests/aidl/default/TestAidlMsgQ.h b/uis7885/hardware/aosp/system/libfmq/tests/aidl/default/TestAidlMsgQ.h deleted file mode 100755 index 6e7c859783b93ae35fc3bcc58632c4b88547aafd..0000000000000000000000000000000000000000 --- a/uis7885/hardware/aosp/system/libfmq/tests/aidl/default/TestAidlMsgQ.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (C) 2020 The Android Open Source Project - * - * 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. - */ - -#pragma once - -#include -#include -#include -#include - -namespace aidl { -namespace android { -namespace fmq { -namespace test { - -using ::aidl::android::fmq::test::EventFlagBits; -using ::aidl::android::fmq::test::ITestAidlMsgQ; - -using ::aidl::android::hardware::common::fmq::MQDescriptor; -using ::aidl::android::hardware::common::fmq::SynchronizedReadWrite; -using ::aidl::android::hardware::common::fmq::UnsynchronizedWrite; -using ::android::hardware::kSynchronizedReadWrite; -using ::android::hardware::kUnsynchronizedWrite; -using ::android::hardware::MQFlavor; - -using ::android::AidlMessageQueue; - -struct TestAidlMsgQ : public BnTestAidlMsgQ { - typedef AidlMessageQueue MessageQueueSync; - typedef AidlMessageQueue MessageQueueUnsync; - - TestAidlMsgQ() : mFmqSynchronized(nullptr), mFmqUnsynchronized(nullptr) {} - - // Methods from ::aidl::android::fmq::test::ITestAidlMsgQ follow. - ndk::ScopedAStatus configureFmqSyncReadWrite( - const MQDescriptor& mqDesc, - bool* _aidl_return) override; - ndk::ScopedAStatus getFmqUnsyncWrite(bool configureFmq, bool userFd, - MQDescriptor* mqDesc, - bool* _aidl_return) override; - ndk::ScopedAStatus requestBlockingRead(int32_t count) override; - ndk::ScopedAStatus requestBlockingReadDefaultEventFlagBits(int32_t count) override; - ndk::ScopedAStatus requestBlockingReadRepeat(int32_t count, int32_t numIter) override; - ndk::ScopedAStatus requestReadFmqSync(int32_t count, bool* _aidl_return) override; - ndk::ScopedAStatus requestReadFmqUnsync(int32_t count, bool* _aidl_return) override; - ndk::ScopedAStatus requestWriteFmqSync(int32_t count, bool* _aidl_return) override; - ndk::ScopedAStatus requestWriteFmqUnsync(int32_t count, bool* _aidl_return) override; - - private: - std::unique_ptr mFmqSynchronized; - std::unique_ptr mFmqUnsynchronized; - - /* - * Utility function to verify data read from the fast message queue. - */ - bool verifyData(int32_t* data, int count) { - for (int i = 0; i < count; i++) { - if (data[i] != i) return false; - } - return true; - } -}; - -} // namespace test -} // namespace fmq -} // namespace android -} // namespace aidl diff --git a/uis7885/hardware/aosp/system/libhidl/BUILD.gn b/uis7885/hardware/aosp/system/libhidl/BUILD.gn index cd770e7a6730514db6ed5cd18aa2ff4384ed264a..6a8b616272e19f75ad8111928f5302133e19aa6e 100755 --- a/uis7885/hardware/aosp/system/libhidl/BUILD.gn +++ b/uis7885/hardware/aosp/system/libhidl/BUILD.gn @@ -14,7 +14,7 @@ import("//build/ohos.gni") import("../../aosp.gni") -ohos_prebuilt_shared_library( "hidlbase") { +ohos_prebuilt_shared_library("hidlbase") { source = "lib/libhidlbase.z.so" install_enable = true install_images = [ chipset_base_dir ] diff --git a/uis7885/hardware/aosp/system/libhidl/lib/libhidlbase.z.so b/uis7885/hardware/aosp/system/libhidl/lib/libhidlbase.z.so index 390a277eba9ac732992e8045885fa4efbea0a57d..38f1d34a242f32a5c7ffeabe55866c4345cb3804 100755 Binary files a/uis7885/hardware/aosp/system/libhidl/lib/libhidlbase.z.so and b/uis7885/hardware/aosp/system/libhidl/lib/libhidlbase.z.so differ diff --git a/uis7885/hardware/aosp/system/libhidl/libhidlmemory/include/hidlmemory/HidlMemoryToken.h b/uis7885/hardware/aosp/system/libhidl/libhidlmemory/include/hidlmemory/HidlMemoryToken.h deleted file mode 100755 index 4020377c3d14b03b50dbc27290f7b9f23486eaba..0000000000000000000000000000000000000000 --- a/uis7885/hardware/aosp/system/libhidl/libhidlmemory/include/hidlmemory/HidlMemoryToken.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2017 The Android Open Source Project - * - * 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. - */ -#ifndef ANDROID_HARDWARE_HIDLMEMORYTOKEN_H -#define ANDROID_HARDWARE_HIDLMEMORYTOKEN_H - -#include - -namespace android { -namespace hardware { - -class HidlMemoryToken : public virtual ::android::hidl::memory::token::V1_0::IMemoryToken { - public: - Return get(get_cb _hidl_cb) override; - - HidlMemoryToken(sp memory); - - protected: - sp mMemory; -}; - -} // namespace hardware -} // namespace android -#endif diff --git a/uis7885/hardware/aosp/system/libhidl/libhidlmemory/include/hidlmemory/mapping.h b/uis7885/hardware/aosp/system/libhidl/libhidlmemory/include/hidlmemory/mapping.h deleted file mode 100755 index 352cbaf6cbc526d5ab6e839246421379a3f0842e..0000000000000000000000000000000000000000 --- a/uis7885/hardware/aosp/system/libhidl/libhidlmemory/include/hidlmemory/mapping.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2016 The Android Open Source Project - * - * 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. - */ -#ifndef ANDROID_HARDWARE_MAPPING_H -#define ANDROID_HARDWARE_MAPPING_H -#include -#include - -namespace android { -namespace hardware { - -/** - * Returns the IMemory instance corresponding to a hidl_memory object. - * If the shared memory cannot be fetched, this returns nullptr. - * - * Note, this method call is relatively expensive and does not cache conversions. - * It should only be done when initializing a buffer and not on every buffer read. - */ -sp mapMemory(const hidl_memory &memory); - -} // namespace hardware -} // namespace android -#endif diff --git a/uis7885/hardware/aosp/system/libhidl/minijail/include/hwminijail/HardwareMinijail.h b/uis7885/hardware/aosp/system/libhidl/minijail/include/hwminijail/HardwareMinijail.h deleted file mode 100755 index 8fcf007bfbf18001e00e1d93bbde605a3d63b5b5..0000000000000000000000000000000000000000 --- a/uis7885/hardware/aosp/system/libhidl/minijail/include/hwminijail/HardwareMinijail.h +++ /dev/null @@ -1,30 +0,0 @@ -// -// Copyright (C) 2017 The Android Open Source Project -// -// 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. -// - -#ifndef ANDROID_HARDWARE_CONFIGSTORE_MINIJAIL_H -#define ANDROID_HARDWARE_CONFIGSTORE_MINIJAIL_H - -#include - -namespace android { -namespace hardware { - -void SetupMinijail(const std::string& seccomp_policy_path); - -} // namespace hardware -} // namespace android - -#endif // ANDROID_HARDWARE_CONFIGSTORE_UTILS_H diff --git a/uis7885/hardware/aosp/system/libhidl/transport/InternalStatic.h b/uis7885/hardware/aosp/system/libhidl/transport/InternalStatic.h deleted file mode 100755 index 859233a605bf5e60239829bd9e22cb1de83a4fc3..0000000000000000000000000000000000000000 --- a/uis7885/hardware/aosp/system/libhidl/transport/InternalStatic.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (C) 2018 The Android Open Source Project - * - * 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. - */ - -// This file is for legacy static variables that we are trying to get rid of. -// TODO(b/69122224): remove this file - -#ifndef ANDROID_HARDWARE_HIDL_INTERNAL_STATIC_H -#define ANDROID_HARDWARE_HIDL_INTERNAL_STATIC_H - -#include // for SchedPrio -#include - -namespace OHOS { -namespace android { -namespace hardware { -namespace details { - -// TODO(b/69122224): remove this once no prebuilts reference it -extern DoNotDestruct, SchedPrio>> - gServicePrioMap; -// TODO(b/69122224): remove this once no prebuilts reference it -extern DoNotDestruct, bool>> gServiceSidMap; - -} // namespace details -} // namespace hardware -} // namespace android -} // namespace OHOS - -#endif diff --git a/uis7885/hardware/aosp/system/libhidl/transport/allocator/1.0/default/AshmemAllocator.h b/uis7885/hardware/aosp/system/libhidl/transport/allocator/1.0/default/AshmemAllocator.h deleted file mode 100755 index 131417d574ed376ec6beac6c8fb91c08d5f5ab74..0000000000000000000000000000000000000000 --- a/uis7885/hardware/aosp/system/libhidl/transport/allocator/1.0/default/AshmemAllocator.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (C) 2016 The Android Open Source Project - * - * 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. - */ - -#ifndef ANDROID_HIDL_ASHMEM_ALLOCATOR_V1_0_ALLOCATOR_H -#define ANDROID_HIDL_ASHMEM_ALLOCATOR_V1_0_ALLOCATOR_H - -#include -#include -#include - -namespace android { -namespace hidl { -namespace allocator { -namespace V1_0 { -namespace implementation { - -using ::android::hidl::allocator::V1_0::IAllocator; -using ::android::hardware::hidl_array; -using ::android::hardware::hidl_memory; -using ::android::hardware::hidl_string; -using ::android::hardware::hidl_vec; -using ::android::hardware::Return; -using ::android::hardware::Void; -using ::android::sp; - -struct AshmemAllocator : public IAllocator { - // Methods from ::android::hidl::allocator::V1_0::IAllocator follow. - Return allocate(uint64_t size, allocate_cb _hidl_cb) override; - Return batchAllocate(uint64_t size, uint64_t count, batchAllocate_cb _hidl_cb) override; -}; - -} // namespace implementation -} // namespace V1_0 -} // namespace allocator -} // namespace hidl -} // namespace android - -#endif // ANDROID_HIDL_ASHMEM_ALLOCATOR_V1_0_ALLOCATOR_H diff --git a/uis7885/hardware/aosp/system/libhidl/transport/allocator/1.0/utils/include/hidlmemory/FrameworkUtils.h b/uis7885/hardware/aosp/system/libhidl/transport/allocator/1.0/utils/include/hidlmemory/FrameworkUtils.h deleted file mode 100755 index 0a62575aa985b2a274816bab3db1f7547f156c08..0000000000000000000000000000000000000000 --- a/uis7885/hardware/aosp/system/libhidl/transport/allocator/1.0/utils/include/hidlmemory/FrameworkUtils.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2017 The Android Open Source Project - * - * 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. - */ - -#include -#include - -namespace android { - -namespace hardware { - -/** - * Returns a new IMemory instance corresponding to a framework IMemoryHeap object. - * This encapsulates the idea that IMemoryHeap and the ashmem instance of hidl - * IMemory are backed by the same object. - * - * Return is never nullptr. May be an invalid hidl_memory object. - */ -sp fromHeap(const sp& heap); - -} // namespace hardware -} // namespace android diff --git a/uis7885/hardware/aosp/system/libhidl/transport/memory/1.0/default/AshmemMapper.h b/uis7885/hardware/aosp/system/libhidl/transport/memory/1.0/default/AshmemMapper.h deleted file mode 100755 index 3d3a7e127a2d4f09088c1860520b7ae46bc91402..0000000000000000000000000000000000000000 --- a/uis7885/hardware/aosp/system/libhidl/transport/memory/1.0/default/AshmemMapper.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) 2016 The Android Open Source Project - * - * 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. - */ - -#ifndef ANDROID_HIDL_ASHMEM_MEMORY_V1_0_MAPPER_H -#define ANDROID_HIDL_ASHMEM_MEMORY_V1_0_MAPPER_H - -#include -#include -#include - -namespace android { -namespace hidl { -namespace memory { -namespace V1_0 { -namespace implementation { - -using ::android::hidl::memory::V1_0::IMapper; -using ::android::hidl::memory::V1_0::IMemory; -using ::android::hardware::hidl_array; -using ::android::hardware::hidl_memory; -using ::android::hardware::hidl_string; -using ::android::hardware::hidl_vec; -using ::android::hardware::Return; -using ::android::hardware::Void; -using ::android::sp; - -struct AshmemMapper : public IMapper { - // Methods from ::android::hidl::memory::V1_0::IMapper follow. - Return> mapMemory(const hidl_memory& mem) override; - -}; - -} // namespace implementation -} // namespace V1_0 -} // namespace memory -} // namespace hidl -} // namespace android - -#endif // ANDROID_HIDL_ASHMEM_MEMORY_V1_0_MAPPER_H diff --git a/uis7885/hardware/aosp/system/libhidl/transport/memory/1.0/default/AshmemMemory.h b/uis7885/hardware/aosp/system/libhidl/transport/memory/1.0/default/AshmemMemory.h deleted file mode 100755 index cf2d543293266f779563dfdd795876f018756359..0000000000000000000000000000000000000000 --- a/uis7885/hardware/aosp/system/libhidl/transport/memory/1.0/default/AshmemMemory.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (C) 2016 The Android Open Source Project - * - * 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. - */ - -#ifndef ANDROID_HIDL_ASHMEM_MEMORY_V1_0_MEMORY_H -#define ANDROID_HIDL_ASHMEM_MEMORY_V1_0_MEMORY_H - -#include -#include -#include - -namespace android { -namespace hidl { -namespace memory { -namespace V1_0 { -namespace implementation { - -using ::android::hidl::memory::V1_0::IMemory; -using ::android::hardware::hidl_array; -using ::android::hardware::hidl_memory; -using ::android::hardware::hidl_string; -using ::android::hardware::hidl_vec; -using ::android::hardware::Return; -using ::android::hardware::Void; -using ::android::sp; - -struct AshmemMemory : public IMemory { - - AshmemMemory(const hidl_memory& memory, void* mappedMemory); - ~AshmemMemory(); - - // Methods from ::android::hidl::memory::V1_0::IMemory follow. - Return update() override; - Return updateRange(uint64_t start, uint64_t length) override; - Return read() override; - Return readRange(uint64_t start, uint64_t length) override; - Return commit() override; - Return getPointer() override; - Return getSize() override; - -private: - // Holding onto hidl_memory reference because it contains - // handle and size, and handle will also be required for - // the remoted case. - hidl_memory mMemory; - - // Mapped memory in process. - void* mData; -}; - -} // namespace implementation -} // namespace V1_0 -} // namespace memory -} // namespace hidl -} // namespace android - -#endif // ANDROID_HIDL_ASHMEM_MEMORY_V1_0_MEMORY_H diff --git a/uis7885/hardware/aosp/system/libhidl/transport/memory/1.0/default/HidlFetch.h b/uis7885/hardware/aosp/system/libhidl/transport/memory/1.0/default/HidlFetch.h deleted file mode 100755 index b220be493d26e9b65cd7a7902e821dbda9afec17..0000000000000000000000000000000000000000 --- a/uis7885/hardware/aosp/system/libhidl/transport/memory/1.0/default/HidlFetch.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2016 The Android Open Source Project - * - * 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. - */ - -#ifndef HIDL_FETCH_H -#define HIDL_FETCH_H - -#include - -namespace android { -namespace hidl { -namespace memory { -namespace V1_0 { -namespace implementation { - -extern "C" IMapper* HIDL_FETCH_IMapper(const char* name); - -} // namespace implementation -} // namespace V1_0 -} // namespace memory -} // namespace hidl -} // namespace android - -#endif // HIDL_FETCH_H diff --git a/uis7885/hardware/aosp/system/libhidl/transport/token/1.0/utils/include/hidl/HybridInterface.h b/uis7885/hardware/aosp/system/libhidl/transport/token/1.0/utils/include/hidl/HybridInterface.h deleted file mode 100755 index d00a0a1f8fa97ad1d20cf394d5ff73b140e2121d..0000000000000000000000000000000000000000 --- a/uis7885/hardware/aosp/system/libhidl/transport/token/1.0/utils/include/hidl/HybridInterface.h +++ /dev/null @@ -1,565 +0,0 @@ -/* - * Copyright (C) 2017 The Android Open Source Project - * - * 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. - */ - -#ifndef ANDROID_HYBRIDINTERFACE_H -#define ANDROID_HYBRIDINTERFACE_H - -#include -#include - -#include -#include - -#include -#include - -/** - * Hybrid Interfaces - * ================= - * - * A hybrid interface is a binder interface that - * 1. is implemented both traditionally and as a wrapper around a hidl - * interface, and allows querying whether the underlying instance comes from - * a hidl interface or not; and - * 2. allows efficient calls to a hidl interface (if the underlying instance - * comes from a hidl interface) by automatically creating the wrapper in the - * process that calls it. - * - * Terminology: - * - `HalToken`: The type for a "token" of a hidl interface. This is defined to - * be compatible with `ITokenManager.hal`. - * - `HInterface`: The base type for a hidl interface. Currently, it is defined - * as `::android::hidl::base::V1_0::IBase`. - * - `HALINTERFACE`: The hidl interface that will be sent through binders. - * - `INTERFACE`: The binder interface that will be the wrapper of - * `HALINTERFACE`. `INTERFACE` is supposed to be somewhat similar to - * `HALINTERFACE`. - * - * To demonstrate how this is done, here is an example. Suppose `INTERFACE` is - * `IFoo` and `HALINTERFACE` is `HFoo`. The required steps are: - * 1. Use `DECLARE_HYBRID_META_INTERFACE` instead of `DECLARE_META_INTERFACE` in - * the declaration of `IFoo`. `DECLARE_HYBRID_META_INTERFACE` takes an - * additional argument that is the hidl interface to be converted into a - * binder interface. Example: - * Change from `DECLARE_META_INTERFACE(Foo)` - * to `DECLARE_HYBRID_META_INTERFACE(Foo, HFoo)` - * 2. Create a converter class that derives from - * `H2BConverter`. Let us call this `H2BFoo`. - * 3. Add the following constructor in `H2BFoo` that call the corresponding - * constructors in `H2BConverter`: - * `H2BFoo(const sp& base) : CBase(base) {}` - * Note: `CBase = H2BConverter` and `HalInterface = HFoo` are - * member typedefs of `H2BConverter`, so the above line can be - * copied verbatim into `H2BFoo`. - * 4. Implement `IFoo` in `H2BFoo` on top of `HFoo`. `H2BConverter` provides a - * protected `mBase` of type `sp` that can be used to access the `HFoo` - * instance. (There is also a public function named `getBase()` that returns - * `mBase`.) - * 5. Create a hardware proxy class that derives from - * `HpInterface`. Name this class `HpFoo`. (This name cannot - * deviate. See step 8 below.) - * 6. Add the following constructor to `HpFoo`: - * `HpFoo(const sp& base): PBase(base) {}` - * Note: `PBase` a member typedef of `HpInterface` that is - * equal to `HpInterface` itself, so the above line can be - * copied verbatim into `HpFoo`. - * 7. Delegate all functions in `HpFoo` that come from `IFoo` (except those that - * are defined by the macro `DECLARE_HYBRID_META_INTERFACE`) to the protected - * member `mBase`. `mBase` is defined in `HpInterface` (hence - * in `HpFoo`) with type `IFoo`. There is also a public function named - * `getBase()` that returns `mBase`. - * 8. Replace the existing `IMPLEMENT_META_INTERFACE` for `IFoo` by - * `IMPLEMENT_HYBRID_META_INTERFACE`. This macro assumes that the subclass of - * `HpInterface` for `IFoo` is named `HpFoo`. - * - * After the hybrid interface has been put in place properly, it can be used to - * do the following tasks: - * 1. Create an `IFoo` instance from an `HFoo` by passing `sp` to - * the constructor of `H2BFoo`. - * 2. Retrieve an `HFoo` from an `HpFoo` instance by calling - * `HpFoo::getHalInterface()`. This function may return `nullptr` if - * the `HpFoo` object is not backed by `HFoo`. The template parameter is - * required because `HpFoo` in fact may be backed by multiple H2B converter - * classes. - * - * Multiple H2B Converters - * ======================= - * - * Because the system may support multiple versions of hidl interfaces for the - * same object, one binder interface may correspond to multiple H2B converters. - * The hybrid interface is designed to handle this as - * well---`DECLARE_HYBRID_META_INTERFACE` and `HpInterface` can take a variable - * number of arguments. - * - * As a concrete example, suppose `IFoo` is a binder interface that corresponds - * to two hidl interfaces `HFoo1` and `HFoo2`. That means `HpFoo`, the hybrid - * interface presenting `IFoo`, may be backed by `HFoo1` or `HFoo2`. This is - * achievable by - * - * - Replacing `DECLARE_META_INTERFACE(Foo)` by - * `DECLARE_HYBRID_META_INTERFACE(Foo, HFoo1, HFoo2)` in the declaration of - * `IFoo`. - * - Creating `H2BFoo1` as a subclass of `H2BConverter`; - * - Creating `H2BFoo2` as a subclass of `H2BConverter`; and - * - Creating `HpFoo` as a subclass of `HpInterface`. - * - * It is important that `HFoo1` and `HFoo2` are different hidl interfaces. [The - * actual requirement is that for each pair ``, there can be only - * one subclass of `H2BConverter`.] - * - * As mentioned in the previous section, `HpFoo::getHalInterface` requires a - * template argument because it must be able to return different hidl - * interface types based on which hidl interface is being used. The user of - * `HpFoo` can query the type of the underlying hidl interface by calling - * `HpFoo::getHalIndex()`. The return value is a 1-based index into the list of - * all the supported hidl interfaces. In the example with 2 hidl interfaces - * `HFoo1` and `HFoo2`, index 1 corresponds to `HFoo1` and index 2 corresponds - * to `HFoo2`. A typical code block that accesses the underlying hidl interface - * of would look like this: - * - * void someFunction(const sp &foo) { - * - * switch (foo->getHalIndex()) { - * case 1: { - * sp hFoo1 = foo->getHalInterface(); - * ... - * break; - * } - * case 2: { - * sp hFoo2 = foo->getHalInterface(); - * ... - * break; - * } - * default: // Not backed by a hidl interface. - * // Alternatively, "case 0:" can be used. - * } - * - * } - * - * Error State - * =========== - * - * A corrupted transaction may cause an `HpInterface` to be in an error state. - * This could cause `getHalInterface()` to return - * `nullptr` even though `getHalIndex()` returns a non-zero index and - * `ExpectedHalInterface` is the corresponding hidl interface. It is therefore - * recommended that a null check be performed on the return value of - * `getHalInterface` before using it. - * - * DECLARE_HYBRID_META_INTERFACE_WITH_CODE - * ======================================= - * - * `H2BConverter` and `HpInterface` use `transact()` to send over tokens with - * the transaction code (the first argument of `transact()`) equal to `_GHT`, - * which is defined as a global constant named - * `DEFAULT_GET_HAL_TOKEN_TRANSACTION_CODE`. - * - * In the rare occasion that this value clashes with other values already used - * by the `Bp` class and modifying the `Bp` class is difficult, the - * "GET_HAL_TOKEN" transaction code can be changed to a different value simply - * by replacing `DECLARE_HYBRID_META_INTERFACE` with - * `DECLARE_HYBRID_META_INTERFACE_WITH_CODE` in the declaration of the base - * interface and supplying the new transaction code in the first argument of - * this macro. - * - */ - -namespace android { - -typedef ::android::hardware::hidl_vec HalToken; -typedef ::android::hidl::base::V1_0::IBase HInterface; - -constexpr uint32_t DEFAULT_GET_HAL_TOKEN_TRANSACTION_CODE = - B_PACK_CHARS('_', 'G', 'H', 'T'); - -sp retrieveHalInterface(const HalToken& token); -bool createHalToken(const sp& interface, HalToken* token); -bool deleteHalToken(const HalToken& token); - -template -class H2BConverter : public BNINTERFACE { -public: - typedef H2BConverter CBase; // Converter Base - typedef typename BNINTERFACE::BaseInterface BaseInterface; - typedef HINTERFACE HalInterface; - typedef typename BaseInterface::HalVariant HalVariant; - using BaseInterface::sGetHalTokenTransactionCode; - - H2BConverter(const sp& base) : mBase{base} {} - virtual status_t onTransact(uint32_t code, - const Parcel& data, Parcel* reply, uint32_t flags = 0); - virtual status_t linkToDeath( - const sp& recipient, - void* cookie = nullptr, - uint32_t flags = 0); - virtual status_t unlinkToDeath( - const wp& recipient, - void* cookie = nullptr, - uint32_t flags = 0, - wp* outRecipient = nullptr); - virtual HalVariant getHalVariant() const override { return { mBase }; } - HalInterface* getBase() { return mBase.get(); } - -protected: - sp mBase; - -private: - struct Obituary : public hardware::hidl_death_recipient { - wp recipient; - void* cookie; - uint32_t flags; - wp who; - Obituary( - const wp& r, - void* c, uint32_t f, - const wp& w) : - recipient(r), cookie(c), flags(f), who(w) { - } - Obituary(const Obituary& o) : - recipient(o.recipient), - cookie(o.cookie), - flags(o.flags), - who(o.who) { - } - Obituary& operator=(const Obituary& o) { - recipient = o.recipient; - cookie = o.cookie; - flags = o.flags; - who = o.who; - return *this; - } - void serviceDied(uint64_t, const wp&) override { - sp dr = recipient.promote(); - if (dr != nullptr) { - dr->binderDied(who); - } - } - }; - std::mutex mObituariesLock; - std::vector > mObituaries; - - template - 1> - static constexpr size_t _findIndex() { - if constexpr (Index == 0) { - return Index; - } else if constexpr ( - std::is_same_v< - std::variant_alternative_t, - sp>) { - return Index; - } else { - return _findIndex(); - } - } - - static constexpr size_t sHalIndex = _findIndex<>(); - static_assert(sHalIndex != 0, - "H2BConverter from an unrecognized HAL interface."); -}; - -template -class HpInterface : public CONVERTER::BaseInterface { -public: - typedef HpInterface PBase; // Proxy Base - typedef typename CONVERTER::BaseInterface BaseInterface; - typedef typename BaseInterface::HalVariant HalVariant; - using BaseInterface::sGetHalTokenTransactionCode; - - explicit HpInterface(const sp& impl); - BaseInterface* getBase() { return mBase.get(); } - virtual HalVariant getHalVariant() const override { return mHalVariant; } - -protected: - IBinder* mBpBinder; - sp mBp; - sp mBase; - HalVariant mHalVariant; - bool mHasConverter{false}; - IBinder* onAsBinder() override { return mBpBinder; } - -private: - typedef std::variant _ConverterVar; - typedef std::variant _ConverterHalVar; - typedef std::variant, - sp...> _ConverterHalPointerVar; - - static_assert(std::is_same_v<_ConverterHalPointerVar, HalVariant>, - "Converter classes do not match HAL interfaces."); - - template - 1> - bool _castFromHalBaseAndConvert(size_t halIndex, - const sp& halBase) { - if constexpr (Index == 0) { - return false; - } else { - if (halIndex != Index) { - return _castFromHalBaseAndConvert(halIndex, halBase); - } - typedef std::variant_alternative_t - HalInterface; - sp halInterface = HalInterface::castFrom(halBase); - mHalVariant.template emplace(halInterface); - if (!halInterface) { - return false; - } - if (mHasConverter) { - typedef std::variant_alternative_t - Converter; - sp converter = new Converter(halInterface); - if (converter) { - mBase = converter; - } else { - ALOGW("HpInterface: Failed to create an H2B converter -- " - "index = %zu.", Index); - } - } - return true; - } - } - - bool castFromHalBaseAndConvert(size_t halIndex, - const sp& halBase) { - if (!_castFromHalBaseAndConvert<>(halIndex, halBase)) { - return false; - } - return true; - } - -}; - -// ---------------------------------------------------------------------- - -#define DECLARE_HYBRID_META_INTERFACE(INTERFACE, ...) \ - DECLARE_HYBRID_META_INTERFACE_WITH_CODE( \ - ::android::DEFAULT_GET_HAL_TOKEN_TRANSACTION_CODE, \ - INTERFACE, __VA_ARGS__) \ - - -#define DECLARE_HYBRID_META_INTERFACE_WITH_CODE(GTKCODE, INTERFACE, ...) \ -private: \ - typedef ::std::variant<::std::monostate, __VA_ARGS__> _HalVariant; \ - template \ - using _SpVariant = \ - ::std::variant<::std::monostate, ::android::sp...>; \ -public: \ - typedef _SpVariant<__VA_ARGS__> HalVariant; \ - virtual HalVariant getHalVariant() const; \ - size_t getHalIndex() const; \ - template \ - using HalInterface = ::std::variant_alternative_t;\ - template \ - sp getHalInterface() const { \ - HalVariant halVariant = getHalVariant(); \ - const sp* hal = std::get_if>(&halVariant); \ - return hal ? *hal : nullptr; \ - } \ - \ - static const ::android::String16 descriptor; \ - static ::android::sp asInterface( \ - const ::android::sp<::android::IBinder>& obj); \ - virtual const ::android::String16& getInterfaceDescriptor() const; \ - I##INTERFACE(); \ - virtual ~I##INTERFACE(); \ - static constexpr uint32_t sGetHalTokenTransactionCode = GTKCODE; \ - - -#define IMPLEMENT_HYBRID_META_INTERFACE(INTERFACE, NAME) \ - I##INTERFACE::HalVariant I##INTERFACE::getHalVariant() const { \ - return HalVariant{std::in_place_index<0>}; \ - } \ - size_t I##INTERFACE::getHalIndex() const { \ - return getHalVariant().index(); \ - } \ - constexpr uint32_t I##INTERFACE::sGetHalTokenTransactionCode; \ - static const ::android::StaticString16 I##INTERFACE##_desc_str16( \ - u##NAME); \ - const ::android::String16 I##INTERFACE::descriptor( \ - I##INTERFACE##_desc_str16); \ - const ::android::String16& \ - I##INTERFACE::getInterfaceDescriptor() const { \ - return I##INTERFACE::descriptor; \ - } \ - ::android::sp I##INTERFACE::asInterface( \ - const ::android::sp<::android::IBinder>& obj) \ - { \ - ::android::sp intr; \ - if (obj != nullptr) { \ - intr = static_cast( \ - obj->queryLocalInterface( \ - I##INTERFACE::descriptor).get()); \ - if (intr == nullptr) { \ - intr = new Hp##INTERFACE(obj); \ - } \ - } \ - return intr; \ - } \ - I##INTERFACE::I##INTERFACE() { } \ - I##INTERFACE::~I##INTERFACE() { } \ - -// ---------------------------------------------------------------------- - -template -status_t H2BConverter:: - onTransact( - uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags) { - if (code == sGetHalTokenTransactionCode) { - if (!data.enforceInterface(BaseInterface::getInterfaceDescriptor())) { - return BAD_TYPE; - } - - HalToken token; - bool result; - result = createHalToken(mBase, &token); - // Write whether a HAL token is present. - reply->writeBool(result); - if (!result) { - ALOGE("H2BConverter: Failed to create HAL token."); - return NO_ERROR; - } - - // Write the HAL token. - reply->writeByteArray(token.size(), token.data()); - - // Write the HAL index. - reply->writeUint32(static_cast(sHalIndex)); - - // Write a flag indicating that a converter needs to be created. - reply->writeBool(true); - - return NO_ERROR; - } - return BNINTERFACE::onTransact(code, data, reply, flags); -} - -template -status_t H2BConverter::linkToDeath( - const sp& recipient, - void* cookie, uint32_t flags) { - LOG_ALWAYS_FATAL_IF( - recipient == nullptr, - "linkToDeath(): recipient must not be null."); - { - std::lock_guard lock(mObituariesLock); - mObituaries.push_back(new Obituary(recipient, cookie, flags, this)); - if (!mBase->linkToDeath(mObituaries.back(), 0)) { - return DEAD_OBJECT; - } - } - return NO_ERROR; -} - -template -status_t H2BConverter::unlinkToDeath( - const wp& recipient, - void* cookie, uint32_t flags, - wp* outRecipient) { - std::lock_guard lock(mObituariesLock); - for (auto i = mObituaries.begin(); i != mObituaries.end(); ++i) { - if ((flags = (*i)->flags) && ( - (recipient == (*i)->recipient) || - ((recipient == nullptr) && (cookie == (*i)->cookie)))) { - if (outRecipient != nullptr) { - *outRecipient = (*i)->recipient; - } - bool success = mBase->unlinkToDeath(*i); - mObituaries.erase(i); - return success ? NO_ERROR : DEAD_OBJECT; - } - } - return NAME_NOT_FOUND; -} - -template -HpInterface::HpInterface( - const sp& impl) - : mBpBinder{impl.get()}, - mBp{new BPINTERFACE(impl)} { - mBase = mBp; - if (!mBpBinder->remoteBinder()) { - return; - } - Parcel data, reply; - data.writeInterfaceToken(BaseInterface::getInterfaceDescriptor()); - if (mBpBinder->transact(sGetHalTokenTransactionCode, - data, &reply) == NO_ERROR) { - // Read whether a HAL token is present. - bool tokenCreated; - if (reply.readBool(&tokenCreated) != OK) { - ALOGW("HpInterface: Corrupted parcel from GET_HAL_TOKEN " - "(tokenCreated)."); - } - - if (!tokenCreated) { - ALOGW("HpInterface: No HAL token was created."); - return; - } - - // Read the HAL token. - std::vector tokenVector; - if (reply.readByteVector(&tokenVector) != OK) { - ALOGW("HpInterface: Corrupted parcel from GET_HAL_TOKEN " - "(halToken)."); - return; - } - - // Retrieve the HAL interface from the token. - HalToken token{tokenVector}; - sp halBase = retrieveHalInterface(token); - deleteHalToken(token); - - if (!halBase) { - ALOGW("HpInterface: Failed to retrieve HAL interface."); - return; - } - - uint32_t halIndex; - // Read the hal index. - if (reply.readUint32(&halIndex) != OK) { - ALOGW("HpInterface: Corrupted parcel from GET_HAL_TOKEN " - "(halIndex)."); - return; - } - - // Read the converter flag. - if (reply.readBool(&mHasConverter) != OK) { - ALOGW("HpInterface: Corrupted parcel from GET_HAL_TOKEN " - "(hasConverter)."); - return; - } - - // Call castFrom from the right HAL interface and create a converter if - // needed. - if (!castFromHalBaseAndConvert(static_cast(halIndex), - halBase)) { - ALOGW("HpInterface: Failed to cast to the correct HAL interface -- " - "HAL index = %" PRIu32 ".", halIndex); - } - } -} - -// ---------------------------------------------------------------------- - -} // namespace android - -#endif // ANDROID_HYBRIDINTERFACE_H diff --git a/uis7885/hardware/aosp/system/libhwbinder/BUILD.gn b/uis7885/hardware/aosp/system/libhwbinder/BUILD.gn index 7b4f6c3860cc8877094a666918d12962a74139ea..58b6cbf31dc00ebe61f116827d77d330132bf389 100755 --- a/uis7885/hardware/aosp/system/libhwbinder/BUILD.gn +++ b/uis7885/hardware/aosp/system/libhwbinder/BUILD.gn @@ -14,7 +14,7 @@ import("//build/ohos.gni") import("../../aosp.gni") -ohos_prebuilt_shared_library( "hwbinder") { +ohos_prebuilt_shared_library("hwbinder") { source = "lib/libhwbinder.z.so" install_enable = true install_images = [ chipset_base_dir ] diff --git a/uis7885/hardware/aosp/system/libhwbinder/lib/libhwbinder.z.so b/uis7885/hardware/aosp/system/libhwbinder/lib/libhwbinder.z.so index 3c153853b3a842d987b651829aca320665bc9042..99d81b3543582546665b2ccc1ef109c4808b9e2c 100755 Binary files a/uis7885/hardware/aosp/system/libhwbinder/lib/libhwbinder.z.so and b/uis7885/hardware/aosp/system/libhwbinder/lib/libhwbinder.z.so differ diff --git a/uis7885/hardware/aosp/system/libhwbinder/vts/performance/PerfTest.h b/uis7885/hardware/aosp/system/libhwbinder/vts/performance/PerfTest.h deleted file mode 100755 index 2ca1d89dc6e864696d9eea4a0fd30c51c7148bb3..0000000000000000000000000000000000000000 --- a/uis7885/hardware/aosp/system/libhwbinder/vts/performance/PerfTest.h +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright (C) 2016 The Android Open Source Project - * - * 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. - */ -#ifndef HWBINDER_PERF_TEST_H -#define HWBINDER_PERF_TEST_H - -#include -#include -#include -#include - -#define TRACE_PATH "/sys/kernel/debug/tracing" - -using std::list; -using std::tuple; - -// Pipe is a object used for IPC between parent process and child process. -// This IPC class is widely used in binder/hwbinder tests. -// The common usage is the main process to create the Pipe and forks. -// Both parent and child hold a object. Each recv() on one side requires -// a send() on the other side to unblock. -class Pipe { - public: - static tuple createPipePair(); - Pipe(Pipe&& rval) noexcept; - ~Pipe(); - inline void signal() { - bool val = true; - send(val); - } - inline void wait() { - bool val = false; - recv(val); - } - - // write a data struct - template - int send(const T& v) { - return write(fd_write_, &v, sizeof(T)); - } - // read a data struct - template - int recv(T& v) { - return read(fd_read_, &v, sizeof(T)); - } - - private: - int fd_read_; // file descriptor to read - int fd_write_; // file descriptor to write - Pipe(int read_fd, int write_fd) : fd_read_{read_fd}, fd_write_{write_fd} {} - Pipe(const Pipe&) = delete; - Pipe& operator=(const Pipe&) = delete; - Pipe& operator=(const Pipe&&) = delete; -}; - -// statistics of latency -// common usage: -// -// Results r; -// Tick sta, end; -// TICK_NOW(sta); -// ... do something ... -// TICK_NOW(end); -// r.addTime(tickDiffNS(sta, end)); -// -// r.dump(); -// r.dumpDistribution(); -// -class Results { - public: - // enable the deadline miss detection which stops the trace recording after - // a transaction latency > deadline_us_ is detected. - void setTracingMode(bool tracing, uint64_t deadline_us) { - tracing_ = tracing; - deadline_us_ = deadline_us; - } - inline uint64_t getTransactions() const { return transactions_; } - inline bool missDeadline(uint64_t nano) const { return nano > deadline_us_ * 1000; } - // Combine two sets of latency data points and update the aggregation info. - static Results combine(const Results& a, const Results& b); - // add a new transaction latency record - void addTime(uint64_t nano); - // prepare for raw data recording, it may allocate resources which requires - // a flushRawData() to release - void setupRawData(); - // dump the raw data and release the resource - void flushRawData(); - // dump average, best, worst latency in json - void dump() const; - // dump latency distribution in json - void dumpDistribution() const; - - private: - static const uint32_t kNumBuckets = 128; - static const uint64_t kMaxTimeBucket = 50ull * 1000000; - static const uint64_t kTimePerBucket = kMaxTimeBucket / kNumBuckets; - static constexpr float kTimePerBucketMS = kTimePerBucket / 1.0E6; - uint64_t best_ = 0xffffffffffffffffULL; // best transaction latency in ns. - uint64_t worst_ = 0; // worst transaction latency in ns. - uint64_t transactions_ = 0; // number of transactions - uint64_t total_time_ = 0; // total transaction time - uint64_t miss_ = 0; // number of transactions whose latency > deadline - uint32_t buckets_[kNumBuckets] = {0}; // statistics for the distribution - list* raw_data_ = nullptr; // list for raw-data - bool tracing_ = false; // halt the trace log on a deadline miss - bool raw_dump_ = false; // record the raw data for the dump after - uint64_t deadline_us_ = 2500; // latency deadline in us. -}; - -// statistics of a process pair -class PResults { - public: - static PResults combine(const PResults& a, const PResults& b); - int nNotInherent = 0; ///< #transactions that does not inherit priority - int nNotSync = 0; ///< #transactions that are not synced - Results other; ///< statistics of CFS-other transactions - Results fifo; ///< statistics of RT-fifo transactions - // dump and flush the raw data - inline void flushRawData() { fifo.flushRawData(); } - // dump in json - void dump() const; -}; - -// Tick keeps timestamp -typedef std::chrono::time_point Tick; - -// get current timestamp as a Tick -static inline Tick tickNow() { - return std::chrono::high_resolution_clock::now(); -} - -#define TICK_NOW(_tick) \ - do { \ - asm volatile("" ::: "memory"); \ - _tick = tickNow(); \ - asm volatile("" ::: "memory"); \ - } while (0) - -// get nano seconds between sta & end -static inline uint64_t tickDiffNS(Tick& sta, Tick& end) { - return uint64_t(std::chrono::duration_cast(end - sta).count()); -} -#endif diff --git a/uis7885/hardware/aosp/system/memory/libdmabufheap/BUILD.gn b/uis7885/hardware/aosp/system/memory/libdmabufheap/BUILD.gn index 73d319bf4074acb6982cbe0313a71753e9f516f4..245b0a4d792304fd934d32546bd2c727b026b6c0 100755 --- a/uis7885/hardware/aosp/system/memory/libdmabufheap/BUILD.gn +++ b/uis7885/hardware/aosp/system/memory/libdmabufheap/BUILD.gn @@ -20,4 +20,5 @@ ohos_prebuilt_shared_library( "libaosp_dmabufheap") { install_images = [ chipset_base_dir ] subsystem_name = "${SUBSYSTEM_NAME}" part_name = "${PART_NAME}" -} \ No newline at end of file +} + diff --git a/uis7885/hardware/aosp/system/memory/libdmabufheap/lib/libaosp_dmabufheap.z.so b/uis7885/hardware/aosp/system/memory/libdmabufheap/lib/libaosp_dmabufheap.z.so index 0ca67562345f68bb40a62711859cf061110906fc..ec07b6150e740bd8e8a600981a299801fee06a26 100755 Binary files a/uis7885/hardware/aosp/system/memory/libdmabufheap/lib/libaosp_dmabufheap.z.so and b/uis7885/hardware/aosp/system/memory/libdmabufheap/lib/libaosp_dmabufheap.z.so differ diff --git a/uis7885/hardware/aosp/system/memory/libdmabufheap/tests/dmabuf_heap_test.h b/uis7885/hardware/aosp/system/memory/libdmabufheap/tests/dmabuf_heap_test.h deleted file mode 100755 index abb11a8168683fa9243a277542f0904707e2973a..0000000000000000000000000000000000000000 --- a/uis7885/hardware/aosp/system/memory/libdmabufheap/tests/dmabuf_heap_test.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2020 The Android Open Source Project - * - * 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. - */ - -#pragma once - -#include "BufferAllocator/BufferAllocator.h" - -#include - -#include - -using ::testing::Test; - -class DmaBufHeapTest : public virtual Test { - public: - DmaBufHeapTest(); - virtual ~DmaBufHeapTest(){} - std::unique_ptr allocator; -}; diff --git a/uis7885/hardware/aosp/system/memory/libion/BUILD.gn b/uis7885/hardware/aosp/system/memory/libion/BUILD.gn index 73dbd5fcbf5407e51d837d6453e7c1dec90e2caf..0addd0a973287fd9c753d8425007da920a170739 100755 --- a/uis7885/hardware/aosp/system/memory/libion/BUILD.gn +++ b/uis7885/hardware/aosp/system/memory/libion/BUILD.gn @@ -14,10 +14,11 @@ import("//build/ohos.gni") import("../../../aosp.gni") -ohos_prebuilt_shared_library( "libion") { +ohos_prebuilt_shared_library("libion") { source = "lib/libion.z.so" install_enable = true install_images = [ chipset_base_dir ] subsystem_name = "${SUBSYSTEM_NAME}" part_name = "${PART_NAME}" } + diff --git a/uis7885/hardware/aosp/system/memory/libion/include/ion/ion.h b/uis7885/hardware/aosp/system/memory/libion/include/ion/ion.h deleted file mode 100755 index 60660d8c230953ffb92b40c6416e891732666965..0000000000000000000000000000000000000000 --- a/uis7885/hardware/aosp/system/memory/libion/include/ion/ion.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * ion.c - * - * Memory Allocator functions for ion - * - * Copyright 2011 Google, Inc - * - * 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. - */ - -#ifndef __SYS_CORE_ION_H -#define __SYS_CORE_ION_H - -// #include -#include - -// __BEGIN_DECLS -#ifdef __cplusplus -extern "C" { -#endif - -struct ion_handle; - -int ion_open(); -int ion_close(int fd); -int ion_alloc(int fd, size_t len, size_t align, unsigned int heap_mask, - unsigned int flags, ion_user_handle_t *handle); -int ion_alloc_fd(int fd, size_t len, size_t align, unsigned int heap_mask, - unsigned int flags, int *handle_fd); -int ion_sync_fd(int fd, int handle_fd); -int ion_free(int fd, ion_user_handle_t handle); -int ion_map(int fd, ion_user_handle_t handle, size_t length, int prot, - int flags, off_t offset, unsigned char **ptr, int *map_fd); -int ion_share(int fd, ion_user_handle_t handle, int *share_fd); -int ion_import(int fd, int share_fd, ion_user_handle_t *handle); - -/** - * Add 4.12+ kernel ION interfaces here for forward compatibility - * This should be needed till the pre-4.12+ ION interfaces are backported. - */ -int ion_query_heap_cnt(int fd, int* cnt); -int ion_query_get_heaps(int fd, int cnt, void* buffers); - -int ion_is_legacy(int fd); -int ion_is_using_modular_heaps(int fd); - -// __END_DECLS -#ifdef __cplusplus -} -#endif - -#endif /* __SYS_CORE_ION_H */ diff --git a/uis7885/hardware/aosp/system/memory/libion/kernel-headers/linux/ion.h b/uis7885/hardware/aosp/system/memory/libion/kernel-headers/linux/ion.h deleted file mode 100755 index 3c2808036a46c2b8f0ab961cdbf1e9973bf80d44..0000000000000000000000000000000000000000 --- a/uis7885/hardware/aosp/system/memory/libion/kernel-headers/linux/ion.h +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - *** To edit the content of this header, modify the corresponding - *** source file (e.g. under external/kernel-headers/original/) then - *** run bionic/libc/kernel/tools/update_all.py - *** - *** Any manual change here will be lost the next time this script will - *** be run. You've been warned! - *** - **************************************************************************** - ****************************************************************************/ -#ifndef _UAPI_LINUX_ION_H -#define _UAPI_LINUX_ION_H -#include -#include -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -typedef int ion_user_handle_t; -enum ion_heap_type { - ION_HEAP_TYPE_SYSTEM, - ION_HEAP_TYPE_SYSTEM_CONTIG, -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - ION_HEAP_TYPE_CARVEOUT, - ION_HEAP_TYPE_CHUNK, - ION_HEAP_TYPE_DMA, - ION_HEAP_TYPE_CUSTOM, -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - ION_NUM_HEAPS = 16, -}; -#define ION_HEAP_SYSTEM_MASK (1 << ION_HEAP_TYPE_SYSTEM) -#define ION_HEAP_SYSTEM_CONTIG_MASK (1 << ION_HEAP_TYPE_SYSTEM_CONTIG) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define ION_HEAP_CARVEOUT_MASK (1 << ION_HEAP_TYPE_CARVEOUT) -#define ION_HEAP_TYPE_DMA_MASK (1 << ION_HEAP_TYPE_DMA) -#define ION_NUM_HEAP_IDS (sizeof(unsigned int) * 8) -#define ION_FLAG_CACHED 1 -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define ION_FLAG_CACHED_NEEDS_SYNC 2 -struct ion_allocation_data { - size_t len; - size_t align; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned int heap_id_mask; - unsigned int flags; - ion_user_handle_t handle; -}; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -struct ion_fd_data { - ion_user_handle_t handle; - int fd; -}; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -struct ion_handle_data { - ion_user_handle_t handle; -}; -struct ion_custom_data { -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned int cmd; - unsigned long arg; -}; -#define ION_IOC_MAGIC 'I' -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define ION_IOC_ALLOC _IOWR(ION_IOC_MAGIC, 0, struct ion_allocation_data) -#define ION_IOC_FREE _IOWR(ION_IOC_MAGIC, 1, struct ion_handle_data) -#define ION_IOC_MAP _IOWR(ION_IOC_MAGIC, 2, struct ion_fd_data) -#define ION_IOC_SHARE _IOWR(ION_IOC_MAGIC, 4, struct ion_fd_data) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define ION_IOC_IMPORT _IOWR(ION_IOC_MAGIC, 5, struct ion_fd_data) -#define ION_IOC_SYNC _IOWR(ION_IOC_MAGIC, 7, struct ion_fd_data) -#define ION_IOC_CUSTOM _IOWR(ION_IOC_MAGIC, 6, struct ion_custom_data) -#endif -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ diff --git a/uis7885/hardware/aosp/system/memory/libion/kernel-headers/linux/ion_4.12.h b/uis7885/hardware/aosp/system/memory/libion/kernel-headers/linux/ion_4.12.h deleted file mode 100755 index 1af828491e4246633eb4eb5ab8ebb69f3202f0b3..0000000000000000000000000000000000000000 --- a/uis7885/hardware/aosp/system/memory/libion/kernel-headers/linux/ion_4.12.h +++ /dev/null @@ -1,50 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - *** To edit the content of this header, modify the corresponding - *** source file (e.g. under external/kernel-headers/original/) then - *** run bionic/libc/kernel/tools/update_all.py - *** - *** Any manual change here will be lost the next time this script will - *** be run. You've been warned! - *** - **************************************************************************** - ****************************************************************************/ -#ifndef _UAPI_LINUX_ION_NEW_H -#define _UAPI_LINUX_ION_NEW_H -#include -#include -#define ION_NUM_HEAP_IDS (sizeof(unsigned int) * 8) -struct ion_new_allocation_data { - __u64 len; - __u32 heap_id_mask; - __u32 flags; - __u32 fd; - __u32 unused; -}; -#define MAX_HEAP_NAME 32 -struct ion_heap_data { - char name[MAX_HEAP_NAME]; - __u32 type; - __u32 heap_id; - __u32 reserved0; - __u32 reserved1; - __u32 reserved2; -}; -struct ion_heap_query { - __u32 cnt; - __u32 reserved0; - __u64 heaps; - __u32 reserved1; - __u32 reserved2; -}; -#define ION_IOC_MAGIC 'I' -#define ION_IOC_NEW_ALLOC _IOWR(ION_IOC_MAGIC, 0, struct ion_new_allocation_data) -#define ION_IOC_HEAP_QUERY _IOWR(ION_IOC_MAGIC, 8, struct ion_heap_query) -#endif diff --git a/uis7885/hardware/aosp/system/memory/libion/kernel-headers/linux/ion_4.19.h b/uis7885/hardware/aosp/system/memory/libion/kernel-headers/linux/ion_4.19.h deleted file mode 100755 index cdbee85f40b9d4383cc28e531e50ac182eba896f..0000000000000000000000000000000000000000 --- a/uis7885/hardware/aosp/system/memory/libion/kernel-headers/linux/ion_4.19.h +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - *** To edit the content of this header, modify the corresponding - *** source file (e.g. under external/kernel-headers/original/) then - *** run bionic/libc/kernel/tools/update_all.py - *** - *** Any manual change here will be lost the next time this script will - *** be run. You've been warned! - *** - **************************************************************************** - ****************************************************************************/ -#ifndef _UAPI_LINUX_ION_NEW_H -#define _UAPI_LINUX_ION_NEW_H -#include -#include -#define ION_NUM_HEAP_IDS (sizeof(unsigned int) * 8) -enum ion_heap_type_ext { - ION_HEAP_TYPE_CUSTOM_EXT = 16, - ION_HEAP_TYPE_MAX = 31, -}; -enum ion_heap_id { - ION_HEAP_SYSTEM = (1 << ION_HEAP_TYPE_SYSTEM), - ION_HEAP_DMA_START = (ION_HEAP_SYSTEM << 1), - ION_HEAP_DMA_END = (ION_HEAP_DMA_START << 7), - ION_HEAP_CUSTOM_START = (ION_HEAP_DMA_END << 1), - ION_HEAP_CUSTOM_END = (ION_HEAP_CUSTOM_START << 22), -}; -#define ION_NUM_MAX_HEAPS (32) -struct ion_new_allocation_data { - __u64 len; - __u32 heap_id_mask; - __u32 flags; - __u32 fd; - __u32 unused; -}; -#define MAX_HEAP_NAME 32 -struct ion_heap_data { - char name[MAX_HEAP_NAME]; - __u32 type; - __u32 heap_id; - __u32 reserved0; - __u32 reserved1; - __u32 reserved2; -}; -struct ion_heap_query { - __u32 cnt; - __u32 reserved0; - __u64 heaps; - __u32 reserved1; - __u32 reserved2; -}; -#define ION_IOC_MAGIC 'I' -#define ION_IOC_NEW_ALLOC _IOWR(ION_IOC_MAGIC, 0, struct ion_new_allocation_data) -#define ION_IOC_HEAP_QUERY _IOWR(ION_IOC_MAGIC, 8, struct ion_heap_query) -#define ION_IOC_ABI_VERSION _IOR(ION_IOC_MAGIC, 9, __u32) -#endif diff --git a/uis7885/hardware/aosp/system/memory/libion/kernel-headers/linux/ion_test.h b/uis7885/hardware/aosp/system/memory/libion/kernel-headers/linux/ion_test.h deleted file mode 100755 index 6f3e2a7a260d648e046a140535220ace87dbc0d1..0000000000000000000000000000000000000000 --- a/uis7885/hardware/aosp/system/memory/libion/kernel-headers/linux/ion_test.h +++ /dev/null @@ -1,38 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - *** To edit the content of this header, modify the corresponding - *** source file (e.g. under external/kernel-headers/original/) then - *** run bionic/libc/kernel/tools/update_all.py - *** - *** Any manual change here will be lost the next time this script will - *** be run. You've been warned! - *** - **************************************************************************** - ****************************************************************************/ -#ifndef _UAPI_LINUX_ION_TEST_H -#define _UAPI_LINUX_ION_TEST_H -#include -#include -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -struct ion_test_rw_data { - __u64 ptr; - __u64 offset; - __u64 size; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - int write; - int __padding; -}; -#define ION_IOC_MAGIC 'I' -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define ION_IOC_TEST_SET_FD _IO(ION_IOC_MAGIC, 0xf0) -#define ION_IOC_TEST_DMA_MAPPING _IOW(ION_IOC_MAGIC, 0xf1, struct ion_test_rw_data) -#define ION_IOC_TEST_KERNEL_MAPPING _IOW(ION_IOC_MAGIC, 0xf2, struct ion_test_rw_data) -#endif -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ diff --git a/uis7885/hardware/aosp/system/memory/libion/lib/libion.z.so b/uis7885/hardware/aosp/system/memory/libion/lib/libion.z.so index 50da4b38a1ab5d0f07cb6e2eeea75f30d21dbd74..5a05d920fda6a562bef6f311b72a0dcb5407b0e8 100755 Binary files a/uis7885/hardware/aosp/system/memory/libion/lib/libion.z.so and b/uis7885/hardware/aosp/system/memory/libion/lib/libion.z.so differ diff --git a/uis7885/hardware/aosp/system/memory/libion/original-kernel-headers/linux/ion.h b/uis7885/hardware/aosp/system/memory/libion/original-kernel-headers/linux/ion.h deleted file mode 100755 index f09e7c154d691ec4d1e0e5c73901129fbc397d6e..0000000000000000000000000000000000000000 --- a/uis7885/hardware/aosp/system/memory/libion/original-kernel-headers/linux/ion.h +++ /dev/null @@ -1,196 +0,0 @@ -/* - * drivers/staging/android/uapi/ion.h - * - * Copyright (C) 2011 Google, Inc. - * - * This software is licensed under the terms of the GNU General Public - * License version 2, as published by the Free Software Foundation, and - * may be copied, distributed, and modified under those terms. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ - -#ifndef _UAPI_LINUX_ION_H -#define _UAPI_LINUX_ION_H - -#include -#include - -typedef int ion_user_handle_t; - -/** - * enum ion_heap_types - list of all possible types of heaps - * @ION_HEAP_TYPE_SYSTEM: memory allocated via vmalloc - * @ION_HEAP_TYPE_SYSTEM_CONTIG: memory allocated via kmalloc - * @ION_HEAP_TYPE_CARVEOUT: memory allocated from a prereserved - * carveout heap, allocations are physically - * contiguous - * @ION_HEAP_TYPE_DMA: memory allocated via DMA API - * @ION_NUM_HEAPS: helper for iterating over heaps, a bit mask - * is used to identify the heaps, so only 32 - * total heap types are supported - */ -enum ion_heap_type { - ION_HEAP_TYPE_SYSTEM, - ION_HEAP_TYPE_SYSTEM_CONTIG, - ION_HEAP_TYPE_CARVEOUT, - ION_HEAP_TYPE_CHUNK, - ION_HEAP_TYPE_DMA, - ION_HEAP_TYPE_CUSTOM, /* must be last so device specific heaps always - are at the end of this enum */ - ION_NUM_HEAPS = 16, -}; - -#define ION_HEAP_SYSTEM_MASK (1 << ION_HEAP_TYPE_SYSTEM) -#define ION_HEAP_SYSTEM_CONTIG_MASK (1 << ION_HEAP_TYPE_SYSTEM_CONTIG) -#define ION_HEAP_CARVEOUT_MASK (1 << ION_HEAP_TYPE_CARVEOUT) -#define ION_HEAP_TYPE_DMA_MASK (1 << ION_HEAP_TYPE_DMA) - -#define ION_NUM_HEAP_IDS sizeof(unsigned int) * 8 - -/** - * allocation flags - the lower 16 bits are used by core ion, the upper 16 - * bits are reserved for use by the heaps themselves. - */ -#define ION_FLAG_CACHED 1 /* mappings of this buffer should be - cached, ion will do cache - maintenance when the buffer is - mapped for dma */ -#define ION_FLAG_CACHED_NEEDS_SYNC 2 /* mappings of this buffer will created - at mmap time, if this is set - caches must be managed manually */ - -/** - * DOC: Ion Userspace API - * - * create a client by opening /dev/ion - * most operations handled via following ioctls - * - */ - -/** - * struct ion_allocation_data - metadata passed from userspace for allocations - * @len: size of the allocation - * @align: required alignment of the allocation - * @heap_id_mask: mask of heap ids to allocate from - * @flags: flags passed to heap - * @handle: pointer that will be populated with a cookie to use to - * refer to this allocation - * - * Provided by userspace as an argument to the ioctl - */ -struct ion_allocation_data { - size_t len; - size_t align; - unsigned int heap_id_mask; - unsigned int flags; - ion_user_handle_t handle; -}; - -/** - * struct ion_fd_data - metadata passed to/from userspace for a handle/fd pair - * @handle: a handle - * @fd: a file descriptor representing that handle - * - * For ION_IOC_SHARE or ION_IOC_MAP userspace populates the handle field with - * the handle returned from ion alloc, and the kernel returns the file - * descriptor to share or map in the fd field. For ION_IOC_IMPORT, userspace - * provides the file descriptor and the kernel returns the handle. - */ -struct ion_fd_data { - ion_user_handle_t handle; - int fd; -}; - -/** - * struct ion_handle_data - a handle passed to/from the kernel - * @handle: a handle - */ -struct ion_handle_data { - ion_user_handle_t handle; -}; - -/** - * struct ion_custom_data - metadata passed to/from userspace for a custom ioctl - * @cmd: the custom ioctl function to call - * @arg: additional data to pass to the custom ioctl, typically a user - * pointer to a predefined structure - * - * This works just like the regular cmd and arg fields of an ioctl. - */ -struct ion_custom_data { - unsigned int cmd; - unsigned long arg; -}; - -#define ION_IOC_MAGIC 'I' - -/** - * DOC: ION_IOC_ALLOC - allocate memory - * - * Takes an ion_allocation_data struct and returns it with the handle field - * populated with the opaque handle for the allocation. - */ -#define ION_IOC_ALLOC _IOWR(ION_IOC_MAGIC, 0, \ - struct ion_allocation_data) - -/** - * DOC: ION_IOC_FREE - free memory - * - * Takes an ion_handle_data struct and frees the handle. - */ -#define ION_IOC_FREE _IOWR(ION_IOC_MAGIC, 1, struct ion_handle_data) - -/** - * DOC: ION_IOC_MAP - get a file descriptor to mmap - * - * Takes an ion_fd_data struct with the handle field populated with a valid - * opaque handle. Returns the struct with the fd field set to a file - * descriptor open in the current address space. This file descriptor - * can then be used as an argument to mmap. - */ -#define ION_IOC_MAP _IOWR(ION_IOC_MAGIC, 2, struct ion_fd_data) - -/** - * DOC: ION_IOC_SHARE - creates a file descriptor to use to share an allocation - * - * Takes an ion_fd_data struct with the handle field populated with a valid - * opaque handle. Returns the struct with the fd field set to a file - * descriptor open in the current address space. This file descriptor - * can then be passed to another process. The corresponding opaque handle can - * be retrieved via ION_IOC_IMPORT. - */ -#define ION_IOC_SHARE _IOWR(ION_IOC_MAGIC, 4, struct ion_fd_data) - -/** - * DOC: ION_IOC_IMPORT - imports a shared file descriptor - * - * Takes an ion_fd_data struct with the fd field populated with a valid file - * descriptor obtained from ION_IOC_SHARE and returns the struct with the handle - * filed set to the corresponding opaque handle. - */ -#define ION_IOC_IMPORT _IOWR(ION_IOC_MAGIC, 5, struct ion_fd_data) - -/** - * DOC: ION_IOC_SYNC - syncs a shared file descriptors to memory - * - * Deprecated in favor of using the dma_buf api's correctly (syncing - * will happend automatically when the buffer is mapped to a device). - * If necessary should be used after touching a cached buffer from the cpu, - * this will make the buffer in memory coherent. - */ -#define ION_IOC_SYNC _IOWR(ION_IOC_MAGIC, 7, struct ion_fd_data) - -/** - * DOC: ION_IOC_CUSTOM - call architecture specific ion ioctl - * - * Takes the argument of the architecture specific ioctl to call and - * passes appropriate userdata for that ioctl - */ -#define ION_IOC_CUSTOM _IOWR(ION_IOC_MAGIC, 6, struct ion_custom_data) - -#endif /* _UAPI_LINUX_ION_H */ diff --git a/uis7885/hardware/aosp/system/memory/libion/original-kernel-headers/linux/ion_4.12.h b/uis7885/hardware/aosp/system/memory/libion/original-kernel-headers/linux/ion_4.12.h deleted file mode 100755 index 6ae79d4e8554acc2a670bbcf7817866f5913189b..0000000000000000000000000000000000000000 --- a/uis7885/hardware/aosp/system/memory/libion/original-kernel-headers/linux/ion_4.12.h +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Adapted from drivers/staging/android/uapi/ion.h - * - * Copyright (C) 2011 Google, Inc. - * - * This software is licensed under the terms of the GNU General Public - * License version 2, as published by the Free Software Foundation, and - * may be copied, distributed, and modified under those terms. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ - -#ifndef _UAPI_LINUX_ION_NEW_H -#define _UAPI_LINUX_ION_NEW_H - -#include -#include - -#define ION_NUM_HEAP_IDS (sizeof(unsigned int) * 8) - -/** - * DOC: Ion Userspace API - * - * create a client by opening /dev/ion - * most operations handled via following ioctls - * - */ - -/** - * struct ion_new_allocation_data - metadata passed from userspace for allocations - * @len: size of the allocation - * @heap_id_mask: mask of heap ids to allocate from - * @flags: flags passed to heap - * @handle: pointer that will be populated with a cookie to use to - * refer to this allocation - * - * Provided by userspace as an argument to the ioctl - added _new to denote - * this belongs to the new ION interface. - */ -struct ion_new_allocation_data { - __u64 len; - __u32 heap_id_mask; - __u32 flags; - __u32 fd; - __u32 unused; -}; - -#define MAX_HEAP_NAME 32 - -/** - * struct ion_heap_data - data about a heap - * @name - first 32 characters of the heap name - * @type - heap type - * @heap_id - heap id for the heap - */ -struct ion_heap_data { - char name[MAX_HEAP_NAME]; - __u32 type; - __u32 heap_id; - __u32 reserved0; - __u32 reserved1; - __u32 reserved2; -}; - -/** - * struct ion_heap_query - collection of data about all heaps - * @cnt - total number of heaps to be copied - * @heaps - buffer to copy heap data - */ -struct ion_heap_query { - __u32 cnt; /* Total number of heaps to be copied */ - __u32 reserved0; /* align to 64bits */ - __u64 heaps; /* buffer to be populated */ - __u32 reserved1; - __u32 reserved2; -}; - -#define ION_IOC_MAGIC 'I' - -/** - * DOC: ION_IOC_NEW_ALLOC - allocate memory - * - * Takes an ion_allocation_data struct and returns it with the handle field - * populated with the opaque handle for the allocation. - * TODO: This IOCTL will clash by design; however, only one of - * ION_IOC_ALLOC or ION_IOC_NEW_ALLOC paths will be exercised, - * so this should not conflict. - */ -#define ION_IOC_NEW_ALLOC _IOWR(ION_IOC_MAGIC, 0, struct ion_new_allocation_data) - -/** - * DOC: ION_IOC_FREE - free memory - * - * Takes an ion_handle_data struct and frees the handle. - * - * #define ION_IOC_FREE _IOWR(ION_IOC_MAGIC, 1, struct ion_handle_data) - * This will come from the older kernels, so don't redefine here - */ - -/** - * DOC: ION_IOC_SHARE - creates a file descriptor to use to share an allocation - * - * Takes an ion_fd_data struct with the handle field populated with a valid - * opaque handle. Returns the struct with the fd field set to a file - * descriptor open in the current address space. This file descriptor - * can then be passed to another process. The corresponding opaque handle can - * be retrieved via ION_IOC_IMPORT. - * - * #define ION_IOC_SHARE _IOWR(ION_IOC_MAGIC, 4, struct ion_fd_data) - * This will come from the older kernels, so don't redefine here - */ - -/** - * DOC: ION_IOC_HEAP_QUERY - information about available heaps - * - * Takes an ion_heap_query structure and populates information about - * available Ion heaps. - */ -#define ION_IOC_HEAP_QUERY _IOWR(ION_IOC_MAGIC, 8, struct ion_heap_query) - -#endif /* _UAPI_LINUX_ION_NEW_H */ diff --git a/uis7885/hardware/aosp/system/memory/libion/original-kernel-headers/linux/ion_4.19.h b/uis7885/hardware/aosp/system/memory/libion/original-kernel-headers/linux/ion_4.19.h deleted file mode 100755 index 9280926fa1ddd0ce9acc64ddcd67d7a7afa458a4..0000000000000000000000000000000000000000 --- a/uis7885/hardware/aosp/system/memory/libion/original-kernel-headers/linux/ion_4.19.h +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Adapted from drivers/staging/android/uapi/ion.h - * - * Copyright (C) 2019 Google, Inc. - * - * This software is licensed under the terms of the GNU General Public - * License version 2, as published by the Free Software Foundation, and - * may be copied, distributed, and modified under those terms. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ - -#ifndef _UAPI_LINUX_ION_NEW_H -#define _UAPI_LINUX_ION_NEW_H - -#include -#include - -#define ION_NUM_HEAP_IDS (sizeof(unsigned int) * 8) - -enum ion_heap_type_ext { - ION_HEAP_TYPE_CUSTOM_EXT = 16, - ION_HEAP_TYPE_MAX = 31, -}; - -/** - * ion_heap_id - list of standard heap ids that Android can use - * - * @ION_HEAP_SYSTEM Id for the ION_HEAP_TYPE_SYSTEM - * @ION_HEAP_DMA_START Start of reserved id range for heaps of type - * ION_HEAP_TYPE_DMA - * @ION_HEAP_DMA_END End of reserved id range for heaps of type - * ION_HEAP_TYPE_DMA - * @ION_HEAP_CUSTOM_START Start of reserved id range for heaps of custom - * type - * @ION_HEAP_CUSTOM_END End of reserved id range for heaps of custom - * type - */ -enum ion_heap_id { - ION_HEAP_SYSTEM = (1 << ION_HEAP_TYPE_SYSTEM), - ION_HEAP_DMA_START = (ION_HEAP_SYSTEM << 1), - ION_HEAP_DMA_END = (ION_HEAP_DMA_START << 7), - ION_HEAP_CUSTOM_START = (ION_HEAP_DMA_END << 1), - ION_HEAP_CUSTOM_END = (ION_HEAP_CUSTOM_START << 22), -}; - -#define ION_NUM_MAX_HEAPS (32) - -/** - * DOC: Ion Userspace API - * - * create a client by opening /dev/ion - * most operations handled via following ioctls - * - */ - -/** - * struct ion_new_allocation_data - metadata passed from userspace for allocations - * @len: size of the allocation - * @heap_id_mask: mask of heap ids to allocate from - * @flags: flags passed to heap - * @handle: pointer that will be populated with a cookie to use to - * refer to this allocation - * - * Provided by userspace as an argument to the ioctl - added _new to denote - * this belongs to the new ION interface. - */ -struct ion_new_allocation_data { - __u64 len; - __u32 heap_id_mask; - __u32 flags; - __u32 fd; - __u32 unused; -}; - -#define MAX_HEAP_NAME 32 - -/** - * struct ion_heap_data - data about a heap - * @name - first 32 characters of the heap name - * @type - heap type - * @heap_id - heap id for the heap - */ -struct ion_heap_data { - char name[MAX_HEAP_NAME]; - __u32 type; - __u32 heap_id; - __u32 reserved0; - __u32 reserved1; - __u32 reserved2; -}; - -/** - * struct ion_heap_query - collection of data about all heaps - * @cnt - total number of heaps to be copied - * @heaps - buffer to copy heap data - */ -struct ion_heap_query { - __u32 cnt; /* Total number of heaps to be copied */ - __u32 reserved0; /* align to 64bits */ - __u64 heaps; /* buffer to be populated */ - __u32 reserved1; - __u32 reserved2; -}; - -#define ION_IOC_MAGIC 'I' - -/** - * DOC: ION_IOC_NEW_ALLOC - allocate memory - * - * Takes an ion_allocation_data struct and returns it with the handle field - * populated with the opaque handle for the allocation. - * TODO: This IOCTL will clash by design; however, only one of - * ION_IOC_ALLOC or ION_IOC_NEW_ALLOC paths will be exercised, - * so this should not conflict. - */ -#define ION_IOC_NEW_ALLOC _IOWR(ION_IOC_MAGIC, 0, struct ion_new_allocation_data) - -/** - * DOC: ION_IOC_FREE - free memory - * - * Takes an ion_handle_data struct and frees the handle. - * - * #define ION_IOC_FREE _IOWR(ION_IOC_MAGIC, 1, struct ion_handle_data) - * This will come from the older kernels, so don't redefine here - */ - -/** - * DOC: ION_IOC_SHARE - creates a file descriptor to use to share an allocation - * - * Takes an ion_fd_data struct with the handle field populated with a valid - * opaque handle. Returns the struct with the fd field set to a file - * descriptor open in the current address space. This file descriptor - * can then be passed to another process. The corresponding opaque handle can - * be retrieved via ION_IOC_IMPORT. - * - * #define ION_IOC_SHARE _IOWR(ION_IOC_MAGIC, 4, struct ion_fd_data) - * This will come from the older kernels, so don't redefine here - */ - -/** - * DOC: ION_IOC_HEAP_QUERY - information about available heaps - * - * Takes an ion_heap_query structure and populates information about - * available Ion heaps. - */ -#define ION_IOC_HEAP_QUERY _IOWR(ION_IOC_MAGIC, 8, struct ion_heap_query) - -/** - * DOC: ION_IOC_HEAP_ABI_VERSION - return ABI version - * - * Returns ABI version for this driver - */ -#define ION_IOC_ABI_VERSION _IOR(ION_IOC_MAGIC, 9, __u32) - -#endif /* _UAPI_LINUX_ION_NEW_H */ diff --git a/uis7885/hardware/aosp/system/memory/libion/original-kernel-headers/linux/ion_test.h b/uis7885/hardware/aosp/system/memory/libion/original-kernel-headers/linux/ion_test.h deleted file mode 100755 index ffef06f63133fb874e38c1445947a1b35175dd75..0000000000000000000000000000000000000000 --- a/uis7885/hardware/aosp/system/memory/libion/original-kernel-headers/linux/ion_test.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * drivers/staging/android/uapi/ion.h - * - * Copyright (C) 2011 Google, Inc. - * - * This software is licensed under the terms of the GNU General Public - * License version 2, as published by the Free Software Foundation, and - * may be copied, distributed, and modified under those terms. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ - -#ifndef _UAPI_LINUX_ION_TEST_H -#define _UAPI_LINUX_ION_TEST_H - -#include -#include - -/** - * struct ion_test_rw_data - metadata passed to the kernel to read handle - * @ptr: a pointer to an area at least as large as size - * @offset: offset into the ion buffer to start reading - * @size: size to read or write - * @write: 1 to write, 0 to read - */ -struct ion_test_rw_data { - __u64 ptr; - __u64 offset; - __u64 size; - int write; - int __padding; -}; - -#define ION_IOC_MAGIC 'I' - -/** - * DOC: ION_IOC_TEST_SET_DMA_BUF - attach a dma buf to the test driver - * - * Attaches a dma buf fd to the test driver. Passing a second fd or -1 will - * release the first fd. - */ -#define ION_IOC_TEST_SET_FD \ - _IO(ION_IOC_MAGIC, 0xf0) - -/** - * DOC: ION_IOC_TEST_DMA_MAPPING - read or write memory from a handle as DMA - * - * Reads or writes the memory from a handle using an uncached mapping. Can be - * used by unit tests to emulate a DMA engine as close as possible. Only - * expected to be used for debugging and testing, may not always be available. - */ -#define ION_IOC_TEST_DMA_MAPPING \ - _IOW(ION_IOC_MAGIC, 0xf1, struct ion_test_rw_data) - -/** - * DOC: ION_IOC_TEST_KERNEL_MAPPING - read or write memory from a handle - * - * Reads or writes the memory from a handle using a kernel mapping. Can be - * used by unit tests to test heap map_kernel functions. Only expected to be - * used for debugging and testing, may not always be available. - */ -#define ION_IOC_TEST_KERNEL_MAPPING \ - _IOW(ION_IOC_MAGIC, 0xf2, struct ion_test_rw_data) - - -#endif /* _UAPI_LINUX_ION_H */ diff --git a/uis7885/hardware/aosp/system/memory/libion/tests/ion_test_fixture.h b/uis7885/hardware/aosp/system/memory/libion/tests/ion_test_fixture.h deleted file mode 100755 index c78fe41ccfe4e21fb32d0f23d3fbabb30f4696c2..0000000000000000000000000000000000000000 --- a/uis7885/hardware/aosp/system/memory/libion/tests/ion_test_fixture.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2013 The Android Open Source Project - * - * 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. - */ - -#ifndef ION_TEST_FIXTURE_H_ -#define ION_TEST_FIXTURE_H_ - -#include -#include -#include - -using ::testing::Test; - -class IonTest : public virtual Test { - public: - IonTest(); - virtual ~IonTest(){}; - virtual void SetUp(); - virtual void TearDown(); - int ionfd; - std::vector ion_heaps; -}; - -#endif /* ION_TEST_FIXTURE_H_ */ diff --git a/uis7885/hardware/aosp/system/memory/libmemion/BUILD.gn b/uis7885/hardware/aosp/system/memory/libmemion/BUILD.gn index a5f410d09ed297dd35251b7424e6db31199566b8..30e343edb451ea12fa9f55e9594138bc80f3f06b 100755 --- a/uis7885/hardware/aosp/system/memory/libmemion/BUILD.gn +++ b/uis7885/hardware/aosp/system/memory/libmemion/BUILD.gn @@ -14,7 +14,7 @@ import("//build/ohos.gni") import("//device/soc/sprd/uis7885/hardware/aosp/aosp.gni") -ohos_prebuilt_shared_library( "libmemion") { +ohos_prebuilt_shared_library("libmemion") { source = "lib/libmemion.z.so" install_enable = true install_images = [chipset_base_dir] diff --git a/uis7885/hardware/aosp/system/memory/libmemion/lib/libmemion.z.so b/uis7885/hardware/aosp/system/memory/libmemion/lib/libmemion.z.so index e941247f523dfc215b4dcfb85babd1bd14d35dd6..ce180c43c7637618297a7f1b92c03458d3353753 100755 Binary files a/uis7885/hardware/aosp/system/memory/libmemion/lib/libmemion.z.so and b/uis7885/hardware/aosp/system/memory/libmemion/lib/libmemion.z.so differ diff --git a/uis7885/hardware/aosp/vendor/sprd/modules/minidump/bin/minidumpd b/uis7885/hardware/aosp/vendor/sprd/modules/minidump/bin/minidumpd index 36e06831e1d2cc8a79f0b4d541d956df9f516223..2bd792174832b1c8896f44fdd520b6753cefcc02 100755 Binary files a/uis7885/hardware/aosp/vendor/sprd/modules/minidump/bin/minidumpd and b/uis7885/hardware/aosp/vendor/sprd/modules/minidump/bin/minidumpd differ diff --git a/uis7885/hardware/aosp/vendor/sprd/modules/minidump/etc/init.uis7885.minidump.cfg b/uis7885/hardware/aosp/vendor/sprd/modules/minidump/etc/init.uis7885.minidump.cfg index fbaeb54ea7b5bcc5db8b0ddf21c0656561987a06..7a5b6c409c81d9738eca8bbb4a9cc931c3423c8f 100755 --- a/uis7885/hardware/aosp/vendor/sprd/modules/minidump/etc/init.uis7885.minidump.cfg +++ b/uis7885/hardware/aosp/vendor/sprd/modules/minidump/etc/init.uis7885.minidump.cfg @@ -3,6 +3,8 @@ "name" : "boot", "cmds" : [ "chown system system /data/log/bbox", + "chown system system /dev/block/by-name/sysdumpdb", + "chmod 0666 /dev/block/by-name/sysdumpdb", "chmod 0666 /dev/block/mmcblk0p58", "start minidump" ] diff --git a/uis7885/hardware/aosp/vendor/sprd/modules/minidump/minidump-new.h b/uis7885/hardware/aosp/vendor/sprd/modules/minidump/minidump-new.h deleted file mode 100755 index c0298f8c662837d81aa5eeed5644471b23a7cdb1..0000000000000000000000000000000000000000 --- a/uis7885/hardware/aosp/vendor/sprd/modules/minidump/minidump-new.h +++ /dev/null @@ -1,133 +0,0 @@ -#include - -/* sysdumpdb */ -#define SYSDUMPDB_PARTITION_NAME "sysdumpdb" -#define SYSDUMPDB_SIZE (10 * 1024 * 1024) /* 10M */ -#define MINIDUMP_DATA_OFFSET 256 /* minidump start offset in sysdumpdb partition */ -#define MINIDUMP_DATA_SPACE (SYSDUMPDB_SIZE - MINIDUMP_DATA_OFFSET -1) -// #define MINIDUMP_FILE_PATH "/data/minidump" -#define MINIDUMP_FILE_PATH "/data/log/bbox" - -/* compress */ -#define SRC_DATA_MAX (500 * 1024) -#define MALLOC_LIMIT (512 * 1024) -#define COMP_SUFFIX_MAX 10 - -/* minidump func */ -#define MINIDUMP_FUNC_MAX 10 /* sysdump enter check func max num*/ -#define DIR_MAX_NUM 10 -typedef int (*MINIDUMP_FUNC) (void); - - -uint64_t minidump_pos; /* available position for new area in sysdumpdb */ - -#define MINI_NOTE 0 /* note info type */ -#define MINI_SECTION 1 /* section info type */ - -#define AREA_NUM_MAX 20 /* area max number for minidump */ -#define SECTION_NUM_MAX 200 /* sections max number for each area:note, section */ -#define NOTE_NUM_MAX AREA_NUM_MAX -#define AREA_NAME_LEN_MAX 40 -#define SECTION_NAME_LEN_MAX 40 -#define PARTITION_NAME_MAX_SIZE 128 -#define PARTITION_PATH "/dev/block/by-name/" -#define DE_COMPRESSION_SCRIPT_FILE "ana.py" -#define MINIDUMP_DATA_MAGIC "MINIDUMP" - -struct mini_data_header { - char data_magic[12]; /* minidump: data valid */ - uint32_t area_num; /* the number of area */ - uint32_t arch_info; /* 0:arm, 1: arm64; 2:x86 */ - uint32_t h_size; /* the size of area_info_header*/ - uint32_t ainfo_size; /* the size of area_info */ -}; - -struct mini_area_info { - char a_name[AREA_NAME_LEN_MAX]; /* area name */ - uint8_t data_flag; /* 0: area data invalid, 1: area data valid*/ - uint32_t area_type; /* AREA_NOTE */ - uint32_t a_size; /* area size */ - uint32_t a_offset; /* area offset in sysdumpdb */ -}; - -struct mini_area_header { - uint32_t section_num; /* section number */ - uint32_t section_start_index; /* valid section index */ - uint32_t ah_size; /* the size of struct mini_section_info_header */ - uint32_t sinfo_size; /* the size of struct mini_section_info */ - uint8_t comp_type; /* enum compress_type */ - char comp_suffix[COMP_SUFFIX_MAX]; -}; - -struct mini_section_info { - char s_name[SECTION_NAME_LEN_MAX]; /* section name */ - uint64_t s_paddr; /* physical address */ - uint64_t s_vaddr; /* vritual address */ - uint32_t s_size; /* section size */ - uint32_t s_offset; /* offset in sysdumpdb partition */ -}; - -/*area info */ -#define AREA_NOTE_NAME "notes" -#define AREA_BOOTLOADER_NAME "bootloader" -#define AREA_KERENL_NAME "kernel" -#define AREA_MODEM_NAME "modem" -#define AREA_TOS_NAME "trusty" - -const char *area_name_g[] = { - "notes", /* AREA_NOTE */ - "bootloader", /* AREA_BOOTLOADER */ - "kernel", /* AREA_KERENL */ - "modem", /* AREA_MODEM */ - "trusty", /* AREA_TOS */ - "undefined" /* AREA_END_NUM */ -}; - -enum area_type { - AREA_NOTE = 0, - AREA_BOOTLOADER, - AREA_KERENL, - AREA_MODEM, - AREA_TOS, - - AREA_END_NUM, -}; - -#define FIRST_AREA_OFFSET (MINIDUMP_DATA_OFFSET + \ - sizeof(struct mini_data_header) + \ - AREA_END_NUM * sizeof(struct mini_area_info)) - - -/* compressed type */ -#define COMPRESS_GZIP_SUF ".gz" -#define COMPRESS_ZLIB_SUF ".zlib" - -#define COMPRESS_RECORD_NAME "compress_record_file" -#define COMPRESSED_LEN_MALLOC_MAX (4 * 1024) - -enum compress_type { - NO_COMPRESS = 0, - COMPRESS_GZIP, - COMPRESS_ZLIB, -}; - -const char *compress_suffix_g[] = { - "null", /* NO_COMPRESS */ - COMPRESS_GZIP_SUF, /* COMPRESS_GZIP */ - COMPRESS_ZLIB_SUF, /* COMPRESS_ZLIB */ -}; - -/* note info */ -const char *note_file[NOTE_NUM_MAX] = { - "dump_report.txt", -}; - -#define DUMP_TIME_LEN 32 - -enum error_code { - COMP_ERROR, - WRITE_ERROR, - NO_SPACE_ERROR, - - NO_ERROR = 0, -}; diff --git a/uis7885/hardware/aosp/vendor/sprd/modules/minidump/minidump.h b/uis7885/hardware/aosp/vendor/sprd/modules/minidump/minidump.h deleted file mode 100755 index a0ad53e91ccdd204461adcb747fafccd0bfe65a7..0000000000000000000000000000000000000000 --- a/uis7885/hardware/aosp/vendor/sprd/modules/minidump/minidump.h +++ /dev/null @@ -1,189 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2018 Spreadtrum Communications Inc. - * SPDX-FileCopyrightText: 2018-2022 Unisoc (Shanghai) Technologies Co., Ltd - * SPDX-License-Identifier: LicenseRef-Unisoc-General-1.0 - * - * Copyright 2018 Spreadtrum Communications Inc. - * Copyright 2018-2022 Unisoc (Shanghai) Technologies Co., Ltd. - * Licensed under the Unisoc General Software License, version 1.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * https://www.unisoc.com/en_us/license/UNISOC_GENERAL_LICENSE_V1.0-EN_US - * Software distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OF ANY KIND, either express or implied. - * See the Unisoc General Software License, version 1.0 for more details. - * - */ - -#ifndef __SYSDUMPDB_H__ -#define __SYSDUMPDB_H__ -#if 1 /* only for native app*/ -#include "dirent.h" -#include -#include -#ifdef CONFIG_NAND -#include -#endif -#define DIR_MAX_NUM 5 -#define MINIDUMP_FILE_PATH "/data/minidump" -#define MINIDUMP_FILE_NAME "%02d_minidump_%s" -#define EXCEPTION_FILE_NAME "dump_report.txt" -#define EXCEPTION_FILE_NUM_MAX 3 -#define RESET_COUNT_FILE_NAME "reset_count.txt" -#define REBOOT_HISTORY_FILE_NAME "reboot_history.txt" -#define PARTITION_NAME_MAX_SIZE 128 -#define PARTITION_PATH "/dev/block/by-name/" -#endif /* only for native app end */ - -#define PROC_DIR "/proc" -#define MINIDUMP_INFO_DIR "sprd_minidump" -#define MINIDUMP_INFO_PROC "minidump_info" -#define SYSDUMPDB_LOG_TAG "sysdumpdb" -#define SYSDUMPDB_PARTITION_NAME "sysdumpdb" -#define UBOOT_MAGIC "U2.0" -#define KERNEL_MAGIC "K2.0" -#define APP_MAGIC "A2.0" - -/* minidump description macro */ -#define OSRELEASE_SIZE 300 /* Linux version 4.4.83+ (builder@shhud14) (gcc version 4.9.x 20150123 (prerelease) (GCC) ) #1 SMP PREEMPT Tue Sep 11 12:47:50 CST 2018*/ -#define TIME_SIZE 50 /* 2018-12-12-20-24-24 */ -#define REBOOT_REASON_SIZE 50 /* kernel crash */ -#define CONTENTS_DESC_SIZE (1024 - OSRELEASE_SIZE - TIME_SIZE - REBOOT_REASON_SIZE) - -/* minidump contents description macro */ -#define REGS_NUM_MAX 50 /* max dump regs num in minidump,real num in regs_info_item */ -#define SECTION_NUM_MAX 200 /* max dump section num in minidump */ -#define SECTION_NAME_MAX 40 -#define MINIDUMP_MEM_MAX (SECTION_NUM_MAX + REGS_NUM_MAX + 1) -#define PT_BUF_SIZE (2 * 1024 * 1024) - -#define COMPRESSED_LEN_MALLOC_MAX (4 * 1024) -#define COMPRESSED_LEN_NAME "compressed_info" - - -enum minidump_info_type { - MINIDUMP_INFO_PADDR, - MINIDUMP_INFO_SIZE, -}; -char *minidump_info_proc_name[] = { - "minidump_info_paddr", - "minidump_info_size", -}; - -#define GET_MINIDUMP_INFO_NAME(x) minidump_info_proc_name[(x)] -/* the struct to save minidump info description */ -struct info_desc{ - unsigned long long paddr; - int size; -}; -/* the struct to save dump header info */ -struct dumpdb_header{ - char uboot_magic[4]; /* for uboot lable,type: "U2.0" ,means uboot saved minidump data*/ - char app_magic[4]; /* for app lable,type:"A2.0" ,means app read minidump description ok */ - /* Bit[0] : first boot indicate . 0: first boot ,not init . 1: no first boot , has init - Bit[1] : sysdump status , 0: disable 1:enable - Bit[2] : minidump status, 0:disable 1:enable - Bit[3] : boot from sysdump status , 0:not from sysdump 1:from sysdump; when undefined mode , do not check this status - others : reserved. - */ - int dump_flag; - int reset_mode; /*record which reset mode enter sysdump*/ - struct info_desc minidump_info_desc; -}; - -/* the struct to save minidump contents description (1024Bytes)*/ -struct minidump_data_desc{ - char osrelease[OSRELEASE_SIZE]; - char time[TIME_SIZE]; - char reboot_reason[REBOOT_REASON_SIZE]; - char minidump_data[CONTENTS_DESC_SIZE]; -}; - -#define DEVICE_NAME_YLOG "ylog_buffer" -#define YLOG_BUF_SIZE 1 * 1024 * 1024 -#define EXCEPTION_INFO_SIZE_SHORT 256 -#define EXCEPTION_INFO_SIZE_MID 512 -#define EXCEPTION_INFO_SIZE_LONG 0x2000 -#define MAX_STACK_TRACE_DEPTH 32 -#ifdef __aarch64__ -#define reg_pc pc -#define reg_lr regs[30] -#define reg_sp sp -#define reg_fp regs[29] -#else -#define reg_pc ARM_pc -#define reg_lr ARM_lr -#define reg_sp ARM_sp -#define reg_ip ARM_ip -#define reg_fp ARM_fp -#endif - -struct exception_info_item{ - char kernel_magic[8]; /* "K2.0" :make sure excep data valid */ - char exception_serialno[EXCEPTION_INFO_SIZE_SHORT]; - char exception_kernel_version[EXCEPTION_INFO_SIZE_MID]; - char exception_reboot_reason[EXCEPTION_INFO_SIZE_SHORT]; - char exception_panic_reason[EXCEPTION_INFO_SIZE_SHORT]; - char exception_time[EXCEPTION_INFO_SIZE_SHORT]; - char exception_file_info[EXCEPTION_INFO_SIZE_SHORT]; - int exception_task_id; - char exception_task_family[EXCEPTION_INFO_SIZE_SHORT]; - char exception_pc_symbol[EXCEPTION_INFO_SIZE_SHORT]; - char exception_stack_info[EXCEPTION_INFO_SIZE_LONG]; -}; -enum reg_arch_type { - ARM, - ARM64, - X86, - X86_64 -}; -struct regs_info_native{ - int arch; /* 32bit reg unsigned int and 64bit unsigned long, we need use type to mark*/ - int num; /* the num of regs will save memery amount */ - unsigned long long vaddr; /* struct pt_regs vaddr */ - unsigned long long paddr; /* struct pt_regs paddr */ - int size; /* sizeof(struct pt_regs) */ - int size_comp; /* size after compressed */ -}; - -struct regs_memory_info_native{ - unsigned long long reg_vaddr[REGS_NUM_MAX - 1]; /* if vaddr invalid set it as 0*/ - unsigned long long reg_paddr[REGS_NUM_MAX - 1]; /* if paddr invalid set it as 0*/ - int per_reg_memory_size; /* memory size amount reg */ - int per_mem_size_comp[REGS_NUM_MAX - 1]; /* size after compressed */ - int valid_reg_num; /* maybe some regs value not a valid addr */ - int size; /* memory size amount reg */ -}; -struct section_info_native{ - char section_name[SECTION_NAME_MAX]; - /*Get teh value in kernel use to record elfhdr info in uboot*/ - unsigned long long section_start_vaddr; - unsigned long long section_end_vaddr; - /*Get the value in kernel by __pa use to get memory contents in uboot */ - unsigned long long section_start_paddr; - unsigned long long section_end_paddr; - int section_size; - int section_size_comp; /* size after compressed */ -}; - -struct section_info_total_native{ - struct section_info_native section_info_native[SECTION_NUM_MAX]; - int total_size; - int total_num; -}; - -/* the struct to save minidump all infomation */ -struct minidump_info_native{ - char kernel_magic[6]; /* make sure minidump data valid */ - struct regs_info_native regs_info_native; /* | struct pt_regs | */ - struct regs_memory_info_native regs_memory_info_native; /* | memory amount regs | , need paddr and size, if paddr invalid set it as 0 */ - struct section_info_total_native section_info_total_native; /* | sections | , text,rodata,page_table ....,may be logbuf in here */ - int minidump_elfhdr_size; /* minidump elfhdr data size: update in uboot */ - int minidump_elfhdr_size_comp; /* minidump elfhdr data size,after compressed */ - struct minidump_data_desc desc; /* minidump contents description */ - int minidump_data_size; /* minidump data total size: regs_all_size + reg_memory_all_size + section_all_size */ - int compressed; /* indicate if minidump data compressed */ - struct exception_info_item exception_info; /* exception info */ -}; - -#endif /* __SYSDUMPDB_H__ */ diff --git a/uis7885/hardware/aosp/wrapper/BUILD.gn b/uis7885/hardware/aosp/wrapper/BUILD.gn index 34d688e6b563973c25c745576891a3e292f592cc..7b65eba2741dc77aa9067bbe6094e7403b6f688d 100755 --- a/uis7885/hardware/aosp/wrapper/BUILD.gn +++ b/uis7885/hardware/aosp/wrapper/BUILD.gn @@ -21,3 +21,4 @@ ohos_prebuilt_shared_library("utils_wrapper") { subsystem_name = "${SUBSYSTEM_NAME}" part_name = "${PART_NAME}" } + diff --git a/uis7885/hardware/aosp/wrapper/lib/libutils_wrapper.z.so b/uis7885/hardware/aosp/wrapper/lib/libutils_wrapper.z.so index 5302a0ddda4e731e947621b9647e528b68222d9c..c6315db2a069030bbb1f03ebf6b64da97b34c59e 100755 Binary files a/uis7885/hardware/aosp/wrapper/lib/libutils_wrapper.z.so and b/uis7885/hardware/aosp/wrapper/lib/libutils_wrapper.z.so differ diff --git a/uis7885/hardware/bundle.json b/uis7885/hardware/bundle.json index de3bc713a99747723bb6393091822fcc76978d82..2c37e11cec380ee6f9f355642033d9e2cfcc8c7f 100644 --- a/uis7885/hardware/bundle.json +++ b/uis7885/hardware/bundle.json @@ -58,40 +58,7 @@ "//device/soc/sprd/uis7885/hardware/aosp/hardware/interfaces/graphics/common:common-impl", "//device/soc/sprd/uis7885/hardware/omx_il:lib_omx" ], - "inner_kits": [ - { - "header": { - "header_base": "//device/soc/sprd/uis7885/hardware/aosp/system/memory/libdmabufheap/include", - "header_files": [ - "BufferAllocator/BufferAllocator.h", - "BufferAllocator/BufferAllocatorWrapper.h", - "BufferAllocator/dmabufheap-defs.h" - ] - }, - "name": "//device/soc/sprd/uis7885/hardware/aosp/system/memory/libdmabufheap:libaosp_dmabufheap" - }, - { - "header": { - "header_base": "//device/soc/sprd/uis7885/hardware/aosp/system/memory/libion/include", - "header_files": [ - "ion/ion.h" - ] - }, - "name": "//device/soc/sprd/uis7885/hardware/aosp/system/memory/libion:libion" - }, - { - "header": { - "header_base": "//device/soc/sprd/uis7885/hardware/aosp/system/memory/libmemion/include", - "header_files": [ - "C2UnisocDmaBuffer.h", - "dmaphyaddr-defs.h", - "VideoMemAllocator.h" - ] - }, - "name": "//device/soc/sprd/uis7885/hardware/aosp/system/memory/libmemion:libmemion" - } - ], "test": [] } } -} \ No newline at end of file +} diff --git a/uis7885/hardware/camera/BUILD.gn b/uis7885/hardware/camera/BUILD.gn index 15e9507d99bf7604326001056a2356ccd0bf9b31..26e766bbc5ff6eeadc881ffb2d2c53cd61cdd496 100644 --- a/uis7885/hardware/camera/BUILD.gn +++ b/uis7885/hardware/camera/BUILD.gn @@ -17,23 +17,14 @@ import("//device/soc/sprd/uis7885/soc.gni") group("camera_group") { deps = [ - ":camv4l2adapter", - #":jpeg_hw_sprd", + ":jpeg_hw_sprd", ] } -ohos_prebuilt_shared_library("camv4l2adapter") { - source = "lib/libcamv4l2adapter.z.so" - install_enable = true - install_images = [ chipset_base_dir ] - subsystem_name = "${SUBSYSTEM_NAME}" - part_name = "${PART_NAME}" +ohos_prebuilt_shared_library("jpeg_hw_sprd") { + source = "lib/libjpeg_hw_sprd.z.so" + install_enable = true + install_images = [ chipset_base_dir ] + subsystem_name = "${SUBSYSTEM_NAME}" + part_name = "${PART_NAME}" } - -# ohos_prebuilt_shared_library("jpeg_hw_sprd") { -# source = "lib/libjpeg_hw_sprd.z.so" -# install_enable = true -# install_images = [ chipset_base_dir ] -# subsystem_name = "${SUBSYSTEM_NAME}" -# part_name = "${PART_NAME}" -# } diff --git a/uis7885/hardware/camera/lib/libcamv4l2adapter.z.so b/uis7885/hardware/camera/lib/libcamv4l2adapter.z.so deleted file mode 100755 index f330bc42a9ea0e84274a5b91a7eded379b9f2b85..0000000000000000000000000000000000000000 Binary files a/uis7885/hardware/camera/lib/libcamv4l2adapter.z.so and /dev/null differ diff --git a/uis7885/hardware/display/BUILD.gn b/uis7885/hardware/display/BUILD.gn index ce12fee5616ee146b9f75adb7f4bf70111df8506..a76edcb88cef8a14674f0d834003662fb1a3db80 100755 --- a/uis7885/hardware/display/BUILD.gn +++ b/uis7885/hardware/display/BUILD.gn @@ -22,39 +22,31 @@ group("display_buffer_model") { } ohos_prebuilt_shared_library("libdisplay_buffer_vdi_impl") { - source = "lib/libdisplay_buffer_vdi_impl.z.so" + source = "lib/libdisplay_buffer_vdi_impl.z.so" + install_enable = true + install_images = [ chipset_base_dir ] + innerapi_tags = [ "chipsetsdk" ] + subsystem_name = "soc_sprd" + part_name = "soc_uis7885" +} + +ohos_prebuilt_shared_library("display_gralloc") { + source = "lib/libdisplay_gralloc.z.so" install_enable = true install_images = [ chipset_base_dir ] - innerapi_tags = [ "chipsetsdk" ] subsystem_name = "soc_sprd" part_name = "soc_uis7885" } -ohos_prebuilt_shared_library( "display_gralloc") { - source = "lib/libdisplay_gralloc.z.so" +ohos_prebuilt_shared_library("libdisplay_composer_vdi_impl") { + source = "lib/libdisplay_composer_vdi_impl.z.so" install_enable = true install_images = [ chipset_base_dir ] subsystem_name = "soc_sprd" part_name = "soc_uis7885" } -group("display_composer_model") { - deps = [ - ":display_device", - ":display_gfx", - ":libdisplay_composer_vdi_impl", - ] -} - -ohos_prebuilt_shared_library( "libdisplay_composer_vdi_impl") { - source = "lib/libdisplay_composer_vdi_impl.z.so" - install_enable = true - install_images = [ chipset_base_dir ] - subsystem_name = "soc_sprd" - part_name = "soc_uis7885" -} - -ohos_prebuilt_shared_library( "display_gfx") { +ohos_prebuilt_shared_library("display_gfx") { source = "lib/libdisplay_gfx.z.so" install_enable = true install_images = [ chipset_base_dir ] @@ -62,12 +54,20 @@ ohos_prebuilt_shared_library( "display_gfx") { part_name = "soc_uis7885" } -ohos_prebuilt_shared_library( "display_device") { +ohos_prebuilt_shared_library("display_device") { source = "lib/libdisplay_device.z.so" - symlink_target_name = [ "libdisplay_layer.z.so" ] install_enable = true install_images = [ chipset_base_dir ] subsystem_name = "soc_sprd" part_name = "soc_uis7885" } + +group("display_composer_model") { + deps = [ + ":display_device", + ":display_gfx", + ":libdisplay_composer_vdi_impl", + "//third_party/libdrm:libdrm", + ] +} diff --git a/uis7885/hardware/display/lib/libdisplay_buffer_vdi_impl.z.so b/uis7885/hardware/display/lib/libdisplay_buffer_vdi_impl.z.so index 8f19dec7eb5ddc722a7c6cfdb4f8583c34714315..cf418e8089848bb93cd65555b07724ec4a510bfa 100755 Binary files a/uis7885/hardware/display/lib/libdisplay_buffer_vdi_impl.z.so and b/uis7885/hardware/display/lib/libdisplay_buffer_vdi_impl.z.so differ diff --git a/uis7885/hardware/display/lib/libdisplay_composer_vdi_impl.z.so b/uis7885/hardware/display/lib/libdisplay_composer_vdi_impl.z.so index d067ad367585ceb9069b56851dba52675e0d256b..336d46b82b8c00ab86dab8467c66eda938d3267a 100755 Binary files a/uis7885/hardware/display/lib/libdisplay_composer_vdi_impl.z.so and b/uis7885/hardware/display/lib/libdisplay_composer_vdi_impl.z.so differ diff --git a/uis7885/hardware/display/lib/libdisplay_device.z.so b/uis7885/hardware/display/lib/libdisplay_device.z.so index 643d3926c1369343cd32d38a01789b3c5600366d..a738cda4d14145f2f0274f9416b97347e2fcdc95 100755 Binary files a/uis7885/hardware/display/lib/libdisplay_device.z.so and b/uis7885/hardware/display/lib/libdisplay_device.z.so differ diff --git a/uis7885/hardware/display/lib/libdisplay_gfx.z.so b/uis7885/hardware/display/lib/libdisplay_gfx.z.so index 51814f65a5e944d5ab239b9d90f9a38e8d401572..f8b2be6e7ffd7d93dc7545dc224b501d2aff90fa 100755 Binary files a/uis7885/hardware/display/lib/libdisplay_gfx.z.so and b/uis7885/hardware/display/lib/libdisplay_gfx.z.so differ diff --git a/uis7885/hardware/display/lib/libdisplay_gralloc.z.so b/uis7885/hardware/display/lib/libdisplay_gralloc.z.so index 7a1fcc36239311a3ac696386ff51ec3f7d59a1c2..d5f933fb6fbd3bd9dbf6cec2d8ffa4b5fdd269e6 100755 Binary files a/uis7885/hardware/display/lib/libdisplay_gralloc.z.so and b/uis7885/hardware/display/lib/libdisplay_gralloc.z.so differ diff --git a/uis7885/hardware/location/BUILD.gn b/uis7885/hardware/location/BUILD.gn index 03bf6410daa97bed841fe995f22d4bd7e29ebdf2..90a99ae21b574b8dc25febf1825a901920eca9a9 100755 --- a/uis7885/hardware/location/BUILD.gn +++ b/uis7885/hardware/location/BUILD.gn @@ -20,23 +20,23 @@ import("//device/soc/sprd/uis7885/soc.gni") group("location_group") { deps = [ ":gnssmodem", - #":libasnsupl", - #":libgnssmgt", - #":libgps.default", - #":liblcsagent", - #":liblcscp", - #":liblcsmgt", - #":liblcsmos", - #":liblcspkcs15", - #":liblcssc", - #":liblcswbxml2", - #":libsupl", + ":libasnsupl", + ":libgnssmgt", + ":libgps.default", + ":liblcsagent", + ":liblcscp", + ":liblcsmgt", + ":liblcsmos", + ":liblcspkcs15", + ":liblcssc", + ":liblcswbxml2", + ":libsupl", ":sprd_gnss_config_xml", ":sprd_gnss_spirentroot_cer", ":sprd_gnss_supl_xml", ":sprd_gnss_prop_ini", "gnss:vendorGnssAdapter", -# "test:gnss_test", + # "test:gnss_test", ] } @@ -50,105 +50,105 @@ ohos_prebuilt_executable("gnssmodem") { } -# ohos_prebuilt_shared_library("libasnsupl") { -# source = "lib64/libasnsupl.z.so" -# install_enable = true -# install_images = [ chipset_base_dir ] -# module_install_dir = "lib64" -# subsystem_name = "${SUBSYSTEM_NAME}" -# part_name = "${PART_NAME}" +ohos_prebuilt_shared_library("libasnsupl") { + source = "lib64/libasnsupl.z.so" + install_enable = true + install_images = [ chipset_base_dir ] + module_install_dir = "lib64" + subsystem_name = "${SUBSYSTEM_NAME}" + part_name = "${PART_NAME}" -# } - -# ohos_prebuilt_shared_library("libgnssmgt") { -# source = "lib64/libgnssmgt.z.so" -# install_enable = true -# install_images = [ chipset_base_dir ] -# module_install_dir = "lib64" -# subsystem_name = "${SUBSYSTEM_NAME}" -# part_name = "${PART_NAME}" +} + +ohos_prebuilt_shared_library("libgnssmgt") { + source = "lib64/libgnssmgt.z.so" + install_enable = true + install_images = [ chipset_base_dir ] + module_install_dir = "lib64" + subsystem_name = "${SUBSYSTEM_NAME}" + part_name = "${PART_NAME}" -# } - -# ohos_prebuilt_shared_library("libgps.default") { -# source = "lib64/libgps.default.z.so" -# install_enable = true -# install_images = [ chipset_base_dir ] -# module_install_dir = "lib64" -# subsystem_name = "${SUBSYSTEM_NAME}" -# part_name = "${PART_NAME}" +} + +ohos_prebuilt_shared_library("libgps.default") { + source = "lib64/libgps.default.z.so" + install_enable = true + install_images = [ chipset_base_dir ] + module_install_dir = "lib64" + subsystem_name = "${SUBSYSTEM_NAME}" + part_name = "${PART_NAME}" -# } - -# ohos_prebuilt_shared_library("liblcsagent") { -# source = "lib64/liblcsagent.z.so" -# install_enable = true -# install_images = [ chipset_base_dir ] -# module_install_dir = "lib64" -# subsystem_name = "${SUBSYSTEM_NAME}" -# part_name = "${PART_NAME}" +} + +ohos_prebuilt_shared_library("liblcsagent") { + source = "lib64/liblcsagent.z.so" + install_enable = true + install_images = [ chipset_base_dir ] + module_install_dir = "lib64" + subsystem_name = "${SUBSYSTEM_NAME}" + part_name = "${PART_NAME}" -# } - -# ohos_prebuilt_shared_library("liblcscp") { -# source = "lib64/liblcscp.z.so" -# install_enable = true -# install_images = [ chipset_base_dir ] -# module_install_dir = "lib64" -# subsystem_name = "${SUBSYSTEM_NAME}" -# part_name = "${PART_NAME}" +} + +ohos_prebuilt_shared_library("liblcscp") { + source = "lib64/liblcscp.z.so" + install_enable = true + install_images = [ chipset_base_dir ] + module_install_dir = "lib64" + subsystem_name = "${SUBSYSTEM_NAME}" + part_name = "${PART_NAME}" -# } - -# ohos_prebuilt_shared_library("liblcsmgt") { -# source = "lib64/liblcsmgt.z.so" -# install_enable = true -# install_images = [ chipset_base_dir ] -# module_install_dir = "lib64" -# subsystem_name = "${SUBSYSTEM_NAME}" -# part_name = "${PART_NAME}" +} + +ohos_prebuilt_shared_library("liblcsmgt") { + source = "lib64/liblcsmgt.z.so" + install_enable = true + install_images = [ chipset_base_dir ] + module_install_dir = "lib64" + subsystem_name = "${SUBSYSTEM_NAME}" + part_name = "${PART_NAME}" -# } - -# ohos_prebuilt_shared_library("liblcsmos") { -# source = "lib64/liblcsmos.z.so" -# install_enable = true -# install_images = [ chipset_base_dir ] -# module_install_dir = "lib64" -# subsystem_name = "${SUBSYSTEM_NAME}" -# part_name = "${PART_NAME}" +} + +ohos_prebuilt_shared_library("liblcsmos") { + source = "lib64/liblcsmos.z.so" + install_enable = true + install_images = [ chipset_base_dir ] + module_install_dir = "lib64" + subsystem_name = "${SUBSYSTEM_NAME}" + part_name = "${PART_NAME}" -# } - -# ohos_prebuilt_shared_library("liblcspkcs15") { -# source = "lib64/liblcspkcs15.z.so" -# install_enable = true -# install_images = [ chipset_base_dir ] -# module_install_dir = "lib64" -# subsystem_name = "${SUBSYSTEM_NAME}" -# part_name = "${PART_NAME}" +} + +ohos_prebuilt_shared_library("liblcspkcs15") { + source = "lib64/liblcspkcs15.z.so" + install_enable = true + install_images = [ chipset_base_dir ] + module_install_dir = "lib64" + subsystem_name = "${SUBSYSTEM_NAME}" + part_name = "${PART_NAME}" -# } - -# ohos_prebuilt_shared_library("liblcssc") { -# source = "lib64/liblcssc.z.so" -# install_enable = true -# install_images = [ chipset_base_dir ] -# module_install_dir = "lib64" -# subsystem_name = "${SUBSYSTEM_NAME}" -# part_name = "${PART_NAME}" +} + +ohos_prebuilt_shared_library("liblcssc") { + source = "lib64/liblcssc.z.so" + install_enable = true + install_images = [ chipset_base_dir ] + module_install_dir = "lib64" + subsystem_name = "${SUBSYSTEM_NAME}" + part_name = "${PART_NAME}" -# } - -# ohos_prebuilt_shared_library("liblcswbxml2") { -# source = "lib64/liblcswbxml2.z.so" -# install_enable = true -# install_images = [ chipset_base_dir ] -# module_install_dir = "lib64" -# subsystem_name = "${SUBSYSTEM_NAME}" -# part_name = "${PART_NAME}" +} + +ohos_prebuilt_shared_library("liblcswbxml2") { + source = "lib64/liblcswbxml2.z.so" + install_enable = true + install_images = [ chipset_base_dir ] + module_install_dir = "lib64" + subsystem_name = "${SUBSYSTEM_NAME}" + part_name = "${PART_NAME}" -# } +} ohos_prebuilt_shared_library("librilutils") { source = "lib64/librilutils.z.so" @@ -160,15 +160,15 @@ ohos_prebuilt_shared_library("librilutils") { } -# ohos_prebuilt_shared_library("libsupl") { -# source = "lib64/libsupl.z.so" -# install_enable = true -# install_images = [ chipset_base_dir ] -# module_install_dir = "lib64" -# subsystem_name = "${SUBSYSTEM_NAME}" -# part_name = "${PART_NAME}" +ohos_prebuilt_shared_library("libsupl") { + source = "lib64/libsupl.z.so" + install_enable = true + install_images = [ chipset_base_dir ] + module_install_dir = "lib64" + subsystem_name = "${SUBSYSTEM_NAME}" + part_name = "${PART_NAME}" -# } +} ohos_prebuilt_etc("sprd_gnss_config_xml") { source = "etc/config.xml" diff --git a/uis7885/hardware/location/gnss/BUILD.gn b/uis7885/hardware/location/gnss/BUILD.gn index 9aaa9a174adea0b1ad98483399c6c483343a2b45..7f83495f928e6bab71fe4f1cc5cacf616fef5e23 100755 --- a/uis7885/hardware/location/gnss/BUILD.gn +++ b/uis7885/hardware/location/gnss/BUILD.gn @@ -4,10 +4,9 @@ import("//device/soc/sprd/uis7885/soc.gni") ohos_prebuilt_shared_library("vendorGnssAdapter") { source = "lib/vendorGnssAdapter.so" + module_install_dir = "lib64" install_enable = true install_images = [ chipset_base_dir ] - module_install_dir = "lib64" subsystem_name = "${SUBSYSTEM_NAME}" part_name = "${PART_NAME}" } - diff --git a/uis7885/hardware/location/gnss/lib/vendorGnssAdapter.so b/uis7885/hardware/location/gnss/lib/vendorGnssAdapter.so index e9906e2c198e42d51547b62242423aa9b5045d33..24d667cdc47fa48803628af47dd3a57dcd3e5d03 100755 Binary files a/uis7885/hardware/location/gnss/lib/vendorGnssAdapter.so and b/uis7885/hardware/location/gnss/lib/vendorGnssAdapter.so differ diff --git a/uis7885/hardware/location/gnss/vendorGnssAdapter.h b/uis7885/hardware/location/gnss/vendorGnssAdapter.h deleted file mode 100755 index 2e1f7a306ff3b7dd2b6cdd26d2734b70612ee032..0000000000000000000000000000000000000000 --- a/uis7885/hardware/location/gnss/vendorGnssAdapter.h +++ /dev/null @@ -1,382 +0,0 @@ -/* - * Copyright 2023 Shenzhen Kaihong DID Co., Ltd.. - * 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. - */ - -#include "location_vendor_lib.h" -#include "location_log.h" -//#define GNSS OHOS::Location::GNSS -#define GPS_MAX_SVS 32 -#define GNSS_MAX_SVS 64 - -enum DL_RET { - SO_OK = 0, - LOAD_NOK = -1, - FUNC_NOK = -2, -}; - -const int AGMI = 1; -const int GMI = 2; -const int GVI = 3; - -typedef int64_t GpsUtcTime; -typedef struct { - size_t size; - uint16_t flags; - double latitude; - double longitude; - double altitude; - float speed; - float bearing; - float accuracy; - GpsUtcTime timestamp; - float veraccuracy; - float speedaccuracy; - float bearaccuracy; -} GpsLocation; - -typedef struct { - size_t size; - int prn; - float snr; - float elevation; - float azimuth; -} GpsSvInfo; - -typedef struct { - size_t size; - GpsSvInfo sv_list[GPS_MAX_SVS]; - uint32_t ephemeris_mask; - uint32_t almanac_mask; - uint32_t used_in_fix_mask; -} GpsSvStatus; - -typedef uint8_t GnssConstellationType; -typedef uint8_t GnssSvFlags; - -typedef struct { - size_t size; - int16_t svid; - GnssConstellationType constellation; - float c_n0_dbhz; - float elevation; - float zaimuth; - GnssSvFlags flags; - float carrier_freq; -} GnssSvInfo; - -typedef struct { - size_t size; - int numb_svs; - GnssSvInfo gnss_sv_list[GNSS_MAX_SVS]; -} GnssSvStatus; - -typedef uint16_t GpsStatusValue; - -typedef struct { - size_t size; - GpsStatusValue status; -} GpsStatus; - -typedef struct { - size_t size; - uint16_t year_of_hw; -} GnssSystemInfo; - -//read data; -GpsLocation GPSloc; -GpsSvStatus SvState; - -typedef unsigned long int pthread_t; - -typedef void (*gps_location_callback)(GpsLocation *location); -typedef void (*gps_status_callback)(GpsStatus *status); -typedef void (*gps_sv_status_callback)(GpsSvStatus *sv_info); -typedef void (*gnss_sv_status_callback)(GnssSvStatus *sv_info); -typedef void (*gps_nmea_callback)(GpsUtcTime timestamp, const char *nmea, - int length); -typedef void (*gps_set_capabilities)(uint32_t capbilities); -typedef void (*gps_acquire_wakelock)(); -typedef void (*gps_release_wakelock)(); -typedef void (*gps_request_utc_time)(); -typedef pthread_t (*gps_create_thread)(const char *name, void (*start)(void *), - void *arg); -typedef void (*gnss_set_system_info)(const GnssSystemInfo *info); - -/* sprd so callback */ -static void location_callback(GpsLocation *location); -static void status_callback(GpsStatus *status); -static void sv_status_callback(GpsSvStatus *sv_status); -static void nmea_callback(GpsUtcTime timestamp, const char *nmea, int length); -static void set_capabilities_callback(uint32_t capabilities); -static void acquire_wakelock_callback(); -static void release_wakelock_callback(); -static void request_utc_time_callback(); -static void gnss_set_system_info_test(const GnssSystemInfo *info); -static void gnss_sv_status_callback_test(GnssSvStatus *sv_info); -pthread_t create_thread_callback(const char *name, void (*start)(void *), - void *arg); -typedef struct { - size_t size; - gps_location_callback location_cb; - gps_status_callback status_cb; - gps_sv_status_callback sv_status_cb; - gps_nmea_callback nmea_cb; - gps_set_capabilities set_capabilities_cb; - gps_acquire_wakelock acquire_wakelock_cb; - gps_release_wakelock release_wakelock_cb; - gps_create_thread create_thread_cb; - gps_request_utc_time request_utc_time_cb; - gnss_set_system_info set_system_info_cb; - gnss_sv_status_callback gnss_sv_status_cb; -} GpsCallbacks; // sprd callback; - -GpsCallbacks sGpsCallbacks = {sizeof(GpsCallbacks), - location_callback, - status_callback, - sv_status_callback, - nmea_callback, - set_capabilities_callback, - acquire_wakelock_callback, - release_wakelock_callback, - create_thread_callback, - request_utc_time_callback, - gnss_set_system_info_test, - gnss_sv_status_callback_test}; - -typedef int (*pGnssmgt_init)(GpsCallbacks *callbacks); -typedef int (*pGnssmgt_start)(void); -typedef int (*pGnssmgt_stop)(void); -typedef int (*pGnssmgt_cleanup)(void); - -/* AGPS PART */ -typedef uint16_t ApnIpType; -#define APN_IP_INVALID 0 -#define APN_IP_IPV4 1 -#define APN_IP_IPV6 2 -#define APN_IP_IPV4V6 3 - -typedef uint16_t AGpsSetIDType; -#define AGPS_SETID_TYPE_NONE 0 -#define AGPS_SETID_TYPE_IMSI 1 -#define AGPS_SETID_TYPE_MSISDN 2 - -typedef uint16_t AGpsRefLocationType; -#define AGPS_REF_LOCATION_TYPE_GSM_CELLID 1 -#define AGPS_REF_LOCATION_TYPE_UMTS_CELLID 2 -#define AGPS_REF_LOCATION_TYPE_MAC 3 -#define AGPS_REF_LOCATION_TYPE_LTE_CELLID 4 -#define AGPS_REF_LOCATION_TYPE_LTE_CELLID_EX 5 -#define AGPS_REF_LOCATION_TYPE_NR_CELLID 8 - -/* Deprecated, to be removed in the next Android release. */ -#define AGPS_REG_LOCATION_TYPE_MAC 3 - -/** Network types for update_network_state "type" parameter */ -#define AGPS_RIL_NETWORK_TYPE_MOBILE 0 -#define AGPS_RIL_NETWORK_TYPE_WIFI 1 -#define AGPS_RIL_NETWORK_TYPE_MOBILE_MMS 2 -#define AGPS_RIL_NETWORK_TYPE_MOBILE_SUPL 3 -#define AGPS_RIL_NETWORK_TTYPE_MOBILE_DUN 4 -#define AGPS_RIL_NETWORK_TTYPE_MOBILE_HIPRI 5 -#define AGPS_RIL_NETWORK_TTYPE_WIMAX 6 - -/** Requested operational mode for GPS operation. */ -typedef uint32_t GpsPositionMode; -/* IMPORTANT: Note that the following values must match -* constants in GpsLocationProvider.java. */ -/** Mode for running GPS standalone (no assistance). */ -#define GPS_POSITION_MODE_STANDALONE 0 -/** AGPS MS-Based mode. */ -#define GPS_POSITION_MODE_MS_BASED 1 -/** -* AGPS MS-Assisted mode. This mode is not maintained by the platform anymore. -* It is strongly recommended to use GPS_POSITION_MODE_MS_BASED instead. -*/ -#define GPS_POSITION_MODE_MS_ASSISTED 2 - -/** Requested recurrence mode for GPS operation. */ -typedef uint32_t GpsPositionRecurrence; -/* IMPORTANT: Note that the following values must match -* constants in GpsLocationProvider.java. */ -/** Receive GPS fixes on a recurring basis at a specified period. */ -#define GPS_POSITION_RECURRENCE_PERIODIC 0 -/** Request a single shot GPS fix. */ -#define GPS_POSITION_RECURRENCE_SINGLE 1 - - -/** AGPS type */ -typedef uint16_t AGpsType; -#define AGPS_TYPE_SUPL 1 -#define AGPS_TYPE_C2K 2 - -/** AGPS status event values. */ -typedef uint16_t AGpsStatusValue; -/** GPS requests data connection for AGPS. */ -#define GPS_REQUEST_AGPS_DATA_CONN 1 -/** GPS releases the AGPS data connection. */ -#define GPS_RELEASE_AGPS_DATA_CONN 2 -/** AGPS data connection initiated */ -#define GPS_AGPS_DATA_CONNECTED 3 -/** AGPS data connection completed */ -#define GPS_AGPS_DATA_CONN_DONE 4 -/** AGPS data connection failed */ -#define GPS_AGPS_DATA_CONN_FAILED 5 - -typedef struct { - /** set to sizeof(AGpsStatus) */ - size_t size; - - AGpsType type; - AGpsStatusValue status; - - /** - * Must be set to a valid IPv4 address if the field 'addr' contains an IPv4 - * address, or set to INADDR_NONE otherwise. - */ - uint32_t ipaddr; - - /** - * Must contain the IPv4 (AF_INET) or IPv6 (AF_INET6) address to report. - * Any other value of addr.ss_family will be rejected. - */ - // struct sockaddr_storage addr; -} AGpsStatus; - -/** - * Callback with AGPS status information. Can only be called from a thread - * created by create_thread_cb. - */ -typedef void (* agps_status_callback)(AGpsStatus* status); -typedef void (*agps_ril_request_set_id)(uint32_t flags); -typedef void (*agps_ril_request_ref_loc)(uint32_t flags); -typedef pthread_t (* gps_create_thread)(const char* name,void (*start)(void *),void* arg); - -/* CellID for 2G, 3G and LTE, used in AGPS. */ -typedef struct { - AGpsRefLocationType type; - /** Mobile Country Code. */ - uint16_t mcc; - /** Mobile Network Code .*/ - uint16_t mnc; - /** Location Area Code in 2G, 3G and LTE. In 3G lac is discarded. In LTE, - * lac is populated with tac, to ensure that we don't break old clients that - * might rely in the old (wrong) behavior. - */ - uint16_t lac; - /** Cell id in 2G. Utran Cell id in 3G. Cell Global Id EUTRA in LTE. */ - uint32_t cid; - - /** Tracking Area Code in LTE. */ - uint16_t tac; - /** Physical Cell id in LTE (not used in 2G and 3G) */ - uint16_t pcid; -} AGpsRefLocationCellID; - -typedef struct { - uint8_t mac[6]; -} AGpsRefLocationMac; - -typedef struct { - /** Mobile Country Code. */ - uint16_t mcc; - /** Mobile Network Code .*/ - uint16_t mnc; - /** Cell id in 2G. Utran Cell id in 3G. Cell Global Id EUTRA in LTE. */ - uint64_t cid; - /** Tracking Area Code in LTE. */ - uint32_t tac; - /** Physical Cell id in LTE (not used in 2G and 3G) */ - uint16_t pcid; - /** ARFCN used for SSB or CSI-RS measurements, 0..3279165. */ - uint32_t arfcn_nr; -} AGpsRefLocationCellID_NR_t; - -/** Represents ref locations */ -typedef struct { - AGpsRefLocationType type; - union { - AGpsRefLocationCellID cellID; - AGpsRefLocationMac mac; - AGpsRefLocationCellID_NR_t cellID_nr; - } u; -} AGpsRefLocation; - -/** Callback structure for the AGPS interface. */ -typedef struct { - agps_status_callback status_cb; - gps_create_thread create_thread_cb; -} AGpsCallbacks; - -typedef struct { - agps_ril_request_set_id request_setid; - agps_ril_request_ref_loc request_refloc; - gps_create_thread create_thread_cb; -} AGpsRilCallbacks; - -/* AGMI interface*/ -void gnssmgt_agps_ril_setRefLoc( - const AGpsRefLocation *refLocation, size_t szStruct); -void gnssmgt_agps_ril_setSetID(AGpsSetIDType type, const char *setid); - -/* sprd so callback */ -static void agnss_status_callback(AGpsStatus* status); -static void agnss_ril_request_set_id_callback(uint32_t flags); -static void agnss_ril_request_ref_loc_callback(uint32_t flags); -pthread_t agnss_create_thread_cb(const char* name, void (*start)(void *), void* arg); - -typedef int (*pAGnssmgt_init)(AGpsCallbacks* callbacks); -typedef int (*pAGnssmgt_setPosMode)( - GpsPositionMode mode, - GpsPositionRecurrence recurrence, - uint32_t minInterval, - uint32_t prefAccuracy, - uint32_t prefTime); -typedef int (*pAGnssmgt_agps_closeConn)(void); -typedef int (*pAGnssmgt_agps_openFailed)(void); -typedef int (*pAGnssmgt_set_server)(AGpsType type, const char* hostname, int port); -typedef int (*pAGnssmgt_open_conn)(const char* apn); -typedef int (*pAGnssmgt_agps_openWithApnIpType)(const char *apn, ApnIpType apnIpType); -typedef int (*pAGnssmgt_ril_init)(AGpsRilCallbacks *callbacks); -typedef int (*pAGnssmgt_ril_ref_location)(const AGpsRefLocation *refLocation, size_t szStruct); -typedef int (*pAGnssmgt_set_setid)(AGpsSetIDType type, const char *setid); -typedef int (*pAGnssmgt_set_RefLoc)(const AGpsRefLocation *refLocation, size_t szStruct); -typedef int (*pAGnssmgt_updateNwState)(int connected, int type, int roaming, const char* extraInfo); -typedef int (*pAGnssmgt_updateNwAvailability)(int avaiable, const char *apn); -typedef int (*pAGnssmgt_ril_set_id)(AGpsSetIDType type, const char *setid); -typedef int (*pAGnssmgt_ril_update_network_availability)(int avaiable, const char *apn); -typedef int (*pAGnssmgt_ril_update_network_state)(int connected, int type, int roaming, const char* extraInfo); - -pGnssmgt_init gps_init=NULL; -pGnssmgt_start gps_start=NULL; -pGnssmgt_stop gps_stop=NULL; -pGnssmgt_cleanup gps_cleanup=NULL; -pAGnssmgt_init agps_init=NULL; -pAGnssmgt_setPosMode agps_setPosMode=NULL; -pAGnssmgt_set_server agps_set_server=NULL; -pAGnssmgt_open_conn agps_open_conn=NULL; -pAGnssmgt_updateNwState agps_updateNwState=NULL; -pAGnssmgt_updateNwAvailability agps_updateNwAvailability=NULL; -pAGnssmgt_set_setid agps_set_setid=NULL; -pAGnssmgt_set_RefLoc agps_set_RefLoc=NULL; -pAGnssmgt_agps_closeConn agps_close_conn=NULL; -pAGnssmgt_agps_openFailed agps_open_failed=NULL; -pAGnssmgt_agps_openWithApnIpType agps_open_with_apn=NULL; -pAGnssmgt_ril_init agps_ril_init=NULL; -pAGnssmgt_ril_ref_location agps_ril_ref_location=NULL; -pAGnssmgt_ril_set_id agps_ril_set_id=NULL; -pAGnssmgt_ril_update_network_availability agps_ril_net_ability=NULL; -pAGnssmgt_ril_update_network_state agps_ril_net_state=NULL; - - - diff --git a/uis7885/hardware/omx_il/components/BUILD.gn b/uis7885/hardware/omx_il/components/BUILD.gn index 0836418b642d5edabeb6ffabf42e29593aaa7474..0f741db2c2ee78ee929a777563c1769b966081d3 100644 --- a/uis7885/hardware/omx_il/components/BUILD.gn +++ b/uis7885/hardware/omx_il/components/BUILD.gn @@ -21,5 +21,6 @@ import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni") group("libstagefright_components") { deps = [ "//device/soc/sprd/uis7885/hardware/omx_il/components/video/avc/dec/hw:libstagefright_sprd_avc_dec", + "//device/soc/sprd/uis7885/hardware/omx_il/components/video/vpp/deintl:libstagefright_sprd_deintl", ] } diff --git a/uis7885/hardware/omx_il/components/video/avc/dec/hw/BUILD.gn b/uis7885/hardware/omx_il/components/video/avc/dec/hw/BUILD.gn index 0d27f219d9ebd21cc2f8065522c119381933aec3..648bbad9132094914f3c6c912e04aafd54a452aa 100644 --- a/uis7885/hardware/omx_il/components/video/avc/dec/hw/BUILD.gn +++ b/uis7885/hardware/omx_il/components/video/avc/dec/hw/BUILD.gn @@ -19,33 +19,33 @@ import("//device/soc/sprd/uis7885/soc.gni") ohos_prebuilt_shared_library("libstagefright_sprd_h264dec") { source = "lib64/libstagefright_sprd_h264dec.z.so" + install_enable = true install_images = [ chipset_base_dir ] subsystem_name = "${SUBSYSTEM_NAME}" - install_enable = true part_name = "${PART_NAME}" } -# ohos_prebuilt_shared_library( "libomx_avcdec_hw_sprd" ){ -# source = "lib64/libomx_avcdec_hw_sprd.z.so" -# install_enable = true -# install_images = [chipset_base_dir] -# subsystem_name = "${SUBSYSTEM_NAME}" -# part_name = "${PART_NAME}" -# } +ohos_prebuilt_shared_library("libomx_avcdec_hw_sprd"){ + source = "lib64/libomx_avcdec_hw_sprd.z.so" + install_enable = true + install_images = [chipset_base_dir] + subsystem_name = "${SUBSYSTEM_NAME}" + part_name = "${PART_NAME}" +} -# ohos_prebuilt_shared_library( "libomx_avcenc_hw_sprd" ){ -# source = "lib64/libomx_avcenc_hw_sprd.z.so" -# install_enable = true -# install_images = [chipset_base_dir] -# subsystem_name = "${SUBSYSTEM_NAME}" -# part_name = "${PART_NAME}" -# } +ohos_prebuilt_shared_library("libomx_avcenc_hw_sprd"){ + source = "lib64/libomx_avcenc_hw_sprd.z.so" + install_enable = true + install_images = [chipset_base_dir] + subsystem_name = "${SUBSYSTEM_NAME}" + part_name = "${PART_NAME}" +} group( "libstagefright_sprd_avc_dec" ) { deps = [ ":libstagefright_sprd_h264dec", -# ":libomx_avcdec_hw_sprd", -# ":libomx_avcenc_hw_sprd", + ":libomx_avcdec_hw_sprd", + ":libomx_avcenc_hw_sprd", ] } diff --git a/uis7885/hardware/omx_il/components/video/avc/dec/hw/lib64/libstagefright_sprd_h264dec.z.so b/uis7885/hardware/omx_il/components/video/avc/dec/hw/lib64/libstagefright_sprd_h264dec.z.so index 36b7f11c29798384f3df9bbd0f94aa339c49e2cf..d07f8186919f0ec9171567e0830391372ecf8a7d 100755 Binary files a/uis7885/hardware/omx_il/components/video/avc/dec/hw/lib64/libstagefright_sprd_h264dec.z.so and b/uis7885/hardware/omx_il/components/video/avc/dec/hw/lib64/libstagefright_sprd_h264dec.z.so differ diff --git a/uis7885/hardware/omx_il/components/video/vpp/deintl/BUILD.gn b/uis7885/hardware/omx_il/components/video/vpp/deintl/BUILD.gn index d6e97a60bffbdf333fc85cc667827e1b0e32a886..954e0d1f2265d472b1d0ddf3995ffd4e82bb4d9d 100644 --- a/uis7885/hardware/omx_il/components/video/vpp/deintl/BUILD.gn +++ b/uis7885/hardware/omx_il/components/video/vpp/deintl/BUILD.gn @@ -18,10 +18,10 @@ import("//device/soc/sprd/uis7885/hardware/omx_il/sprd_omx.gni") import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni") import("//device/soc/sprd/uis7885/soc.gni") -ohos_prebuilt_shared_library( "libstagefright_sprd_deintl") { +ohos_prebuilt_shared_library("libstagefright_sprd_deintl") { source = "lib/libstagefright_sprd_deintl.z.so" + install_enable = true install_images = [ chipset_base_dir ] subsystem_name = "${SUBSYSTEM_NAME}" part_name = "${PART_NAME}" - install_enable = true } diff --git a/uis7885/hardware/omx_il/components/video/vpp/deintl/lib/libstagefright_sprd_deintl.z.so b/uis7885/hardware/omx_il/components/video/vpp/deintl/lib/libstagefright_sprd_deintl.z.so index 334060e7aae1e22fd08a07ba8ce7efdf418cf303..e49979579578c8513bb982537d8df7b293744e33 100755 Binary files a/uis7885/hardware/omx_il/components/video/vpp/deintl/lib/libstagefright_sprd_deintl.z.so and b/uis7885/hardware/omx_il/components/video/vpp/deintl/lib/libstagefright_sprd_deintl.z.so differ diff --git a/uis7885/hardware/omx_il/core/BUILD.gn b/uis7885/hardware/omx_il/core/BUILD.gn index ff0f7ca24c179e8131d085802ec223242233ab06..c51a601904f639fe36c782466bfba805b0ca8a5b 100644 --- a/uis7885/hardware/omx_il/core/BUILD.gn +++ b/uis7885/hardware/omx_il/core/BUILD.gn @@ -24,3 +24,4 @@ ohos_prebuilt_shared_library("libOMX_Core") { subsystem_name = "${SUBSYSTEM_NAME}" part_name = "${PART_NAME}" } + diff --git a/uis7885/hardware/omx_il/core/lib/libOMX_Core.z.so b/uis7885/hardware/omx_il/core/lib/libOMX_Core.z.so index 2f34ef9a481a5d38aabf4bd93afc438cfa160a61..49b7f92479212fdac98a8797bd512bee2bf727b1 100755 Binary files a/uis7885/hardware/omx_il/core/lib/libOMX_Core.z.so and b/uis7885/hardware/omx_il/core/lib/libOMX_Core.z.so differ diff --git a/uis7885/hardware/omx_il/libstagefrighthw/BUILD.gn b/uis7885/hardware/omx_il/libstagefrighthw/BUILD.gn index 91d9ea08901503ab1389dde960dcb231e5f785d7..a1402f9f9e36fefbe182a18504a46a61b68680cc 100644 --- a/uis7885/hardware/omx_il/libstagefrighthw/BUILD.gn +++ b/uis7885/hardware/omx_il/libstagefrighthw/BUILD.gn @@ -17,10 +17,11 @@ import("//device/soc/sprd/uis7885/hardware/omx_il/sprd_omx.gni") import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni") import("//device/soc/sprd/uis7885/soc.gni") -ohos_prebuilt_shared_library( "libstagefrighthw") { +ohos_prebuilt_shared_library("libstagefrighthw") { source = "lib/libstagefrighthw.z.so" install_enable = true install_images = [chipset_base_dir] subsystem_name = "${SUBSYSTEM_NAME}" part_name = "${PART_NAME}" } + diff --git a/uis7885/hardware/omx_il/libstagefrighthw/lib/libstagefrighthw.z.so b/uis7885/hardware/omx_il/libstagefrighthw/lib/libstagefrighthw.z.so index 3226485793ad9e975b8e93b9f7da91df741a0d9a..55202a389d89f6455a7a18f764ad60fe53cd8252 100755 Binary files a/uis7885/hardware/omx_il/libstagefrighthw/lib/libstagefrighthw.z.so and b/uis7885/hardware/omx_il/libstagefrighthw/lib/libstagefrighthw.z.so differ diff --git a/uis7885/hardware/omx_il/libutils/BUILD.gn b/uis7885/hardware/omx_il/libutils/BUILD.gn index 0e7a10f3c5cf860dadb83ecf0e70a59cde5dbc5d..43277aca2e7897cfcdf85f0d4346fafb3ce206ae 100644 --- a/uis7885/hardware/omx_il/libutils/BUILD.gn +++ b/uis7885/hardware/omx_il/libutils/BUILD.gn @@ -18,9 +18,10 @@ import("//device/soc/sprd/uis7885/hardware/omx_il/sprd_omx.gni") import("//device/soc/sprd/uis7885/soc.gni") ohos_prebuilt_shared_library("libomx_utils") { - source = "lib/libomx_utils.z.so" - install_enable = true - install_images = [chipset_base_dir] - subsystem_name = "${SUBSYSTEM_NAME}" - part_name = "${PART_NAME}" + source = "lib/libomx_utils.z.so" + install_enable = true + install_images = [chipset_base_dir] + subsystem_name = "${SUBSYSTEM_NAME}" + part_name = "${PART_NAME}" } + diff --git a/uis7885/hardware/omx_il/libutils/lib/libomx_utils.z.so b/uis7885/hardware/omx_il/libutils/lib/libomx_utils.z.so index d550488c7473aee7fed028ca9db99bdc41f96f19..f63afdc17cdbeb41c30dbc17392559bac4d7f0db 100755 Binary files a/uis7885/hardware/omx_il/libutils/lib/libomx_utils.z.so and b/uis7885/hardware/omx_il/libutils/lib/libomx_utils.z.so differ