SF: Store DeviceProductInfo in DisplayDevice
When a new display is connected we query the display
identification data, parse the EDID and store it in
DisplayDevice for future use. This saves an unnecessary IPC
to HWC when SurfaceFlinger::getDisplayInfo() is called.
Bug: 149075047
Test: 1. flash a device
2. boot a device connected to a display
3. Check for sensible DeviceProductInfo:
adb shell dumpsys SurfaceFlinger | grep deviceProductInfo
adb shell dumpsys display | grep deviceProductInfo
4. reboot without a display
5. Check that DeviceProductInfo is empty / null in
adb shell dumpsys SurfaceFlinger | grep deviceProductInfo
adb shell dumpsys display | grep deviceProductInfo
Change-Id: I35b6b3869eb740dd90913c9d3095fdc591b5ba3c
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index 4b5a843..ad0d9d4 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -774,7 +774,7 @@
return nullptr;
}
- std::optional<DeviceProductInfo> getDeviceProductInfoLocked(const DisplayDevice&) const;
+ std::optional<DeviceProductInfo> getDeviceProductInfoLocked(DisplayId) const;
// mark a region of a layer stack dirty. this updates the dirty
// region of all screens presenting this layer stack.