diff options
author | Jonathan Wicks <jwicks@codeaurora.org> | 2016-09-13 20:25:42 -0600 |
---|---|---|
committer | Jonathan Wicks <jwicks@codeaurora.org> | 2016-09-14 12:12:54 -0600 |
commit | 8f5cc18ea709d6d938ea62752b3bb695063f4bf0 (patch) | |
tree | 1ee93974caff293ca9055113855cdb3ca9fe1fe6 | |
parent | 109fb3b10cc0f807ca4084b072d9a1c911357fd7 (diff) | |
download | android_device_qcom_sepolicy-8f5cc18ea709d6d938ea62752b3bb695063f4bf0.tar.gz android_device_qcom_sepolicy-8f5cc18ea709d6d938ea62752b3bb695063f4bf0.tar.bz2 android_device_qcom_sepolicy-8f5cc18ea709d6d938ea62752b3bb695063f4bf0.zip |
sepolicy: allow init script to read GPU frequencies sysfs node
init script will read GPU frequencies from sysfs node and copy
the values to a system property to allow 3rd party apps that
rely on these frequencies to still work.
CRs-Fixed: 1066935
Change-Id: I0bb0f5e8e060090b0bc470a7113b23ce8cc4a964
-rw-r--r-- | common/file.te | 3 | ||||
-rw-r--r-- | common/init_shell.te | 3 | ||||
-rwxr-xr-x | common/property_contexts | 2 | ||||
-rw-r--r-- | msm8996/file_contexts | 2 |
4 files changed, 10 insertions, 0 deletions
diff --git a/common/file.te b/common/file.te index 29d6a721..2d31a6d4 100644 --- a/common/file.te +++ b/common/file.te @@ -203,3 +203,6 @@ type wififtmd_socket, file_type; type persist_alarm_file, file_type; type persist_time_file, file_type; + +# kgsl file type for sysfs access +type sysfs_kgsl, sysfs_type, fs_type; diff --git a/common/init_shell.te b/common/init_shell.te index bc88f3b1..ccd806c0 100644 --- a/common/init_shell.te +++ b/common/init_shell.te @@ -188,3 +188,6 @@ allow qti_init_shell persist_alarm_file:file r_file_perms; #Allow /sys access to write zram disksize allow qti_init_shell sysfs_zram:dir r_dir_perms; allow qti_init_shell sysfs_zram:file w_file_perms; + +# To get GPU frequencies +allow qti_init_shell sysfs_kgsl:file r_file_perms; diff --git a/common/property_contexts b/common/property_contexts index ea5bbda5..487bbd61 100755 --- a/common/property_contexts +++ b/common/property_contexts @@ -84,3 +84,5 @@ ro.hwui.texture_cache_size u:object_r:hwui_prop:s0 persist.graphics.vulkan.disable u:object_r:graphics_vulkan_prop:s0 #boot mode property sys.boot_mode u:object_r:boot_mode_prop:s0 +# GPU +ro.gpu.available_frequencies u:object_r:freq_prop:s0 diff --git a/msm8996/file_contexts b/msm8996/file_contexts index 02618e09..6c3e83bd 100644 --- a/msm8996/file_contexts +++ b/msm8996/file_contexts @@ -96,6 +96,8 @@ # /sys/devices/virtual/graphics/fb([0-2])+/lineptr_value u:object_r:sysfs_graphics:s0 +/sys/devices/soc/b00000.qcom,kgsl-3d0/kgsl/kgsl-3d0/gpu_available_frequencies u:object_r:sysfs_kgsl:s0 + ################################### # data files # |