• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# ==============================================
2# Policy File of /vendor/bin/hw/vendor.mediatek.hardware.gpu@1.0-service Executable File
3
4# ==============================================
5# Type Declaration
6# ==============================================
7
8type mtk_hal_gpu, domain;
9type mtk_hal_gpu_exec, exec_type, file_type, vendor_file_type;
10
11# ==============================================
12# MTK Policy Rule
13# ==============================================
14
15# Setup for domain transition
16init_daemon_domain(mtk_hal_gpu)
17
18# Allow to use HWBinder IPC
19hwbinder_use(mtk_hal_gpu);
20
21# Allow a set of permissions required for a domain to be a server which provides a HAL implementation over HWBinder.
22hal_server_domain(mtk_hal_gpu, hal_gpu)
23
24# add/find permission rule to hwservicemanager
25add_hwservice(hal_gpu, mtk_hal_gpu_hwservice)
26allow hal_gpu_client mtk_hal_gpu_hwservice:hwservice_manager find;
27
28# Allow to allocate hidl memory
29hal_client_domain(mtk_hal_gpu, hal_allocator)
30
31# Purpose : Allow to use kernel driver
32allow mtk_hal_gpu graphics_device:chr_file rw_file_perms;
33
34allow mtk_hal_gpu debugfs_ged:dir rw_dir_perms;
35allow mtk_hal_gpu debugfs_ged:file rw_file_perms;
36allow mtk_hal_gpu proc_ged:file rw_file_perms;
37allowxperm mtk_hal_gpu proc_ged:file ioctl { proc_ged_ioctls };
38
39allow mtk_hal_gpu hal_graphics_allocator_default:fd use;
40allow mtk_hal_gpu ion_device:chr_file r_file_perms;
41allow mtk_hal_gpu debugfs_ion:dir search;
42
43allow mtk_hal_gpu merged_hal_service:fd use;
44
45