Add a new system property persist.graphics.egl

This new system property will be read and written
by a new developer option switch, through gpuservice.

Based on the value stored in persis.graphics.egl,
we will load different GLES driver.

e.g.
persist.graphics.egl == $ro.hardware.egl: load native GLES driver
persist.graphics.egl == angle: load angle as GLES driver

Bug: b/270994705
Test: m; flash and check Pixel 7 boots fine
Change-Id: Idec4b947d0c69c52cd798df4f834053bd306cf5f
This commit is contained in:
Yuxin Hu 2023-04-09 00:15:43 +00:00
parent 646f181c95
commit 889dd078e9
5 changed files with 8 additions and 0 deletions

View file

@ -26,6 +26,7 @@
fwk_camera_service
fwk_sensor_service
grammatical_inflection_service
graphics_config_writable_prop
hal_bluetooth_service
hal_bootctl_service
hal_cas_service

View file

@ -6,6 +6,7 @@ get_prop(coredomain, dalvik_runtime_prop)
get_prop(coredomain, exported_pm_prop)
get_prop(coredomain, ffs_config_prop)
get_prop(coredomain, graphics_config_prop)
get_prop(coredomain, graphics_config_writable_prop)
get_prop(coredomain, hdmi_config_prop)
get_prop(coredomain, init_service_status_private_prop)
get_prop(coredomain, lmkd_config_prop)

View file

@ -61,5 +61,8 @@ allow gpuservice bpfloader:bpf { map_read map_write prog_run };
add_service(gpuservice, gpu_service)
# Needed for enabling write access to persist.graphics.egl from developer option switch UI, through gpuservice.
set_prop(gpuservice, graphics_config_writable_prop)
# Only uncomment below line when in development
# userdebug_or_eng(`permissive gpuservice;')

View file

@ -1389,6 +1389,7 @@ ro.gfx.driver_build_time u:object_r:graphics_config_prop:s0 exact int
graphics.gpu.profiler.support u:object_r:graphics_config_prop:s0 exact bool
graphics.gpu.profiler.vulkan_layer_apk u:object_r:graphics_config_prop:s0 exact string
persist.graphics.egl u:object_r:graphics_config_writable_prop:s0 exact string
ro.cpuvulkan.version u:object_r:graphics_config_prop:s0 exact int

View file

@ -101,6 +101,8 @@ system_restricted_prop(usb_prop)
system_restricted_prop(userspace_reboot_exported_prop)
system_restricted_prop(vold_status_prop)
system_restricted_prop(vts_status_prop)
system_restricted_prop(graphics_config_writable_prop)
compatible_property_only(`
# DO NOT ADD ANY PROPERTIES HERE