drm_hwcomposer: Move GetPlaneProperty into DrmPlane class
In addition move logging to GetPlaneProperty(), which allow to reduce
number of LoC by ~50 LoC and increase readability.
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
diff --git a/drm/DrmPlane.h b/drm/DrmPlane.h
index 89523a6..34bba56 100644
--- a/drm/DrmPlane.h
+++ b/drm/DrmPlane.h
@@ -57,6 +57,11 @@
DrmDevice *drm_;
uint32_t id_;
+ enum class Presence { kOptional, kMandatory };
+
+ auto GetPlaneProperty(const char *prop_name, DrmProperty &property,
+ Presence presence = Presence::kMandatory) -> bool;
+
uint32_t possible_crtc_mask_;
uint32_t type_{};