drm_hwcomposer: Add blob property type
The blob property type doesn't use the values_ vector, instead
just storing the blob id directly in value_.
Change-Id: Ibde7c64cb7fe515ece9e9f396866de2da518707f
Signed-off-by: Sean Paul <seanpaul@chromium.org>
diff --git a/drmproperty.cpp b/drmproperty.cpp
index 6dca12e..378e3a2 100644
--- a/drmproperty.cpp
+++ b/drmproperty.cpp
@@ -69,6 +69,9 @@
type_ = DRM_PROPERTY_TYPE_ENUM;
else if (flags_ & DRM_MODE_PROP_OBJECT)
type_ = DRM_PROPERTY_TYPE_OBJECT;
+ else if (flags_ & DRM_MODE_PROP_BLOB)
+ type_ = DRM_PROPERTY_TYPE_BLOB;
+
}
uint32_t DrmProperty::id() const {
@@ -80,6 +83,11 @@
}
int DrmProperty::value(uint64_t *value) const {
+ if (type_ == DRM_PROPERTY_TYPE_BLOB) {
+ *value = value_;
+ return 0;
+ }
+
if (values_.size() == 0)
return -ENOENT;