sm6150-common: Use common libqti-perfd-client and power-libperfmgr

Change-Id: I22d6b35c72629553817005deaefcae60abc72cfd
This commit is contained in:
Bruno Martins 2024-05-18 13:21:42 +01:00 committed by Arian
parent 104c4cf764
commit 22ae2ff2f8
8 changed files with 6 additions and 73 deletions

View File

@ -151,6 +151,7 @@ TARGET_RELEASETOOLS_EXTENSIONS := $(COMMON_PATH)
# Sepolicy
TARGET_SEPOLICY_DIR := msmsteppe
include device/lineage/sepolicy/libperfmgr/sepolicy.mk
include device/qcom/sepolicy_vndr/SEPolicy.mk
SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS += $(COMMON_PATH)/sepolicy/private

View File

@ -1,17 +0,0 @@
cc_library_shared {
name: "libqti-perfd-client",
proprietary: true,
defaults: ["hidl_defaults"],
srcs: [
"client.c",
],
cflags: [
"-Werror",
"-Wextra",
"-Wall",
],
shared_libs: [
"liblog",
"libutils",
],
}

View File

@ -1,29 +0,0 @@
/*
* Copyright (C) 2021-2024 The LineageOS Project
*
* SPDX-License-Identifier: Apache-2.0
*/
#define LOG_TAG "libqti-perfd-client"
#include <log/log.h>
#include <stdint.h>
void perf_get_feedback() {}
void perf_hint() {}
int perf_lock_acq(int handle, int duration, int arg3[], int arg4) {
ALOGI("perf_lock_acq: handle: %d, duration: %d, arg3[0]: %d, arg4: %d", handle, duration,
arg3[0], arg4);
return handle ?: 233;
}
void perf_lock_cmd() {}
int perf_lock_rel(int handle) {
ALOGI("perf_lock_rel: handle: %d", handle);
return handle ?: 233;
}
void perf_lock_use_profile() {}

View File

@ -34,7 +34,6 @@
# HALs
/(vendor|system/vendor)/bin/hw/android\.hardware\.biometrics\.fingerprint@2\.3-service\.xiaomi u:object_r:hal_fingerprint_default_exec:s0
/vendor/bin/hw/android\.hardware\.light@2\.0-service\.xiaomi_sm6150 u:object_r:hal_light_default_exec:s0
/vendor/bin/hw/android\.hardware\.power-service\.xiaomi-libperfmgr u:object_r:hal_power_default_exec:s0
/vendor/bin/hw/vendor\.lineage\.livedisplay@2\.1-service\.xiaomi_sm6150 u:object_r:hal_lineage_livedisplay_qti_exec:s0
# IR

View File

@ -54,6 +54,3 @@ genfscon sysfs /devices/platform/soc/a8c000.i2c/i2c-2/2-0066/wakeup
genfscon sysfs /devices/platform/soc/a8c000.i2c/i2c-2/2-0066/power_supply/bq2597x-standalone/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/soc:maxim_ds28e16/power_supply/batt_verify/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/soc:fingerprint_fpc/wakeup u:object_r:sysfs_wakeup:s0
# Power
genfscon proc /sys/kernel/sched_energy_aware u:object_r:proc_sched_energy_aware:s0

View File

@ -1,18 +1,4 @@
type proc_sched_energy_aware, proc_type, fs_type;
vendor_internal_prop(vendor_power_prop)
allow hal_power_default touchfeature_device:chr_file rw_file_perms;
# To do powerhint on nodes defined in powerhint.json
allow hal_power_default cgroup:dir search;
allow hal_power_default cgroup:file rw_file_perms;
allow hal_power_default proc_sched_energy_aware:file rw_file_perms;
allow hal_power_default sysfs_devices_system_cpu:file rw_file_perms;
allow hal_power_default vendor_latency_device:chr_file rw_file_perms;
allow hal_power_default vendor_sysfs_devfreq:dir search;
allow hal_power_default vendor_sysfs_devfreq:file rw_file_perms;
allow hal_power_default vendor_sysfs_kgsl:file rw_file_perms;
allow hal_power_default vendor_sysfs_graphics:file r_file_perms;
# To get/set powerhal state property
set_prop(hal_power_default, vendor_power_prop)

View File

@ -9,9 +9,6 @@ ro.hardware.fp u:object_r:vendor_fp_prop:s0
vendor.panel.display u:object_r:vendor_fp_prop:s0
vendor.fps_hal. u:object_r:vendor_fp_prop:s0
# Power HAL
vendor.powerhal. u:object_r:vendor_power_prop:s0
# Telephony
ro.vendor.oem.imei u:object_r:vendor_deviceid_prop:s0
ro.vendor.oem.meid u:object_r:vendor_deviceid_prop:s0

View File

@ -1,5 +1,5 @@
#
# Copyright (C) 2020-2023 The LineageOS Project
# Copyright (C) 2020-2024 The LineageOS Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -291,13 +291,10 @@ PRODUCT_ENFORCE_RRO_TARGETS += *
# Partitions
PRODUCT_USE_DYNAMIC_PARTITIONS := true
# Perf
PRODUCT_PACKAGES += \
libqti-perfd-client
# Power
PRODUCT_PACKAGES += \
android.hardware.power-service.xiaomi-libperfmgr
android.hardware.power-service.lineage-libperfmgr \
libqti-perfd-client
# Protobuf
PRODUCT_PACKAGES += \
@ -346,6 +343,8 @@ PRODUCT_SOONG_NAMESPACES += \
$(LOCAL_PATH) \
hardware/google/interfaces \
hardware/google/pixel \
hardware/lineage/interfaces/power-libperfmgr \
hardware/qcom-caf/common/libqti-perfd-client \
hardware/xiaomi
# Telephony