Merge "sdm: Update vendor HDR capability logic" into display.lnx.5.0
diff --git a/sdm/libs/core/display_base.cpp b/sdm/libs/core/display_base.cpp
index 56bb750..737acf9 100644
--- a/sdm/libs/core/display_base.cpp
+++ b/sdm/libs/core/display_base.cpp
@@ -430,8 +430,16 @@
   lock_guard<recursive_mutex> obj(recursive_mutex_);
   fixed_info->is_cmdmode = (hw_panel_info_.mode == kModeCommand);
 
-  // hdr can be supported by display when target and panel supports HDR.
-  fixed_info->hdr_supported = (hw_resource_info_.has_hdr && hw_panel_info_.hdr_enabled);
+  HWResourceInfo hw_resource_info = HWResourceInfo();
+  hw_info_intf_->GetHWResourceInfo(&hw_resource_info);
+  bool hdr_supported = hw_resource_info.has_hdr;
+  HWDisplayInterfaceInfo hw_disp_info = {};
+  hw_info_intf_->GetFirstDisplayInterfaceType(&hw_disp_info);
+  if (hw_disp_info.type == kHDMI) {
+    hdr_supported = (hdr_supported && hw_panel_info_.hdr_enabled);
+  }
+
+  fixed_info->hdr_supported = hdr_supported;
   // Populate luminance values only if hdr will be supported on that display
   fixed_info->max_luminance = fixed_info->hdr_supported ? hw_panel_info_.peak_luminance: 0;
   fixed_info->average_luminance = fixed_info->hdr_supported ? hw_panel_info_.average_luminance : 0;