GloDroid / glodroid_manifest

Android port that aims to bring both user- and developer-friendly experience in using AOSP with a set of single-board computers (SBC), phones and other devices.
472 stars 66 forks source link

Investigate dynamic framerate support #56

Closed rsglobal closed 3 years ago

rsglobal commented 4 years ago

https://xdc2019.x.org/event/5/contributions/331/attachments/424/675/HarryWentland-Freesync-20191003.pdf

Dynamic framerate is required for smooth video playback. Playing for example 24Hz video stream on 60Hz monitor will require to cut or play twice some video frames.

There is native support for dynamic fps since Android-11: https://developer.android.com/guide/topics/media/frame-rate

Action items:

  1. Investigate which and how HAL components needs to be modified.
rsglobal commented 4 years ago

Currently mesa3d exposes EGL extension set below:

EGL_KHR_get_all_proc_addresses
EGL_ANDROID_presentation_time
EGL_ANDROID_get_native_client_buffer
EGL_ANDROID_front_buffer_auto_refresh
EGL_ANDROID_get_frame_timestamps
EGL_EXT_surface_SMPTE2086_metadata
EGL_EXT_surface_CTA861_3_metadata
EGL_KHR_image EGL_KHR_image_base
EGL_KHR_gl_colorspace
EGL_KHR_gl_texture_2D_image
EGL_KHR_gl_texture_3D_image
EGL_KHR_gl_texture_cubemap_image
EGL_KHR_gl_renderbuffer_image
EGL_KHR_reusable_sync
EGL_KHR_fence_sync
EGL_KHR_create_context
EGL_KHR_config_attribs
EGL_KHR_surfaceless_context
EGL_ANDROID_image_native_buffer
EGL_KHR_wait_sync
EGL_ANDROID_recordable EGL_KHR_partial_update
EGL_EXT_pixel_format_float
EGL_EXT_buffer_age
EGL_KHR_create_context_no_error
EGL_KHR_no_config_context
rsglobal commented 4 years ago

This should reduce power consumption on static UI. hwcomposer: Add support to specify dynamic FPS when idle https://review.lineageos.org/c/LineageOS/android_hardware_qcom_display/+/75157

rsglobal commented 4 years ago

https://android.googlesource.com/platform/frameworks/native/+/master/services/surfaceflinger/sysprop/SurfaceFlingerProperties.sysprop#309

rsglobal commented 4 years ago

https://android.googlesource.com/platform/frameworks/native/+/master/services/surfaceflinger/sysprop/SurfaceFlingerProperties.sysprop#353

rsglobal commented 3 years ago

Looks like kernel DRM doesn't have API for this yet. Let's return to this later.