drm_hwcomposer: Add z order support

Currently, the planner just pops the first available drm plane and if
that can't be used for the DrmHwcLayer it just returns error.

This proposes a slighlty smarter way to do that by trying to see if
any of the DrmPlane can be used for the DrmHwcLayer in question.

More, if the drm_plane doesn't have a fix zorder then we could re-add
him to the list of unused planes, so it could be used for hosting
other less demanding DrmHwcLayers.

Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
diff --git a/drmplane.cpp b/drmplane.cpp
index 6747621..35f91b4 100644
--- a/drmplane.cpp
+++ b/drmplane.cpp
@@ -118,6 +118,10 @@
     return ret;
   }
 
+  ret = drm_->GetPlaneProperty(*this, "zpos", &zpos_property_);
+  if (ret)
+    ALOGE("Could not get zpos property for plane %u", id());
+
   ret = drm_->GetPlaneProperty(*this, "rotation", &rotation_property_);
   if (ret)
     ALOGE("Could not get rotation property");
@@ -189,6 +193,10 @@
   return src_h_property_;
 }
 
+const DrmProperty &DrmPlane::zpos_property() const {
+  return zpos_property_;
+}
+
 const DrmProperty &DrmPlane::rotation_property() const {
   return rotation_property_;
 }