SF: Clean up plumbing for boot display mode

Avoid CE round trip, and validate API against virtual displays.

Bug: 182939859
Test: Boot
Change-Id: Ic4e14dcc06218097c65f9374f2962a345d347820
diff --git a/services/surfaceflinger/DisplayDevice.h b/services/surfaceflinger/DisplayDevice.h
index 690f240..2c4a300 100644
--- a/services/surfaceflinger/DisplayDevice.h
+++ b/services/surfaceflinger/DisplayDevice.h
@@ -157,9 +157,6 @@
     // respectively if hardware composer doesn't return meaningful values.
     HdrCapabilities getHdrCapabilities() const;
 
-    // Returns the boot display mode preferred by the implementation.
-    ui::DisplayModeId getPreferredBootModeId() const;
-
     // Return true if intent is supported by the display.
     bool hasRenderIntent(ui::RenderIntent intent) const;
 
@@ -232,8 +229,7 @@
     // set-top boxes after a hotplug reconnect.
     DisplayModePtr getMode(DisplayModeId) const;
 
-    // Returns nullptr if the given mode ID is not supported.
-    DisplayModePtr getModefromHwcId(uint32_t) const;
+    std::optional<DisplayModeId> translateModeId(hal::HWConfigId) const;
 
     // Returns the refresh rate configs for this display.
     scheduler::RefreshRateConfigs& refreshRateConfigs() const { return *mRefreshRateConfigs; }