1# ==============================================
2# MTK Policy Rule
3# ============
4
5# Data : WK14.42
6# Operation : Migration
7# Purpose : Video playback
8allow surfaceflinger sw_sync_device:chr_file { rw_file_perms };
9allow surfaceflinger debug_prop:property_service set;
10
11# Date : WK16.33
12# Purpose: Allow to access ged for gralloc_extra functions
13allow surfaceflinger proc_ged:file rw_file_perms;
14allowxperm surfaceflinger proc_ged:file ioctl { proc_ged_ioctls };
15
16# Date : W16.42
17# Operation : Integration
18# Purpose : DRM / DRI GPU driver required
19
20allow surfaceflinger gpu_device:dir search;
21
22# Date : WK17.12
23# Purpose: Fix bootup fail
24allow surfaceflinger proc_bootprof:file r_file_perms;
25
26#============= surfaceflinger ==============
27allow surfaceflinger debugfs_ion:dir search;
28
29# Date : WK17.30
30# Operation : O Migration
31# Purpose: Allow to access cmdq driver
32allow surfaceflinger mtk_cmdq_device:chr_file { read ioctl open };
33
34# Date : W17.39
35# Perform Binder IPC.
36binder_use(surfaceflinger)
37binder_call(surfaceflinger, binderservicedomain)
38binder_call(surfaceflinger, appdomain)
39binder_call(surfaceflinger, mtkbootanimation)
40binder_service(surfaceflinger)
41
42allow surfaceflinger mtkbootanimation:dir search;
43allow surfaceflinger mtkbootanimation:file { read getattr open };
44
45# Date : W17.43
46# Operation : Migration
47# Purpose: Allow to access perfmgr
48allow surfaceflinger proc_perfmgr:dir {read search};
49allow surfaceflinger proc_perfmgr:file {open read ioctl};
50allowxperm surfaceflinger proc_perfmgr:file ioctl {
51  PERFMGR_FPSGO_QUEUE
52  PERFMGR_FPSGO_DEQUEUE
53  PERFMGR_FPSGO_QUEUE_CONNECT
54  PERFMGR_FPSGO_BQID
55  PERFMGR_FPSGO_VSYNC
56};
57
58# Date : WK17.43
59# Operation : Debug
60# Purpose: Allow to dump HWC backtrace
61get_prop(surfaceflinger, graphics_hwc_pid_prop)
62get_prop(surfaceflinger, graphics_hwc_latch_unsignaled_prop)
63allow surfaceflinger hal_graphics_composer_default:dir search;
64allow surfaceflinger hal_graphics_composer_default:lnk_file read;
65
66# Date : WK18.36
67# Operation : Debug
68# Purpose: Allow to dump buffer queue
69get_prop(surfaceflinger, debug_bq_dump_prop)
70
71# Date : WK19.4
72# Operation : P Migration
73# Purpose: Allow to access /dev/mdp_device driver
74allow surfaceflinger mdp_device:chr_file rw_file_perms;
75
76# Date : WK19.09
77# Purpose: Allow to access property dev/mdp_sync
78#============= surfaceflinger ==============
79allow surfaceflinger mtk_mdp_device:chr_file rw_file_perms;
80
81# Date : WK18.43
82# Operation : HDR
83# Purpose: Allow to skip aosp hdr solution
84get_prop(surfaceflinger, graphics_hwc_hdr_prop)
85