drm_hwcomposer: Fix bitmask property mask creation

Enum properties may have the flag DRM_MODE_PROP_BITMASK to indicate that
the enum values should be interpreted as bitshifts.

- Add a function DrmProperty::IsBitmask to check if this flag is set
- Check that this flag is set in DrmProperty::GetEnumMask
- Fix GetEnumMask to interpret the enum value as a bitshift

Fixes: da2fcf66 ("drm_hwcomposer: Simplify LayerTransform")
Change-Id: Ice50ac23344f508b6dee761a51879da99d848007
Signed-off-by: Drew Davenport <ddavenport@google.com>
diff --git a/drm/DrmProperty.h b/drm/DrmProperty.h
index 860f9ca..99bddb1 100644
--- a/drm/DrmProperty.h
+++ b/drm/DrmProperty.h
@@ -54,6 +54,10 @@
     return id_ != 0 && (flags_ & DRM_MODE_PROP_RANGE) != 0;
   }
 
+  bool IsBitmask() const {
+    return id_ != 0 && (flags_ & DRM_MODE_PROP_BITMASK) != 0;
+  }
+
   auto RangeMin() const -> std::tuple<int, uint64_t>;
   auto RangeMax() const -> std::tuple<int, uint64_t>;