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