drm_hwcomposer: Add SIZE_HINTS property to DrmPlane
This change reads and parses the SIZE_HINTS drm plane property. Once
parsed successfully, the size hints indicate recommended sizes to
use with cursor planes, in order of preference [1]. The property is
not populated on planes which do not have DRM_PLANE_TYPE_CURSOR.
[1] https://drmdb.emersion.fr/properties/4008636142/SIZE_HINTS
Change-Id: Ia98a45ab5f279573f61394a357eccc90952528c5
Signed-off-by: Andrew Wolfers <aswolfers@google.com>
diff --git a/drm/DrmPlane.cpp b/drm/DrmPlane.cpp
index 68887dd..235f59d 100644
--- a/drm/DrmPlane.cpp
+++ b/drm/DrmPlane.cpp
@@ -132,6 +132,12 @@
}
}
+ if (type_ == DRM_PLANE_TYPE_CURSOR &&
+ GetPlaneProperty("SIZE_HINTS", size_hints_property_,
+ Presence::kOptional)) {
+ size_hints_property_.GetBlobData(size_hints_);
+ }
+
return 0;
}