drm_hwcomposer: Configuring Composer HAL to use sequential IDs
Implement Google guidelines from [1]
1. The supported display config IDs are:
id=1, 1080x1920 60hz
id=2, 1080x1920 50hz
2. When a change of display configs is processed, the next set of config IDs
are assigned starting from the next unused integer, shown as follows:
id=3, 2160x3840 60hz
id=4, 2160x3840 50hz
id=5, 1080x1920 60hz
id=6, 1080x1920 50hz
+ Don't update modes in GetDisplayConfigs() . Modes is now updated at init or
after every hotplug event.
[1]: https://source.android.com/devices/graphics/hotplug#configuring-composer-hal-sequential-ids
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
diff --git a/hwc2_device/HwcDisplayConfigs.h b/hwc2_device/HwcDisplayConfigs.h
index cb38625..7450b8d 100644
--- a/hwc2_device/HwcDisplayConfigs.h
+++ b/hwc2_device/HwcDisplayConfigs.h
@@ -45,6 +45,8 @@
int active_config_id = 0;
int preferred_config_id = 0;
+
+ int last_config_id = 1;
};
} // namespace android