drm_hwcomposer: Add blob support to DrmProperty

This changes adds support for accessing blob data of DrmProperties with
type casting. When invoked, the data corresponding to the blob id
indicated by the property value is read from the device, and returned
as a vector with the provided template typing.

This change adds the fd as an additional init parameter for DrmProperty,
which is required in order to read the blob data.

Change-Id: I9531d0e7e2f13a4fd2840564783859d1dec1efd5
Signed-off-by: Andrew Wolfers <aswolfers@google.com>
diff --git a/drm/DrmProperty.cpp b/drm/DrmProperty.cpp
index 8dc62f6..24a67bc 100644
--- a/drm/DrmProperty.cpp
+++ b/drm/DrmProperty.cpp
@@ -35,12 +35,14 @@
     : value(e->value), name(e->name) {
 }
 
-DrmProperty::DrmProperty(uint32_t obj_id, drmModePropertyPtr p,
-                         uint64_t value) {
-  Init(obj_id, p, value);
+DrmProperty::DrmProperty(const SharedFd &fd, uint32_t obj_id,
+                         drmModePropertyPtr p, uint64_t value) {
+  Init(fd, obj_id, p, value);
 }
 
-void DrmProperty::Init(uint32_t obj_id, drmModePropertyPtr p, uint64_t value) {
+void DrmProperty::Init(const SharedFd &fd, uint32_t obj_id,
+                       drmModePropertyPtr p, uint64_t value) {
+  fd_ = fd;
   obj_id_ = obj_id;
   id_ = p->prop_id;
   flags_ = p->flags;