Hey Andrii,
On Tue, Mar 6, 2018 at 4:48 PM, Andrii Chepurnyi Andrii_Chepurnyi@epam.com wrote:
Could you please suggest me how to overcome that situation with buffers registration/deregistration?
I think drm_hwcomposer would be the wrong place to do any sort of caching. There is a Gralloc usage flag for framebuffers. So I would suggest instead that you do the heavy lifting that makes your AddFB2/RmFB slow already in your Gralloc module upon framebuffer allocation. If you want, you could probably just do the AddFB2/RmFB entirely in Gralloc and store the FB id as part of the native handle. This is what the Android-x86 drm_gralloc does:
https://github.com/robclark/drm_gralloc/blob/freedreno/gralloc.c#L236
Regards, Stefan