drm_hwcomposer: uses edid DTD to get better estimate of dpi
Edid are not the most reliable when it comes to panel size, however it
seems like preferred DTD are slightly more reliable. This change moves
from the drm parse edid display size to the first preferred DTD to try
improve dpi accuracy.
If no preferred DTD is available we still fallback to the display size.
Change-Id: Ibcc95da9f38ba74e9b95b9d68587b38efbed8de2
signed-off-by: Lucas Berthou <berlu@google.com>
diff --git a/hwc2_device/HwcDisplay.h b/hwc2_device/HwcDisplay.h
index 7391785..c3a5f1a 100644
--- a/hwc2_device/HwcDisplay.h
+++ b/hwc2_device/HwcDisplay.h
@@ -96,6 +96,8 @@
// Get the HwcDisplayConfig, or nullptor if none.
auto GetConfig(hwc2_config_t config_id) const -> const HwcDisplayConfig *;
+ auto GetDisplayBoundsMm() -> std::pair<int32_t, int32_t>;
+
// To be called after SetDisplayProperties. Returns an empty vector if the
// requested layers have been validated, otherwise the vector describes
// the requested composition type changes.