drm_hwcomposer: Chose preferred mode with type DRM_MODE_TYPE_PREFERRED

According to the Linux Kernel: "DRM_MODE_TYPE_PREFERRED: Preferred mode,
usually the native resolution of an LCD panel. There should only be
one preferred mode per connector at any given time."
Will use it during preferred mode choice.

Tested-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Andrii Chepurnyi <andrii_chepurnyi@epam.com>
diff --git a/drmconnector.h b/drmconnector.h
index 4f7f6a8..9c526c8 100644
--- a/drmconnector.h
+++ b/drmconnector.h
@@ -74,6 +74,10 @@
   uint32_t mm_width() const;
   uint32_t mm_height() const;
 
+  uint32_t get_preferred_mode_id() const {
+    return preferred_mode_id_;
+  }
+
  private:
   DrmDevice *drm_;
 
@@ -97,6 +101,8 @@
   DrmProperty writeback_out_fence_;
 
   std::vector<DrmEncoder *> possible_encoders_;
+
+  uint32_t preferred_mode_id_;
 };
 }  // namespace android