• Ankit Nautiyal's avatar
    lib/igt_kms: Add support for detecting connector events · daadfa50
    Ankit Nautiyal authored
    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's avatarAnkit Nautiyal <ankit.k.nautiyal@intel.com>
    Reviewed-by: Ramalingam C's avatarRamalingam C <ramalingam.c@intel.com>
    Acked-by: default avatarArkadiusz Hiler <arkadiusz.hiler@intel.com>
    daadfa50
igt_kms.h 25.2 KB