drm/dp_helper: Add support for link failure detection
authorSwati Sharma <swati2.sharma@intel.com>
Fri, 18 Dec 2020 10:37:13 +0000 (16:07 +0530)
committerJani Nikula <jani.nikula@intel.com>
Tue, 22 Dec 2020 15:48:58 +0000 (17:48 +0200)
commit3ce98018c8f9a5de857a9f4bcd300ecf9fc8280b
tree9113d13d1a40c49c07909ab10a7502f79de57051
parentce32a6239de6480fa535c1409de98e24dd5ec721
drm/dp_helper: Add support for link failure detection

There are specific DPCDs defined for detecting link failures between
the PCON and HDMI sink and check the link status. In case of link
failure, PCON will communicate the same using an IRQ_HPD to source.
HDMI sink would have indicated the same to PCON using SCDC interrupt
mechanism. While source can always read final HDMI sink's status using
I2C over AUX, it is easier and faster to read the PCONs already read
HDMI sink status registers.

This patch adds the DPCDs required for link failure detection and
provide a helper function for printing error count/lane which might
help in debugging the link failure issues.

v2: Addressed comments from Uma Shankar:
-rephrased the commit message, as per the code.
-fixed styling issues
-added documentation for the helper function.

Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
[Jani: Fixed checkpatch PARENTHESIS_ALIGNMENT.]
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201218103723.30844-6-ankit.k.nautiyal@intel.com
drivers/gpu/drm/drm_dp_helper.c
include/drm/drm_dp_helper.h