]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Add support for DP 1.4 Compliance edid corruption test
authorJerry (Fangzhi) Zuo <Jerry.Zuo@amd.com>
Tue, 11 Feb 2020 16:08:32 +0000 (11:08 -0500)
committerRodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Thu, 13 Feb 2020 23:33:58 +0000 (18:33 -0500)
commit8d1604a7d1ec4ea66c82fafebe29647a6db7992e
treebc5aeb67afdb3efbadaaf17819c228e5c2c9efd4
parent6dcc5e2b2aa071be7c857584205c81460b3ace24
drm: Add support for DP 1.4 Compliance edid corruption test

Unlike DP 1.2 edid corruption test, DP 1.4 requires to calculate
real CRC value of the last edid data block, and write it back.
Current edid CRC calculates routine adds the last CRC byte,
and check if non-zero.

This behavior is not accurate; actually, we need to return
the actual CRC value when corruption is detected.
This commit changes this issue by returning the calculated CRC,
and initiate the required sequence.

Change since v7
- Fix for CI.CHECKPATCH

Change since v6
- Add return check

Change since v5
- Obtain real CRC value before dumping bad edid

Change since v4
- Fix for CI.CHECKPATCH

Change since v3
- Fix a minor typo.

Change since v2
- Rewrite checksum computation routine to avoid duplicated code.
- Rename to avoid confusion.

Change since v1
- Have separate routine for returning real CRC.

Signed-off-by: Jerry (Fangzhi) Zuo <Jerry.Zuo@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200211160832.24259-1-Jerry.Zuo@amd.com
drivers/gpu/drm/drm_dp_helper.c
drivers/gpu/drm/drm_edid.c
include/drm/drm_connector.h
include/drm/drm_dp_helper.h