SurfaceFlingerProperties.sysprop 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364
  1. # Copyright (C) 2019 The Android Open Source Project
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the License);
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an AS IS BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. module: "android.sysprop.SurfaceFlingerProperties"
  15. owner: Platform
  16. # The following two propertiess define (respectively):
  17. #
  18. # - The phase offset between hardware vsync and when apps are woken up by the
  19. # Choreographer callback
  20. # - The phase offset between hardware vsync and when SurfaceFlinger wakes up
  21. # to consume input
  22. # Their values may be tuned to trade off between display pipeline latency (both
  23. # overall latency and the lengths of the app --> SF and SF --> display phases)
  24. # and frame delivery jitter (which typically manifests as "jank" or "jerkiness"
  25. # while interacting with the device). The default values must produce a
  26. # relatively low amount of jitter at the expense of roughly two frames of
  27. # app --> display latency, and unless significant testing is performed to avoid
  28. # increased display jitter (both manual investigation using systrace [1] and
  29. # automated testing using dumpsys gfxinfo [2] are recommended), they should not
  30. # be modified.
  31. #
  32. # [1] https://developer.android.com/studio/profile/systrace.html
  33. # [2] https://developer.android.com/training/testing/performance.html
  34. prop {
  35. api_name: "vsync_event_phase_offset_ns"
  36. type: Long
  37. scope: System
  38. access: Readonly
  39. prop_name: "ro.surface_flinger.vsync_event_phase_offset_ns"
  40. }
  41. prop {
  42. api_name: "vsync_sf_event_phase_offset_ns"
  43. type: Long
  44. scope: System
  45. access: Readonly
  46. prop_name: "ro.surface_flinger.vsync_sf_event_phase_offset_ns"
  47. }
  48. # Instruct the Render Engine to use EGL_IMG_context_priority hint if available.
  49. prop {
  50. api_name: "use_context_priority"
  51. type: Boolean
  52. scope: System
  53. access: Readonly
  54. prop_name: "ro.surface_flinger.use_context_priority"
  55. }
  56. # Controls the number of buffers SurfaceFlinger will allocate for use in FramebufferSurface.
  57. prop {
  58. api_name: "max_frame_buffer_acquired_buffers"
  59. type: Long
  60. scope: System
  61. access: Readonly
  62. prop_name: "ro.surface_flinger.max_frame_buffer_acquired_buffers"
  63. }
  64. # hasWideColorDisplay indicates that the device has
  65. # or can support a wide-color display, e.g. color space
  66. # greater than sRGB. Typical display may have same
  67. # color primaries as DCI-P3.
  68. # Indicate support for this feature by setting
  69. # TARGET_HAS_WIDE_COLOR_DISPLAY to true in BoardConfig.mk
  70. # This also means that the device is color managed.
  71. # A color managed device will use the appropriate
  72. # display mode depending on the content on the screen.
  73. # Default is sRGB.
  74. prop {
  75. api_name: "has_wide_color_display"
  76. type: Boolean
  77. scope: System
  78. access: Readonly
  79. prop_name: "ro.surface_flinger.has_wide_color_display"
  80. }
  81. # Indicates if Sync framework is available. Sync framework provides fence
  82. # mechanism which significantly reduces buffer processing latency.
  83. prop {
  84. api_name: "running_without_sync_framework"
  85. type: Boolean
  86. scope: System
  87. access: Readonly
  88. prop_name: "ro.surface_flinger.running_without_sync_framework"
  89. }
  90. # hwHDRDisplay indicates that the device has an High Dynamic Range display.
  91. # A display is considered High Dynamic Range if it
  92. #
  93. # 1. is a wide color gamut display, typically DCI-P3 or lager
  94. # 2. has high luminance capability, typically 540 nits or higher at 10% OPR
  95. #
  96. # Indicate support for this feature by setting
  97. # ro.surface_flinger.has_HDR_display to true in device.mk
  98. # ro.surface_flinger.has_wide_color_display must be set to true when
  99. # ro.surface_flinger.has_HDR_display is true.
  100. prop {
  101. api_name: "has_HDR_display"
  102. type: Boolean
  103. scope: System
  104. access: Readonly
  105. prop_name: "ro.surface_flinger.has_HDR_display"
  106. }
  107. # Specify the offset in nanoseconds to add to vsync time when timestamping present fences.
  108. prop {
  109. api_name: "present_time_offset_from_vsync_ns"
  110. type: Long
  111. scope: System
  112. access: Readonly
  113. prop_name: "ro.surface_flinger.present_time_offset_from_vsync_ns"
  114. }
  115. # Some hardware can do RGB->YUV conversion more efficiently in hardware
  116. # controlled by HWC than in hardware controlled by the video encoder.
  117. # This instruct VirtualDisplaySurface to use HWC for such conversion on
  118. # GL composition.
  119. prop {
  120. api_name: "force_hwc_copy_for_virtual_displays"
  121. type: Boolean
  122. scope: System
  123. access: Readonly
  124. prop_name: "ro.surface_flinger.force_hwc_copy_for_virtual_displays"
  125. }
  126. # Maximum dimension supported by HWC for virtual display.
  127. # Must be equals to min(max_width, max_height).
  128. prop {
  129. api_name: "max_virtual_display_dimension"
  130. type: Long
  131. scope: System
  132. access: Readonly
  133. prop_name: "ro.surface_flinger.max_virtual_display_dimension"
  134. }
  135. # Return true if surface flinger should use vr flinger for compatible vr
  136. # apps, false otherwise. Devices that will never be running vr apps should
  137. # return false to avoid extra resource usage. Daydream ready devices must
  138. # return true for full vr support.
  139. prop {
  140. api_name: "use_vr_flinger"
  141. type: Boolean
  142. scope: System
  143. access: Readonly
  144. prop_name: "ro.surface_flinger.use_vr_flinger"
  145. }
  146. # Returns true if surface flinger should start
  147. # [email protected]::IAllocator service.
  148. prop {
  149. api_name: "start_graphics_allocator_service"
  150. type: Boolean
  151. scope: System
  152. access: Readonly
  153. prop_name: "ro.surface_flinger.start_graphics_allocator_service"
  154. }
  155. # Returns the orientation of the primary display device.
  156. prop {
  157. api_name: "primary_display_orientation"
  158. type: Enum
  159. enum_values: "ORIENTATION_0|ORIENTATION_90|ORIENTATION_180|ORIENTATION_270"
  160. scope: System
  161. access: Readonly
  162. prop_name: "ro.surface_flinger.primary_display_orientation"
  163. }
  164. # useColorManagement indicates whether SurfaceFlinger should manage color
  165. # by switching to appropriate color mode automatically depending on the
  166. # Dataspace of the surfaces on screen.
  167. prop {
  168. api_name: "use_color_management"
  169. type: Boolean
  170. scope: System
  171. access: Readonly
  172. prop_name: "ro.surface_flinger.use_color_management"
  173. }
  174. # The following four propertiess define:
  175. # Returns the default data space and pixel format that SurfaceFlinger
  176. # expects to receive and output as well as the wide color gamut data space
  177. # and pixel format for wide color gamut surfaces.
  178. # To determine the data space and pixel format, there are a few things
  179. # we recommend to consider:
  180. #
  181. # 1. Hardware composer's capability to composite contents with the chosen
  182. # data space and pixel format efficiently;
  183. # 2. Hardware composer's ability to composite contents when sRGB contents
  184. # and the chosen wide color gamut data space contents coexist;
  185. # 3. For better blending, consider using pixel format where the alpha
  186. # channel has as many bits as the RGB color channel.
  187. # 4. Memory consumption and efficient buffer compression when considering
  188. # more bits in pixel format.
  189. # dataspace is the default data space that SurfaceFlinger expects.
  190. # The data space must not be Dataspace::UNKNOWN, if unspecified,
  191. # the default data space is Dataspace::V0_SRGB;
  192. prop {
  193. api_name: "default_composition_dataspace"
  194. type: Long
  195. scope: System
  196. access: Readonly
  197. prop_name: "ro.surface_flinger.default_composition_dataspace"
  198. }
  199. # pixelFormat is the default pixel format that SurfaceFlinger
  200. # expects. If unspecified, the default pixel format is
  201. # PixelFormat::RGBA_8888.
  202. prop {
  203. api_name: "default_composition_pixel_format"
  204. type: Integer
  205. scope: System
  206. access: Readonly
  207. prop_name: "ro.surface_flinger.default_composition_pixel_format"
  208. }
  209. # wcgDataspace is the data space that SurfaceFlinger expects for
  210. # wide color gamut surfaces.
  211. # When hasWideColorDisplay returns true, this API must return a
  212. # valid wide color gamut data space.
  213. # The data space must not be UNKNOWN, if unspecified, the data space
  214. # is V0_SRGB by default, which essentially indicates there's no wide
  215. # color gamut, meaning hasWideColorDisplay returns false.
  216. prop {
  217. api_name: "wcg_composition_dataspace"
  218. type: Long
  219. scope: System
  220. access: Readonly
  221. prop_name: "ro.surface_flinger.wcg_composition_dataspace"
  222. }
  223. # wcgPixelFormat is the pixel format that SurfaceFlinger expects for
  224. # wide color gamut surfaces. If unspecified, the pixel format is
  225. # PixelFormat::RGBA_8888 by default.
  226. prop {
  227. api_name: "wcg_composition_pixel_format"
  228. type: Integer
  229. scope: System
  230. access: Readonly
  231. prop_name: "ro.surface_flinger.wcg_composition_pixel_format"
  232. }
  233. # colorSpaceAgnosticDataspace specifies the data space that
  234. # SurfaceFlinger expects for surfaces which are color space agnostic.
  235. # The variable works only when useColorManagement is specified. If
  236. # unspecified, the data space follows what SurfaceFlinger expects for
  237. # surfaces when useColorManagement is specified.
  238. prop {
  239. api_name: "color_space_agnostic_dataspace"
  240. type: Long
  241. scope: System
  242. access: Readonly
  243. prop_name: "ro.surface_flinger.color_space_agnostic_dataspace"
  244. }
  245. # Return the native panel primary data. The data includes red, green,
  246. # blue and white. The primary format is CIE 1931 XYZ color space.
  247. # If unspecified, the primaries is sRGB gamut by default.
  248. prop {
  249. api_name: "display_primary_red"
  250. type: DoubleList
  251. scope: System
  252. access: Readonly
  253. prop_name: "ro.surface_flinger.display_primary_red"
  254. }
  255. prop {
  256. api_name: "display_primary_green"
  257. type: DoubleList
  258. scope: System
  259. access: Readonly
  260. prop_name: "ro.surface_flinger.display_primary_green"
  261. }
  262. prop {
  263. api_name: "display_primary_blue"
  264. type: DoubleList
  265. scope: System
  266. access: Readonly
  267. prop_name: "ro.surface_flinger.display_primary_blue"
  268. }
  269. prop {
  270. api_name: "display_primary_white"
  271. type: DoubleList
  272. scope: System
  273. access: Readonly
  274. prop_name: "ro.surface_flinger.display_primary_white"
  275. }
  276. # setIdleTimerMs indicates what is considered a timeout in milliseconds for Scheduler. This value is
  277. # used by the Scheduler to trigger inactivity callbacks that will switch the display to a lower
  278. # refresh rate. Setting this property to 0 means there is no timer.
  279. prop {
  280. api_name: "set_idle_timer_ms"
  281. type: Integer
  282. scope: System
  283. access: Readonly
  284. prop_name: "ro.surface_flinger.set_idle_timer_ms"
  285. }
  286. # setTouchTimerMs indicates what is considered a timeout in milliseconds for Scheduler.
  287. # This value is used by the Scheduler to trigger touch inactivity callbacks that will switch the
  288. # display to a lower refresh rate. Setting this property to 0 means there is no timer.
  289. prop {
  290. api_name: "set_touch_timer_ms"
  291. type: Integer
  292. scope: System
  293. access: Readonly
  294. prop_name: "ro.surface_flinger.set_touch_timer_ms"
  295. }
  296. # setDisplayPowerTimerMs indicates what is considered a timeout in milliseconds for Scheduler.
  297. # This value is used by the Scheduler to trigger display power inactivity callbacks that will
  298. # keep the display in peak refresh rate as long as display power is not in normal mode.
  299. # Setting this property to 0 means there is no timer.
  300. prop {
  301. api_name: "set_display_power_timer_ms"
  302. type: Integer
  303. scope: System
  304. access: Readonly
  305. prop_name: "ro.surface_flinger.set_display_power_timer_ms"
  306. }
  307. # useSmart90ForVideo indicates whether Scheduler should detect content FPS, and try to adjust the
  308. # screen refresh rate based on that.
  309. prop {
  310. api_name: "use_smart_90_for_video"
  311. type: Boolean
  312. scope: System
  313. access: Readonly
  314. prop_name: "ro.surface_flinger.use_smart_90_for_video"
  315. }
  316. prop {
  317. api_name: "enable_protected_contents"
  318. type: Boolean
  319. scope: System
  320. access: Readonly
  321. prop_name: "ro.surface_flinger.protected_contents"
  322. }
  323. # Indicates whether Scheduler's idle timer should support a display driver timeout in the kernel.
  324. # The value of set_idle_timer_ms should be shorter in time than the timeout duration in the kernel.
  325. prop {
  326. api_name: "support_kernel_idle_timer"
  327. type: Boolean
  328. scope: System
  329. access: Readonly
  330. prop_name: "ro.surface_flinger.support_kernel_idle_timer"
  331. }