[V4] drm: Add support for DP 1.4 Compliance edid corruption test
diff mbox series

Message ID 20191209200442.2625-1-Jerry.Zuo@amd.com
State New
Headers show
Series
  • [V4] drm: Add support for DP 1.4 Compliance edid corruption test
Related show

Commit Message

Zuo, Jerry Dec. 9, 2019, 8:04 p.m. UTC
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 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>
---
 drivers/gpu/drm/drm_dp_helper.c | 35 +++++++++++++++++++++++++++++++++
 drivers/gpu/drm/drm_edid.c      | 23 ++++++++++++++++++----
 include/drm/drm_connector.h     |  6 ++++++
 include/drm/drm_dp_helper.h     |  3 +++
 4 files changed, 63 insertions(+), 4 deletions(-)

Comments

Zuo, Jerry Dec. 20, 2019, 7:40 p.m. UTC | #1
Hi All:

    I got CI check failures. Among those, hdmi-hpd-fast seems related, but I am not sure why. Please take a brief review and help to determine if it is a real false-positive again. 

    Thanks a lot.

Regards,
Jerry

-----Original Message-----
From: Patchwork <patchwork@emeril.freedesktop.org> 
Sent: December 9, 2019 4:40 PM
To: Zuo, Jerry <Jerry.Zuo@amd.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: ✗ Fi.CI.BAT: failure for drm: Add support for DP 1.4 Compliance edid corruption test (rev3)

== Series Details ==

Series: drm: Add support for DP 1.4 Compliance edid corruption test (rev3)
URL   : https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchwork.freedesktop.org%2Fseries%2F70530%2F&amp;data=02%7C01%7CJerry.Zuo%40amd.com%7C177d219e9888443af09a08d77cf069e0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637115246025846384&amp;sdata=aN8A2JbxqjfcxhVAUTnCNjvVGUk%2F2r4x%2BtriQ2JutOo%3D&amp;reserved=0
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_7522 -> Patchwork_15658 ====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with Patchwork_15658 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_15658, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fintel-gfx-ci.01.org%2Ftree%2Fdrm-tip%2FPatchwork_15658%2Findex.html&amp;data=02%7C01%7CJerry.Zuo%40amd.com%7C177d219e9888443af09a08d77cf069e0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637115246025846384&amp;sdata=2SAFCLwq4%2BS4UA4pGK1XJhCmoqYb4zP%2FC0LFT9HYq8w%3D&amp;reserved=0

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in Patchwork_15658:

### IGT changes ###

#### Possible regressions ####

  * igt@gem_ctx_create@basic-files:
    - fi-byt-j1900:       [PASS][1] -> [FAIL][2]
   [1]: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fintel-gfx-ci.01.org%2Ftree%2Fdrm-tip%2FCI_DRM_7522%2Ffi-byt-j1900%2Figt%40gem_ctx_create%40basic-files.html&amp;data=02%7C01%7CJerry.Zuo%40amd.com%7C177d219e9888443af09a08d77cf069e0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637115246025846384&amp;sdata=KyQU%2F5qfyjglZpqN24HnnQ9a5GYdjBjJ1R3pVOhsNsI%3D&amp;reserved=0
   [2]: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fintel-gfx-ci.01.org%2Ftree%2Fdrm-tip%2FPatchwork_15658%2Ffi-byt-j1900%2Figt%40gem_ctx_create%40basic-files.html&amp;data=02%7C01%7CJerry.Zuo%40amd.com%7C177d219e9888443af09a08d77cf069e0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637115246025846384&amp;sdata=NzzP5pGKY0sGWMZ39hKMtj3uP6tOjIHtqdVCXkvXF7Q%3D&amp;reserved=0

  * igt@i915_selftest@live_gt_heartbeat:
    - fi-whl-u:           [PASS][3] -> [DMESG-FAIL][4]
   [3]: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fintel-gfx-ci.01.org%2Ftree%2Fdrm-tip%2FCI_DRM_7522%2Ffi-whl-u%2Figt%40i915_selftest%40live_gt_heartbeat.html&amp;data=02%7C01%7CJerry.Zuo%40amd.com%7C177d219e9888443af09a08d77cf069e0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637115246025846384&amp;sdata=t%2Fs%2FnrUixDnvCLZCFGvYjYNBOo1wXIa61BcUcJBffyU%3D&amp;reserved=0
   [4]: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fintel-gfx-ci.01.org%2Ftree%2Fdrm-tip%2FPatchwork_15658%2Ffi-whl-u%2Figt%40i915_selftest%40live_gt_heartbeat.html&amp;data=02%7C01%7CJerry.Zuo%40amd.com%7C177d219e9888443af09a08d77cf069e0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637115246025846384&amp;sdata=UYbibmI5DwrQ5FaIMk9Wz%2FcKXQ9yHZietmPmGdgw2pg%3D&amp;reserved=0

  
Known issues
------------

  Here are the changes found in Patchwork_15658 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@i915_selftest@live_blt:
    - fi-ivb-3770:        [PASS][5] -> [DMESG-FAIL][6] ([i915#725])
   [5]: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fintel-gfx-ci.01.org%2Ftree%2Fdrm-tip%2FCI_DRM_7522%2Ffi-ivb-3770%2Figt%40i915_selftest%40live_blt.html&amp;data=02%7C01%7CJerry.Zuo%40amd.com%7C177d219e9888443af09a08d77cf069e0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637115246025846384&amp;sdata=NEJWpe%2Fclj9A1vJuWzT8RENFFbhOmpZLkCnR3ubrn9A%3D&amp;reserved=0
   [6]: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fintel-gfx-ci.01.org%2Ftree%2Fdrm-tip%2FPatchwork_15658%2Ffi-ivb-3770%2Figt%40i915_selftest%40live_blt.html&amp;data=02%7C01%7CJerry.Zuo%40amd.com%7C177d219e9888443af09a08d77cf069e0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637115246025846384&amp;sdata=JKN6Uuqur%2BzsVGYNzF%2B7tnWloW5NtBCe66l351fS3uw%3D&amp;reserved=0
    - fi-hsw-4770:        [PASS][7] -> [DMESG-FAIL][8] ([i915#725])
   [7]: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fintel-gfx-ci.01.org%2Ftree%2Fdrm-tip%2FCI_DRM_7522%2Ffi-hsw-4770%2Figt%40i915_selftest%40live_blt.html&amp;data=02%7C01%7CJerry.Zuo%40amd.com%7C177d219e9888443af09a08d77cf069e0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637115246025846384&amp;sdata=HVLdmenau6qljmWKPLFUfpJZH4seTuc3F4cTujbWjhE%3D&amp;reserved=0
   [8]: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fintel-gfx-ci.01.org%2Ftree%2Fdrm-tip%2FPatchwork_15658%2Ffi-hsw-4770%2Figt%40i915_selftest%40live_blt.html&amp;data=02%7C01%7CJerry.Zuo%40amd.com%7C177d219e9888443af09a08d77cf069e0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637115246025846384&amp;sdata=lY3VzJ9BjCm8IifqhXPptRCqWqOSJhV6y3%2Far5pFAFk%3D&amp;reserved=0

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-kbl-7500u:       [PASS][9] -> [FAIL][10] ([fdo#111096] / [i915#323])
   [9]: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fintel-gfx-ci.01.org%2Ftree%2Fdrm-tip%2FCI_DRM_7522%2Ffi-kbl-7500u%2Figt%40kms_chamelium%40hdmi-hpd-fast.html&amp;data=02%7C01%7CJerry.Zuo%40amd.com%7C177d219e9888443af09a08d77cf069e0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637115246025856379&amp;sdata=7OTXuVfAd7jrIQ7DbLy%2FL2yYsFd9A0Tw87CXqIBB3rA%3D&amp;reserved=0
   [10]: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fintel-gfx-ci.01.org%2Ftree%2Fdrm-tip%2FPatchwork_15658%2Ffi-kbl-7500u%2Figt%40kms_chamelium%40hdmi-hpd-fast.html&amp;data=02%7C01%7CJerry.Zuo%40amd.com%7C177d219e9888443af09a08d77cf069e0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637115246025856379&amp;sdata=EiN7do9V8te545DPKQo%2FRwgZb2TvNPZP7a1xKjxxbhc%3D&amp;reserved=0

  
#### Possible fixes ####

  * igt@gem_exec_parallel@basic:
    - {fi-tgl-u}:         [INCOMPLETE][11] ([i915#476]) -> [PASS][12]
   [11]: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fintel-gfx-ci.01.org%2Ftree%2Fdrm-tip%2FCI_DRM_7522%2Ffi-tgl-u%2Figt%40gem_exec_parallel%40basic.html&amp;data=02%7C01%7CJerry.Zuo%40amd.com%7C177d219e9888443af09a08d77cf069e0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637115246025856379&amp;sdata=7MjN4SbWRnlhw86dYLh0zitwRRU%2FeEntL06p5lnFSUQ%3D&amp;reserved=0
   [12]: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fintel-gfx-ci.01.org%2Ftree%2Fdrm-tip%2FPatchwork_15658%2Ffi-tgl-u%2Figt%40gem_exec_parallel%40basic.html&amp;data=02%7C01%7CJerry.Zuo%40amd.com%7C177d219e9888443af09a08d77cf069e0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637115246025856379&amp;sdata=Ehkh6Aw9HQuz%2B%2Bm%2BD%2FNTfYNv2EvP7Q3qc9dHaBBONV0%3D&amp;reserved=0

  * igt@gem_sync@basic-store-each:
    - fi-tgl-y:           [INCOMPLETE][13] ([i915#435]) -> [PASS][14]
   [13]: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fintel-gfx-ci.01.org%2Ftree%2Fdrm-tip%2FCI_DRM_7522%2Ffi-tgl-y%2Figt%40gem_sync%40basic-store-each.html&amp;data=02%7C01%7CJerry.Zuo%40amd.com%7C177d219e9888443af09a08d77cf069e0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637115246025856379&amp;sdata=%2FREmIKDHcmlflARn2bz9%2Bvu905yQiQKHYYQWTNg3kX4%3D&amp;reserved=0
   [14]: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fintel-gfx-ci.01.org%2Ftree%2Fdrm-tip%2FPatchwork_15658%2Ffi-tgl-y%2Figt%40gem_sync%40basic-store-each.html&amp;data=02%7C01%7CJerry.Zuo%40amd.com%7C177d219e9888443af09a08d77cf069e0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637115246025856379&amp;sdata=ZnaMdwYGpC6DoYUpJt%2BP%2F8XW9SFVPgb5f4dNSVd8ZFs%3D&amp;reserved=0

  * igt@i915_selftest@live_gem_contexts:
    - fi-hsw-peppy:       [INCOMPLETE][15] ([i915#694]) -> [PASS][16]
   [15]: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fintel-gfx-ci.01.org%2Ftree%2Fdrm-tip%2FCI_DRM_7522%2Ffi-hsw-peppy%2Figt%40i915_selftest%40live_gem_contexts.html&amp;data=02%7C01%7CJerry.Zuo%40amd.com%7C177d219e9888443af09a08d77cf069e0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637115246025856379&amp;sdata=a75jHEv5KFh3xtxFVxclLzitQU4mKoLluKsMNhYTS%2B8%3D&amp;reserved=0
   [16]: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fintel-gfx-ci.01.org%2Ftree%2Fdrm-tip%2FPatchwork_15658%2Ffi-hsw-peppy%2Figt%40i915_selftest%40live_gem_contexts.html&amp;data=02%7C01%7CJerry.Zuo%40amd.com%7C177d219e9888443af09a08d77cf069e0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637115246025856379&amp;sdata=CSL8rDRhR1ChZfFJISJYXTNi1IEAT3ZKPSl%2BeO3Z2hs%3D&amp;reserved=0

  
#### Warnings ####

  * igt@i915_selftest@live_blt:
    - fi-hsw-4770r:       [DMESG-FAIL][17] ([i915#553] / [i915#725]) -> [DMESG-FAIL][18] ([i915#725])
   [17]: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fintel-gfx-ci.01.org%2Ftree%2Fdrm-tip%2FCI_DRM_7522%2Ffi-hsw-4770r%2Figt%40i915_selftest%40live_blt.html&amp;data=02%7C01%7CJerry.Zuo%40amd.com%7C177d219e9888443af09a08d77cf069e0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637115246025856379&amp;sdata=cEzemGQwfxbYSxWCS0QvJvoKuFMDLx8vH9qVDevzpkk%3D&amp;reserved=0
   [18]: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fintel-gfx-ci.01.org%2Ftree%2Fdrm-tip%2FPatchwork_15658%2Ffi-hsw-4770r%2Figt%40i915_selftest%40live_blt.html&amp;data=02%7C01%7CJerry.Zuo%40amd.com%7C177d219e9888443af09a08d77cf069e0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637115246025856379&amp;sdata=qOpZ6biuylv0NigHb9NP71uUqYKxFjjunhRqPxmwrbg%3D&amp;reserved=0

  * igt@i915_selftest@live_gem_contexts:
    - fi-byt-j1900:       [DMESG-FAIL][19] ([i915#722]) -> [INCOMPLETE][20] ([i915#45])
   [19]: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fintel-gfx-ci.01.org%2Ftree%2Fdrm-tip%2FCI_DRM_7522%2Ffi-byt-j1900%2Figt%40i915_selftest%40live_gem_contexts.html&amp;data=02%7C01%7CJerry.Zuo%40amd.com%7C177d219e9888443af09a08d77cf069e0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637115246025856379&amp;sdata=u8yMEXdCYn3wjafXDGwUPJz58fqNNdNRDXBG9d5%2FhYU%3D&amp;reserved=0
   [20]: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fintel-gfx-ci.01.org%2Ftree%2Fdrm-tip%2FPatchwork_15658%2Ffi-byt-j1900%2Figt%40i915_selftest%40live_gem_contexts.html&amp;data=02%7C01%7CJerry.Zuo%40amd.com%7C177d219e9888443af09a08d77cf069e0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637115246025856379&amp;sdata=HitxhtSE0pRky4dhMB0HlzznoCmJXsyHmA6nrqzIQY4%3D&amp;reserved=0

  * igt@kms_cursor_legacy@basic-flip-after-cursor-atomic:
    - fi-kbl-x1275:       [DMESG-WARN][21] ([i915#62] / [i915#92] / [i915#95]) -> [DMESG-WARN][22] ([i915#62] / [i915#92]) +2 similar issues
   [21]: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fintel-gfx-ci.01.org%2Ftree%2Fdrm-tip%2FCI_DRM_7522%2Ffi-kbl-x1275%2Figt%40kms_cursor_legacy%40basic-flip-after-cursor-atomic.html&amp;data=02%7C01%7CJerry.Zuo%40amd.com%7C177d219e9888443af09a08d77cf069e0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637115246025856379&amp;sdata=DnE92i5R%2BeB2vi9C7VoN8SfjGUjavSgzAy6zUTRGbcc%3D&amp;reserved=0
   [22]: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fintel-gfx-ci.01.org%2Ftree%2Fdrm-tip%2FPatchwork_15658%2Ffi-kbl-x1275%2Figt%40kms_cursor_legacy%40basic-flip-after-cursor-atomic.html&amp;data=02%7C01%7CJerry.Zuo%40amd.com%7C177d219e9888443af09a08d77cf069e0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637115246025866377&amp;sdata=MKRV9pmoQFiT9xrHJPOTxM2Ert5JicNTJxtrorU85bk%3D&amp;reserved=0

  * igt@kms_flip@basic-flip-vs-modeset:
    - fi-kbl-x1275:       [DMESG-WARN][23] ([i915#62] / [i915#92]) -> [DMESG-WARN][24] ([i915#62] / [i915#92] / [i915#95]) +4 similar issues
   [23]: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fintel-gfx-ci.01.org%2Ftree%2Fdrm-tip%2FCI_DRM_7522%2Ffi-kbl-x1275%2Figt%40kms_flip%40basic-flip-vs-modeset.html&amp;data=02%7C01%7CJerry.Zuo%40amd.com%7C177d219e9888443af09a08d77cf069e0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637115246025866377&amp;sdata=95wUe0K%2BHaDssypqaHG3AiFmRyLQykJtAWcAF6taHa8%3D&amp;reserved=0
   [24]: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fintel-gfx-ci.01.org%2Ftree%2Fdrm-tip%2FPatchwork_15658%2Ffi-kbl-x1275%2Figt%40kms_flip%40basic-flip-vs-modeset.html&amp;data=02%7C01%7CJerry.Zuo%40amd.com%7C177d219e9888443af09a08d77cf069e0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637115246025866377&amp;sdata=kcxnPEvgdJJk5dsL7VcVWJqCxuOQu38fNb9%2BIl7wRiY%3D&amp;reserved=0

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#111096]: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugs.freedesktop.org%2Fshow_bug.cgi%3Fid%3D111096&amp;data=02%7C01%7CJerry.Zuo%40amd.com%7C177d219e9888443af09a08d77cf069e0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637115246025866377&amp;sdata=2YjdVhvOJQMtZRhs457%2Fd%2F%2BKMg4D6NX8vrESqA2ekUY%3D&amp;reserved=0
  [i915#323]: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Fdrm%2Fintel%2Fissues%2F323&amp;data=02%7C01%7CJerry.Zuo%40amd.com%7C177d219e9888443af09a08d77cf069e0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637115246025866377&amp;sdata=%2FsDJ6VY5ZkS1g75Rw1Z7kafrpRl%2BalJUbpqQm5xJ0AQ%3D&amp;reserved=0
  [i915#435]: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Fdrm%2Fintel%2Fissues%2F435&amp;data=02%7C01%7CJerry.Zuo%40amd.com%7C177d219e9888443af09a08d77cf069e0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637115246025866377&amp;sdata=ePNuTsvJaWkv5aLxmmtDvYqglpf5tIICyJbKCWBO7kQ%3D&amp;reserved=0
  [i915#45]: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Fdrm%2Fintel%2Fissues%2F45&amp;data=02%7C01%7CJerry.Zuo%40amd.com%7C177d219e9888443af09a08d77cf069e0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637115246025866377&amp;sdata=Lp1II2Vobmnuy5fkpXLH9iaVIIszAMgvBeAjVtny4%2BU%3D&amp;reserved=0
  [i915#476]: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Fdrm%2Fintel%2Fissues%2F476&amp;data=02%7C01%7CJerry.Zuo%40amd.com%7C177d219e9888443af09a08d77cf069e0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637115246025866377&amp;sdata=fYLlmF0jJI7E%2BgMT7E89nG1Mvnd1NNyEhg3UrFCoibc%3D&amp;reserved=0
  [i915#553]: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Fdrm%2Fintel%2Fissues%2F553&amp;data=02%7C01%7CJerry.Zuo%40amd.com%7C177d219e9888443af09a08d77cf069e0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637115246025866377&amp;sdata=ONIiqZkTMKolNMlMy9i6H2OvF4WsQjzb7RpRhhXxzWg%3D&amp;reserved=0
  [i915#62]: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Fdrm%2Fintel%2Fissues%2F62&amp;data=02%7C01%7CJerry.Zuo%40amd.com%7C177d219e9888443af09a08d77cf069e0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637115246025866377&amp;sdata=Zz8y%2FRSqdUWoA3dK18SWT7XyY8ZUdbNmWI4v09aH03M%3D&amp;reserved=0
  [i915#694]: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Fdrm%2Fintel%2Fissues%2F694&amp;data=02%7C01%7CJerry.Zuo%40amd.com%7C177d219e9888443af09a08d77cf069e0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637115246025866377&amp;sdata=xmQZs41y4v6SHNyMItlakJoInGjCv2%2FtdFGnCfpP2nk%3D&amp;reserved=0
  [i915#707]: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Fdrm%2Fintel%2Fissues%2F707&amp;data=02%7C01%7CJerry.Zuo%40amd.com%7C177d219e9888443af09a08d77cf069e0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637115246025866377&amp;sdata=tcvI3sBkN7PV2JjABXwPc1%2BdqlHVwKkmuj1De8Nkn1o%3D&amp;reserved=0
  [i915#722]: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Fdrm%2Fintel%2Fissues%2F722&amp;data=02%7C01%7CJerry.Zuo%40amd.com%7C177d219e9888443af09a08d77cf069e0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637115246025866377&amp;sdata=Smy5OCiHUdc249QbzZ14Odmz%2FhypOEYXT02Fd2I5e9E%3D&amp;reserved=0
  [i915#725]: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Fdrm%2Fintel%2Fissues%2F725&amp;data=02%7C01%7CJerry.Zuo%40amd.com%7C177d219e9888443af09a08d77cf069e0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637115246025866377&amp;sdata=BYJiJyQW3Qt2lU8itHyqQDiY%2FfhTiAm7wwgJtdwIpYk%3D&amp;reserved=0
  [i915#92]: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Fdrm%2Fintel%2Fissues%2F92&amp;data=02%7C01%7CJerry.Zuo%40amd.com%7C177d219e9888443af09a08d77cf069e0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637115246025866377&amp;sdata=Wfp4RdDk05gEbyIegr1Ci1%2FN%2FBnNyDtIiDkPS6CHz%2FQ%3D&amp;reserved=0
  [i915#95]: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Fdrm%2Fintel%2Fissues%2F95&amp;data=02%7C01%7CJerry.Zuo%40amd.com%7C177d219e9888443af09a08d77cf069e0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637115246025876370&amp;sdata=nOf1K0MVKlinGQltPSOJ%2B6tKkK3aWX8ppkTbUtBTCuE%3D&amp;reserved=0


Participating hosts (52 -> 47)
------------------------------

  Missing    (5): fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper 


Build changes
-------------

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_7522 -> Patchwork_15658

  CI-20190529: 20190529
  CI_DRM_7522: 75dcdef38ab3cf24b27ccf29d5aeac201d616e76 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5341: 5fe683cdebde2d77d16ffc42c9fdf29a9f95bb82 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_15658: 96a36e9a97da56fdac55dad89998257680b12200 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

96a36e9a97da drm: Add support for DP 1.4 Compliance edid corruption test

== Logs ==

For more details see: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fintel-gfx-ci.01.org%2Ftree%2Fdrm-tip%2FPatchwork_15658%2Findex.html&amp;data=02%7C01%7CJerry.Zuo%40amd.com%7C177d219e9888443af09a08d77cf069e0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637115246025876370&amp;sdata=5Vj%2FJB6xJw2ucTLmmEtZNSdvngte7o%2B3ZoEh%2FIlY83U%3D&amp;reserved=0
Harry Wentland Dec. 20, 2019, 7:52 p.m. UTC | #2
On 2019-12-20 2:40 p.m., Zuo, Jerry wrote:
> Hi All:
> 
>     I got CI check failures. Among those, hdmi-hpd-fast seems related, but I am not sure why. Please take a brief review and help to determine if it is a real false-positive again. 
> 

It looks like the hdmi-hpd-fast failures are listed under "Known
issues." I imagine that means we can ignore them.

But we also see these failures that are list as "Possible regressions"
and I'm not sure why our patch would've broken those:

#### Possible regressions ####

  * igt@gem_ctx_create@basic-files:
    - fi-byt-j1900:       [PASS][1] -> [FAIL][2]
   [1]:
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7522/fi-byt-j1900/igt@gem_ctx_create@basic-files.html
   [2]:
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15658/fi-byt-j1900/igt@gem_ctx_create@basic-files.html

  * igt@i915_selftest@live_gt_heartbeat:
    - fi-whl-u:           [PASS][3] -> [DMESG-FAIL][4]
   [3]:
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7522/fi-whl-u/igt@i915_selftest@live_gt_heartbeat.html
   [4]:
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15658/fi-whl-u/igt@i915_selftest@live_gt_heartbeat.html

Would love some input from Intel guys on this as we don't want to break
you with this patch.

Thanks,
Harry

>     Thanks a lot.
> 
> Regards,
> Jerry
> 
> -----Original Message-----
> From: Patchwork <patchwork@emeril.freedesktop.org> 
> Sent: December 9, 2019 4:40 PM
> To: Zuo, Jerry <Jerry.Zuo@amd.com>
> Cc: intel-gfx@lists.freedesktop.org
> Subject: ✗ Fi.CI.BAT: failure for drm: Add support for DP 1.4 Compliance edid corruption test (rev3)
> 
> == Series Details ==
> 
> Series: drm: Add support for DP 1.4 Compliance edid corruption test (rev3)
> URL   : https://patchwork.freedesktop.org/series/70530/
> State : failure
> 
> == Summary ==
> 
> CI Bug Log - changes from CI_DRM_7522 -> Patchwork_15658 ====================================================
> 
> Summary
> -------
> 
>   **FAILURE**
> 
>   Serious unknown changes coming with Patchwork_15658 absolutely need to be
>   verified manually.
>   
>   If you think the reported changes have nothing to do with the changes
>   introduced in Patchwork_15658, please notify your bug team to allow them
>   to document this new failure mode, which will reduce false positives in CI.
> 
>   External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15658/index.html
> 
> Possible new issues
> -------------------
> 
>   Here are the unknown changes that may have been introduced in Patchwork_15658:
> 
> ### IGT changes ###
> 
> #### Possible regressions ####
> 
>   * igt@gem_ctx_create@basic-files:
>     - fi-byt-j1900:       [PASS][1] -> [FAIL][2]
>    [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7522/fi-byt-j1900/igt@gem_ctx_create@basic-files.html
>    [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15658/fi-byt-j1900/igt@gem_ctx_create@basic-files.html
> 
>   * igt@i915_selftest@live_gt_heartbeat:
>     - fi-whl-u:           [PASS][3] -> [DMESG-FAIL][4]
>    [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7522/fi-whl-u/igt@i915_selftest@live_gt_heartbeat.html
>    [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15658/fi-whl-u/igt@i915_selftest@live_gt_heartbeat.html
> 
>   
> Known issues
> ------------
> 
>   Here are the changes found in Patchwork_15658 that come from known issues:
> 
> ### IGT changes ###
> 
> #### Issues hit ####
> 
>   * igt@i915_selftest@live_blt:
>     - fi-ivb-3770:        [PASS][5] -> [DMESG-FAIL][6] ([i915#725])
>    [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7522/fi-ivb-3770/igt@i915_selftest@live_blt.html
>    [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15658/fi-ivb-3770/igt@i915_selftest@live_blt.html
>     - fi-hsw-4770:        [PASS][7] -> [DMESG-FAIL][8] ([i915#725])
>    [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7522/fi-hsw-4770/igt@i915_selftest@live_blt.html
>    [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15658/fi-hsw-4770/igt@i915_selftest@live_blt.html
> 
>   * igt@kms_chamelium@hdmi-hpd-fast:
>     - fi-kbl-7500u:       [PASS][9] -> [FAIL][10] ([fdo#111096] / [i915#323])
>    [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7522/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
>    [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15658/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
> 
>   
> #### Possible fixes ####
> 
>   * igt@gem_exec_parallel@basic:
>     - {fi-tgl-u}:         [INCOMPLETE][11] ([i915#476]) -> [PASS][12]
>    [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7522/fi-tgl-u/igt@gem_exec_parallel@basic.html
>    [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15658/fi-tgl-u/igt@gem_exec_parallel@basic.html
> 
>   * igt@gem_sync@basic-store-each:
>     - fi-tgl-y:           [INCOMPLETE][13] ([i915#435]) -> [PASS][14]
>    [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7522/fi-tgl-y/igt@gem_sync@basic-store-each.html
>    [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15658/fi-tgl-y/igt@gem_sync@basic-store-each.html
> 
>   * igt@i915_selftest@live_gem_contexts:
>     - fi-hsw-peppy:       [INCOMPLETE][15] ([i915#694]) -> [PASS][16]
>    [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7522/fi-hsw-peppy/igt@i915_selftest@live_gem_contexts.html
>    [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15658/fi-hsw-peppy/igt@i915_selftest@live_gem_contexts.html
> 
>   
> #### Warnings ####
> 
>   * igt@i915_selftest@live_blt:
>     - fi-hsw-4770r:       [DMESG-FAIL][17] ([i915#553] / [i915#725]) -> [DMESG-FAIL][18] ([i915#725])
>    [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7522/fi-hsw-4770r/igt@i915_selftest@live_blt.html
>    [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15658/fi-hsw-4770r/igt@i915_selftest@live_blt.html
> 
>   * igt@i915_selftest@live_gem_contexts:
>     - fi-byt-j1900:       [DMESG-FAIL][19] ([i915#722]) -> [INCOMPLETE][20] ([i915#45])
>    [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7522/fi-byt-j1900/igt@i915_selftest@live_gem_contexts.html
>    [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15658/fi-byt-j1900/igt@i915_selftest@live_gem_contexts.html
> 
>   * igt@kms_cursor_legacy@basic-flip-after-cursor-atomic:
>     - fi-kbl-x1275:       [DMESG-WARN][21] ([i915#62] / [i915#92] / [i915#95]) -> [DMESG-WARN][22] ([i915#62] / [i915#92]) +2 similar issues
>    [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7522/fi-kbl-x1275/igt@kms_cursor_legacy@basic-flip-after-cursor-atomic.html
>    [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15658/fi-kbl-x1275/igt@kms_cursor_legacy@basic-flip-after-cursor-atomic.html
> 
>   * igt@kms_flip@basic-flip-vs-modeset:
>     - fi-kbl-x1275:       [DMESG-WARN][23] ([i915#62] / [i915#92]) -> [DMESG-WARN][24] ([i915#62] / [i915#92] / [i915#95]) +4 similar issues
>    [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7522/fi-kbl-x1275/igt@kms_flip@basic-flip-vs-modeset.html
>    [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15658/fi-kbl-x1275/igt@kms_flip@basic-flip-vs-modeset.html
> 
>   
>   {name}: This element is suppressed. This means it is ignored when computing
>           the status of the difference (SUCCESS, WARNING, or FAILURE).
> 
>   [fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096
>   [i915#323]: https://gitlab.freedesktop.org/drm/intel/issues/323
>   [i915#435]: https://gitlab.freedesktop.org/drm/intel/issues/435
>   [i915#45]: https://gitlab.freedesktop.org/drm/intel/issues/45
>   [i915#476]: https://gitlab.freedesktop.org/drm/intel/issues/476
>   [i915#553]: https://gitlab.freedesktop.org/drm/intel/issues/553
>   [i915#62]: https://gitlab.freedesktop.org/drm/intel/issues/62
>   [i915#694]: https://gitlab.freedesktop.org/drm/intel/issues/694
>   [i915#707]: https://gitlab.freedesktop.org/drm/intel/issues/707
>   [i915#722]: https://gitlab.freedesktop.org/drm/intel/issues/722
>   [i915#725]: https://gitlab.freedesktop.org/drm/intel/issues/725
>   [i915#92]: https://gitlab.freedesktop.org/drm/intel/issues/92
>   [i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95
> 
> 
> Participating hosts (52 -> 47)
> ------------------------------
> 
>   Missing    (5): fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper 
> 
> 
> Build changes
> -------------
> 
>   * CI: CI-20190529 -> None
>   * Linux: CI_DRM_7522 -> Patchwork_15658
> 
>   CI-20190529: 20190529
>   CI_DRM_7522: 75dcdef38ab3cf24b27ccf29d5aeac201d616e76 @ git://anongit.freedesktop.org/gfx-ci/linux
>   IGT_5341: 5fe683cdebde2d77d16ffc42c9fdf29a9f95bb82 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
>   Patchwork_15658: 96a36e9a97da56fdac55dad89998257680b12200 @ git://anongit.freedesktop.org/gfx-ci/linux
> 
> 
> == Linux commits ==
> 
> 96a36e9a97da drm: Add support for DP 1.4 Compliance edid corruption test
> 
> == Logs ==
> 
> For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15658/index.html
>

Patch
diff mbox series

diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c
index 2c7870aef469..85a777ce98ba 100644
--- a/drivers/gpu/drm/drm_dp_helper.c
+++ b/drivers/gpu/drm/drm_dp_helper.c
@@ -351,6 +351,41 @@  int drm_dp_dpcd_read_link_status(struct drm_dp_aux *aux,
 }
 EXPORT_SYMBOL(drm_dp_dpcd_read_link_status);
 
+/**
+ * drm_dp_send_real_edid_checksum() - send back real edid checksum value
+ * @aux: DisplayPort AUX channel
+ * @real_edid_checksum: real edid checksum for the last block
+ *
+ * Returns true on success
+ */
+bool drm_dp_send_real_edid_checksum(struct drm_dp_aux *aux,
+                                    u8 real_edid_checksum)
+{
+	u8 link_edid_read = 0, auto_test_req = 0, test_resp = 0;
+
+	drm_dp_dpcd_read(aux, DP_DEVICE_SERVICE_IRQ_VECTOR, &auto_test_req, 1);
+	auto_test_req &= DP_AUTOMATED_TEST_REQUEST;
+
+	drm_dp_dpcd_read(aux, DP_TEST_REQUEST, &link_edid_read, 1);
+	link_edid_read &= DP_TEST_LINK_EDID_READ;
+
+	if (!auto_test_req || !link_edid_read) {
+		DRM_DEBUG_KMS("Source DUT does not support TEST_EDID_READ\n");
+		return false;
+	}
+
+	drm_dp_dpcd_write(aux, DP_DEVICE_SERVICE_IRQ_VECTOR, &auto_test_req, 1);
+
+	/* send back checksum for the last edid extension block data */
+	drm_dp_dpcd_write(aux, DP_TEST_EDID_CHECKSUM, &real_edid_checksum, 1);
+
+	test_resp |= DP_TEST_EDID_CHECKSUM_WRITE;
+	drm_dp_dpcd_write(aux, DP_TEST_RESPONSE, &test_resp, 1);
+
+	return true;
+}
+EXPORT_SYMBOL(drm_dp_send_real_edid_checksum);
+
 /**
  * drm_dp_downstream_max_clock() - extract branch device max
  *                                 pixel rate for legacy VGA
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 5b33b7cfd645..0e35405ecc74 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -1450,11 +1450,22 @@  static int validate_displayid(u8 *displayid, int length, int idx);
 static int drm_edid_block_checksum(const u8 *raw_edid)
 {
 	int i;
-	u8 csum = 0;
-	for (i = 0; i < EDID_LENGTH; i++)
+	u8 csum = 0, crc = 0;
+
+	for (i = 0; i < EDID_LENGTH - 1; i++)
 		csum += raw_edid[i];
 
-	return csum;
+	crc = 0x100 - csum;
+
+	return crc;
+}
+
+static bool drm_edid_block_checksum_diff(const u8 *raw_edid, u8 real_checksum)
+{
+	if (raw_edid[EDID_LENGTH - 1] != real_checksum)
+		return true;
+	else
+		return false;
 }
 
 static bool drm_edid_is_zero(const u8 *in_edid, int length)
@@ -1512,7 +1523,7 @@  bool drm_edid_block_valid(u8 *raw_edid, int block, bool print_bad_edid,
 	}
 
 	csum = drm_edid_block_checksum(raw_edid);
-	if (csum) {
+	if (drm_edid_block_checksum_diff(raw_edid, csum)) {
 		if (edid_corrupt)
 			*edid_corrupt = true;
 
@@ -1653,6 +1664,7 @@  static void connector_bad_edid(struct drm_connector *connector,
 			       u8 *edid, int num_blocks)
 {
 	int i;
+	u8 num_of_ext = edid[0x7e];
 
 	if (connector->bad_edid_counter++ && !drm_debug_enabled(DRM_UT_KMS))
 		return;
@@ -1675,6 +1687,9 @@  static void connector_bad_edid(struct drm_connector *connector,
 			       prefix, DUMP_PREFIX_NONE, 16, 1,
 			       block, EDID_LENGTH, false);
 	}
+
+	/* Calculate real checksum for the last edid extension block data */
+	connector->real_edid_checksum = drm_edid_block_checksum(edid + num_of_ext * EDID_LENGTH);
 }
 
 /* Get override or firmware EDID */
diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
index 5f8c3389d46f..b07d8276a58c 100644
--- a/include/drm/drm_connector.h
+++ b/include/drm/drm_connector.h
@@ -1349,6 +1349,12 @@  struct drm_connector {
 	 * rev1.1 4.2.2.6
 	 */
 	bool edid_corrupt;
+	/**
+	 * @real_edid_checksum: real edid checksum for corrupted edid block.
+	 * Required in Displayport 1.4 compliance testing
+	 * rev1.1 4.2.2.6
+	 */
+	u8 real_edid_checksum;
 
 	/** @debugfs_entry: debugfs directory for this connector */
 	struct dentry *debugfs_entry;
diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
index 8f8f3632e697..8f50b2d5aa1e 100644
--- a/include/drm/drm_dp_helper.h
+++ b/include/drm/drm_dp_helper.h
@@ -1457,6 +1457,9 @@  static inline ssize_t drm_dp_dpcd_writeb(struct drm_dp_aux *aux,
 int drm_dp_dpcd_read_link_status(struct drm_dp_aux *aux,
 				 u8 status[DP_LINK_STATUS_SIZE]);
 
+bool drm_dp_send_real_edid_checksum(struct drm_dp_aux *aux,
+				    u8 real_edid_checksum);
+
 int drm_dp_downstream_max_clock(const u8 dpcd[DP_RECEIVER_CAP_SIZE],
 				const u8 port_cap[4]);
 int drm_dp_downstream_max_bpc(const u8 dpcd[DP_RECEIVER_CAP_SIZE],