Skip to content

Commit

Permalink
sm6250-common: Use common libqti-perfd-client and power-libperfmgr
Browse files Browse the repository at this point in the history
Change-Id: I22d6b35c72629553817005deaefcae60abc72cfd
  • Loading branch information
bgcngm authored and ItsVixano committed May 20, 2024
1 parent 6c82604 commit f731a2e
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 66 deletions.
1 change: 1 addition & 0 deletions BoardConfigCommon.mk
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ ENABLE_VENDOR_RIL_SERVICE := true
VENDOR_SECURITY_PATCH := 2023-05-01

# Sepolicy
include device/lineage/sepolicy/libperfmgr/sepolicy.mk
include device/qcom/sepolicy_vndr/SEPolicy.mk
BOARD_VENDOR_SEPOLICY_DIRS += $(COMMON_PATH)/sepolicy/vendor

Expand Down
4 changes: 3 additions & 1 deletion atoll.mk
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ PRODUCT_COPY_FILES += \

# Power
PRODUCT_PACKAGES += \
android.hardware.power-service.xiaomi-libperfmgr
android.hardware.power-service.lineage-libperfmgr

PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/powerhint.json:$(TARGET_COPY_OUT_VENDOR)/etc/powerhint.json
Expand Down Expand Up @@ -366,6 +366,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
Expand Down
17 changes: 0 additions & 17 deletions libqti-perfd-client/Android.bp

This file was deleted.

24 changes: 0 additions & 24 deletions libqti-perfd-client/client.c

This file was deleted.

1 change: 0 additions & 1 deletion sepolicy/vendor/file_contexts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
/mnt/vendor/persist/subsys(/.*)? u:object_r:persist_subsys_file:s0

# Power
/vendor/bin/hw/android\.hardware\.power-service\.xiaomi-libperfmgr u:object_r:hal_power_default_exec:s0
/vendor/bin/init\.qcom\.post_boot-atoll\.sh u:object_r:vendor_qti_init_shell_exec:s0

# Public libraries
Expand Down
19 changes: 3 additions & 16 deletions sepolicy/vendor/hal_power_default.te
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
allow hal_power_default {
vendor_sysfs_devfreq
sysfs_touchpanel
}:dir search;

allow hal_power_default {
vendor_sysfs_devfreq
sysfs_devices_system_cpu
vendor_sysfs_graphics
vendor_sysfs_kgsl
sysfs_touchpanel
vendor_sysfs_scsi_host
}:file rw_file_perms;

# To get/set powerhal state property
set_prop(hal_power_default, vendor_power_prop)
# Allow writing to files in /sys/touchpanel
allow hal_power_default sysfs_touchpanel:dir search;
allow hal_power_default sysfs_touchpanel:file rw_file_perms;
2 changes: 0 additions & 2 deletions sepolicy/vendor/property.te
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
vendor_internal_prop(vendor_power_prop)

vendor_internal_prop(vendor_thermal_prop)

vendor_internal_prop(vendor_timekeep_prop)
Expand Down
3 changes: 0 additions & 3 deletions sepolicy/vendor/property_contexts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ vendor.camera. u:object_r:vendor_camera_prop:s0
persist.vendor.sys.fp. u:object_r:vendor_fingerprint_prop:s0
vendor.sys.fp u:object_r:vendor_fingerprint_prop:s0

# Power
vendor.powerhal. u:object_r:vendor_power_prop:s0

# Thermal
vendor.thermal. u:object_r:vendor_thermal_prop:s0

Expand Down
2 changes: 0 additions & 2 deletions sepolicy/vendor/vendor_init.te
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
set_prop(vendor_init, vendor_power_prop)

allow vendor_init proc_dirty:file w_file_perms;

0 comments on commit f731a2e

Please sign in to comment.