drm_hwcomposer: Tracking of the DRM FB objects using RAII
DRM framebuffer objects must be kept registered in DRM/KMS
while used for scanning-out (After atomic commit applied
for processing by display controller and until next atomic
commit is applied for processing).
Existing logic for tracking current state is overcomplicated and
needs to be redesigned. Also further developing of drm_hwc will
require migration to asynchronous atomic commit, so additional
asynchronous FB cleanup logic must be created.
Buffer caching logic will also benefit from this.
With the RAII all further changes will be less painful and more robust.
By this commit I also renamed DrmGenericImporter to DrmFbImporter:
'Fb' word is present in most of existing composers (android and linux)
so it will be easier to compare different implementations.
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
diff --git a/Android.bp b/Android.bp
index 9bed9e4..ddf66fb 100644
--- a/Android.bp
+++ b/Android.bp
@@ -96,7 +96,7 @@
"drm/DrmDevice.cpp",
"drm/DrmEncoder.cpp",
"drm/DrmEventListener.cpp",
- "drm/DrmGenericImporter.cpp",
+ "drm/DrmFbImporter.cpp",
"drm/DrmMode.cpp",
"drm/DrmPlane.cpp",
"drm/DrmProperty.cpp",