drm_hwcomposer: Plumb link status BAD to OnHotplugEvent composer callback
This updates the Uevent handler to handle the hotplug events
sent by the kernel for link training failure.
Adds support in hotplug handler in resourcemanager to read connector
properties and read the value of link-status property.
If this is set to DRM_MODE_LINK_STATUS_BAD, then invoke
the OnHotplugEvent() composer callback with the BAD CABLE
DisplayHotplugEvent to notify the Surfaceflinger about link training
failure.
Currently this uses the ERROR_INCOMPATIBLE_CABLE field of the
DisplayHotplugEvent callback. The longer term would be to define
a new field in this enum to indicate MODESET_RETRY and use this
INCOMPATIBLE_CABLE for the terminal link train failure state.
Change-Id: I823d7570dd08e476d0c887e350bce3f8f0069afb
Signed-off-by: Manasi Navare <navaremanasi@chromium.org>
diff --git a/drm/DrmConnector.h b/drm/DrmConnector.h
index 8063fd8..9186f07 100644
--- a/drm/DrmConnector.h
+++ b/drm/DrmConnector.h
@@ -80,6 +80,8 @@
int UpdateModes();
+ bool IsLinkStatusGood();
+
auto &GetModes() const {
return modes_;
}
@@ -151,6 +153,7 @@
DrmProperty colorspace_property_;
DrmProperty content_type_property_;
+ DrmProperty link_status_property_;
DrmProperty writeback_pixel_formats_;
DrmProperty writeback_fb_id_;
DrmProperty writeback_out_fence_;