From 84a8614d8121c2fa511ec45e8edd557da76894c0 Mon Sep 17 00:00:00 2001 From: Ian-Y Chen Date: Sat, 18 Jan 2020 10:09:09 +0800 Subject: [PATCH] [ALPS04328846] power: add ioctl permission [Detail] 1. Add perfctl ioctl definition 2. Add proc_perfmgr permission in mtk_hal_power [Solution] MTK-Commit-Id: 8c800a4e115fd8dd800475a72bffa244c687d26a Change-Id: Iaa3894b618a3e6ee2b6dfc3b864715a137dee50f CR-Id: ALPS04328846 Feature: [Module]PowerHAL --- non_plat/ioctl_defines | 10 ++++++++++ non_plat/mtk_hal_power.te | 1 + 2 files changed, 11 insertions(+) diff --git a/non_plat/ioctl_defines b/non_plat/ioctl_defines index c1cd4fe..7ad8f6a 100755 --- a/non_plat/ioctl_defines +++ b/non_plat/ioctl_defines @@ -9,3 +9,13 @@ define(`GED_BRIDGE_IO_QUERY_INFO', `0x6705') define(`GED_BRIDGE_IO_IOCTLCMD_0F', `0x670f') define(`GED_BRIDGE_IO_IOCTLCMD_10', `0x6710') define(`GED_BRIDGE_IO_GE_INFO', `0x6769') +define(`FPSGO_QUEUE', `0x6701') +define(`FPSGO_DEQUEUE', `0x6703') +define(`FPSGO_VSYNC', `0x6705') +define(`FPSGO_TOUCH', `0x670a') +define(`FPSGO_QUEUE_CONNECT', `0x670f') +define(`FPSGO_BQID', `0x6710') +define(`EARA_NN_BEGIN', `0x6701') +define(`EARA_NN_END', `0x6702') +define(`EARA_GETUSAGE', `0x6703') +define(`PERFMGR_CPU_PREFER', `0x6701') diff --git a/non_plat/mtk_hal_power.te b/non_plat/mtk_hal_power.te index 1a131d1..3ba23ab 100644 --- a/non_plat/mtk_hal_power.te +++ b/non_plat/mtk_hal_power.te @@ -42,6 +42,7 @@ allow mtk_hal_power mtk_hal_audio:dir getattr; # Purpose : Allow powerHAL to access perfmgr allow mtk_hal_power proc_perfmgr:dir search; allow mtk_hal_power proc_perfmgr:file { getattr open read write ioctl }; +allowxperm mtk_hal_power proc_perfmgr:file ioctl FPSGO_TOUCH; # Date : 2017/10/11 # Operation: SQC