summaryrefslogtreecommitdiff
path: root/lib/igt_kms.h
diff options
context:
space:
mode:
authorAnkit Nautiyal <ankit.k.nautiyal@intel.com>2020-06-24 11:11:28 +0530
committerRamalingam C <ramalingam.c@intel.com>2020-06-26 14:36:44 +0530
commitdaadfa50b6b0fb3cc52c6c049a84f14294bd6aca (patch)
tree907c2582d9ac49b8e6153d88a9ef33a8ba92ba23 /lib/igt_kms.h
parent725bf2dae51f0087eaa64f1931a2ef9d22f070dd (diff)
lib/igt_kms: Add support for detecting connector events
Currently, the event_detect function checks the property val for "HOTPLUG" and "LEASE" both of which are set to '1' when these events are sent. This cannot be used for detecting connector events such as HDCP event as connector events are sent along with property to signify which property of which connector has changed. Connector ID and property id are provided along with "CONNECTOR" and "PROPERTY" as udev property-value pairs. Eg. for HDCP, the connector id of the connector whose hdcp status changed, and the property id of the ‘CONTENT_PROTECTION’ property are sent with uevent. This patch modifies the event_detect function to check multiple properties with different expected values. It also adds support to detect connector event for a given pair of connector and property ids. v2: Simplified the event_detect conditional statements. (Ram) Changed the api name for detecting connnector events. (Anshuman) Added check for "HOTPLUG" property value for connector events. v3: Used ARRAY_SIZE() instead of constants. (Ram) v4: Rebase Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Reviewed-by: Ramalingam C <ramalingam.c@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Diffstat (limited to 'lib/igt_kms.h')
-rw-r--r--lib/igt_kms.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 32a0e4cc..539f6c5a 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -779,6 +779,8 @@ bool igt_hotplug_detected(struct udev_monitor *mon,
int timeout_secs);
bool igt_lease_change_detected(struct udev_monitor *mon,
int timeout_secs);
+bool igt_connector_event_detected(struct udev_monitor *mon, uint32_t conn_id,
+ uint32_t prop_id, int timeout_msecs);
void igt_flush_hotplugs(struct udev_monitor *mon);
void igt_cleanup_hotplug(struct udev_monitor *mon);