drm/i915/dp: DP PHY compliance for JSL
PATCH 1/1 drm/i915/dp: DP PHY compliance for JSL
--- drivers/gpu/drm/i915/display/intel_dp.c | 40 ++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 8 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +32 -8
@@ -5470,22 +5470,32 @@ intel_dp_autotest_phy_ddi_disable(struct intel_dp *intel_dp)struct drm_i915_private *dev_priv =to_i915 (dev);struct intel_crtc *crtc =to_intel_crtc (intel_dig_port->base.base.crtc);enum pipe pipe = crtc->pipe; -u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value; +u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value, trans_ddi_port_mask; +enum port port = intel_dig_port->base.port; +i915_reg_t dp_tp_reg; + +if (IS_ELKHARTLAKE (dev_priv)) { + dp_tp_reg =DP_TP_CTL (port); + trans_ddi_port_mask =TRANS_DDI_PORT_MASK ; + }else if (IS_TIGERLAKE (dev_priv)) { + dp_tp_reg =TGL_DP_TP_CTL (pipe); + trans_ddi_port_mask =TGL_TRANS_DDI_PORT_MASK ; + } trans_ddi_func_ctl_value =intel_de_read (dev_priv,TRANS_DDI_FUNC_CTL (pipe)); trans_conf_value =intel_de_read (dev_priv,PIPECONF (pipe)); - dp_tp_ctl_value =intel_de_read (dev_priv,TGL_DP_TP_CTL (pipe)); + dp_tp_ctl_value =intel_de_read (dev_priv, dp_tp_reg); trans_ddi_func_ctl_value &= ~(TRANS_DDI_FUNC_ENABLE | -TGL_TRANS_DDI_PORT_MASK ); + trans_ddi_port_mask); trans_conf_value &= ~PIPECONF_ENABLE ; dp_tp_ctl_value &= ~DP_TP_CTL_ENABLE ;intel_de_write (dev_priv,PIPECONF (pipe), trans_conf_value);intel_de_write (dev_priv,TRANS_DDI_FUNC_CTL (pipe), trans_ddi_func_ctl_value); -intel_de_write (dev_priv,TGL_DP_TP_CTL (pipe), dp_tp_ctl_value); +intel_de_write (dev_priv, dp_tp_reg, dp_tp_ctl_value); } static void
@@ -5497,20 +5507,28 @@ intel_dp_autotest_phy_ddi_enable(struct intel_dp *intel_dp, uint8_t lane_cnt)enum port port = intel_dig_port->base.port;struct intel_crtc *crtc =to_intel_crtc (intel_dig_port->base.base.crtc);enum pipe pipe = crtc->pipe; -u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value; +u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value, trans_ddi_sel_port; +i915_reg_t dp_tp_reg; + +if (IS_ELKHARTLAKE (dev_priv)) { + dp_tp_reg =DP_TP_CTL (port); + trans_ddi_sel_port =TRANS_DDI_SELECT_PORT (port); + }else if (IS_TIGERLAKE (dev_priv)) { + dp_tp_reg =TGL_DP_TP_CTL (pipe); + trans_ddi_sel_port =TGL_TRANS_DDI_SELECT_PORT (port); + } trans_ddi_func_ctl_value =intel_de_read (dev_priv,TRANS_DDI_FUNC_CTL (pipe)); trans_conf_value =intel_de_read (dev_priv,PIPECONF (pipe)); dp_tp_ctl_value =intel_de_read (dev_priv,TGL_DP_TP_CTL (pipe)); - trans_ddi_func_ctl_value |=TRANS_DDI_FUNC_ENABLE | -TGL_TRANS_DDI_SELECT_PORT (port); + trans_ddi_sel_port; trans_conf_value |=PIPECONF_ENABLE ; dp_tp_ctl_value |=DP_TP_CTL_ENABLE ;intel_de_write (dev_priv,PIPECONF (pipe), trans_conf_value); -intel_de_write (dev_priv,TGL_DP_TP_CTL (pipe), dp_tp_ctl_value); +intel_de_write (dev_priv, dp_tp_reg, dp_tp_ctl_value);intel_de_write (dev_priv,TRANS_DDI_FUNC_CTL (pipe), trans_ddi_func_ctl_value); }
@@ -5557,6 +5575,7 @@ static u8 intel_dp_autotest_phy_pattern(struct intel_dp *intel_dp)static void intel_dp_handle_test_request (struct intel_dp *intel_dp) {struct drm_i915_private *i915 =dp_to_i915 (intel_dp); +struct drm_i915_private *dev_priv = i915;u8 response =DP_TEST_NAK ;u8 request =0 ;int status;
@@ -5582,6 +5601,11 @@ static void intel_dp_handle_test_request(struct intel_dp *intel_dp) response =intel_dp_autotest_edid (intel_dp);break ;case DP_TEST_LINK_PHY_TEST_PATTERN : +if (!IS_ELKHARTLAKE (dev_priv) || !IS_TIGERLAKE (dev_priv)) { +drm_dbg_kms (&i915->drm, +"PHY compliance for platform not supported\n" ); +return ; + }drm_dbg_kms (&i915->drm,"PHY_PATTERN test requested\n" ); response =intel_dp_autotest_phy_pattern (intel_dp);break ;
Signature · 6 lines
2.7.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Patchwork
CI[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/dp: DP PHY compliance for JSL
== Series Details ==
== Series Details ==
Series: drm/i915/dp: DP PHY compliance for JSL
URL : https://patchwork.freedesktop.org/series/77977/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip ce289f0dd8a5 drm/i915/dp: DP PHY compliance for JSL -:7: WARNING:COMMIT_MESSAGE: Missing commit description - Add an appropriate one
-:97: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #97: FILE: drivers/gpu/drm/i915/display/intel_dp.c:5561:
+ drm_dbg_kms(&i915->drm,
+ "PHY compliance for platform not supported\n");
total: 0 errors, 1 warnings, 1 checks, 86 lines checked
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/dp: DP PHY compliance for JSL
In reply to Vidya Srinivas== Series Details ==
== Series Details ==
Series: drm/i915/dp: DP PHY compliance for JSL
URL : https://patchwork.freedesktop.org/series/77977/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_8579 -> Patchwork_17863
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/index.html
Known issues
------------
Here are the changes found in Patchwork_17863 that come from known issues:
### IGT changes ###
#### Possible fixes ####
* igt@i915_module_load@reload:
- fi-byt-n2820: [DMESG-WARN][1] ([i915#1982]) -> [PASS][2] +1 similar issue
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/fi-byt-n2820/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/fi-byt-n2820/igt@[email protected]
* {igt@kms_flip@basic-flip-vs-wf_vblank@b-dvi-d1}:
- fi-bwr-2160: [FAIL][3] ([i915#1928]) -> [PASS][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/fi-bwr-2160/igt@kms_flip@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/fi-bwr-2160/igt@kms_flip@[email protected]
#### Warnings ####
* igt@kms_force_connector_basic@force-edid:
- fi-kbl-x1275: [DMESG-WARN][5] ([i915#62] / [i915#92]) -> [DMESG-WARN][6] ([i915#62] / [i915#92] / [i915#95]) +3 similar issues
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/fi-kbl-x1275/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/fi-kbl-x1275/igt@[email protected]
* igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a-frame-sequence:
- fi-kbl-x1275: [DMESG-WARN][7] ([i915#62] / [i915#92] / [i915#95]) -> [DMESG-WARN][8] ([i915#62] / [i915#92]) +3 similar issues
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/fi-kbl-x1275/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/fi-kbl-x1275/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[i915#1928]: https://gitlab.freedesktop.org/drm/intel/issues/1928
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#62]: https://gitlab.freedesktop.org/drm/intel/issues/62
[i915#92]: https://gitlab.freedesktop.org/drm/intel/issues/92
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95
Participating hosts (51 -> 44)
------------------------------
Missing (7): fi-ilk-m540 fi-hsw-4200u fi-bdw-gvtdvm fi-byt-squawks fi-bsw-cyan fi-byt-clapper fi-bdw-samus
Build changes
-------------
* Linux: CI_DRM_8579 -> Patchwork_17863
CI-20190529: 20190529
CI_DRM_8579: 289eb12c88c49a4ac8d325dc457d8878c7f5bdc0 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5694: a9b6c4c74bfddf7d3d2da3be08804fe315945cea @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_17863: ce289f0dd8a55b4539309ed6a20bcd48ff88f449 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
ce289f0dd8a5 drm/i915/dp: DP PHY compliance for JSL
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/dp: DP PHY compliance for JSL
In reply to Vidya Srinivas== Series Details ==
== Series Details ==
Series: drm/i915/dp: DP PHY compliance for JSL
URL : https://patchwork.freedesktop.org/series/77977/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_8579_full -> Patchwork_17863_full
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_17863_full absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_17863_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_17863_full:
### IGT changes ###
#### Possible regressions ####
* igt@i915_pm_dc@dc5-dpms:
- shard-tglb: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/shard-tglb5/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-tglb7/igt@[email protected]
Known issues
------------
Here are the changes found in Patchwork_17863_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_balancer@invalid-balancer:
- shard-glk: [PASS][3] -> [FAIL][4] ([i915#1927])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/shard-glk9/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-glk2/igt@[email protected]
* igt@gem_mmap_offset@basic-uaf:
- shard-apl: [PASS][5] -> [DMESG-WARN][6] ([i915#95]) +20 similar issues
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/shard-apl3/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-apl1/igt@[email protected]
* igt@i915_suspend@debugfs-reader:
- shard-kbl: [PASS][7] -> [DMESG-WARN][8] ([i915#180]) +1 similar issue
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/shard-kbl7/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-kbl3/igt@[email protected]
* igt@i915_suspend@forcewake:
- shard-apl: [PASS][9] -> [DMESG-WARN][10] ([i915#180])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/shard-apl3/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-apl6/igt@[email protected]
* igt@kms_big_fb@linear-32bpp-rotate-180:
- shard-skl: [PASS][11] -> [DMESG-WARN][12] ([i915#1982]) +3 similar issues
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/shard-skl7/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-skl3/igt@[email protected]
* igt@kms_big_fb@y-tiled-32bpp-rotate-90:
- shard-apl: [PASS][13] -> [DMESG-WARN][14] ([i915#1982])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/shard-apl4/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-apl4/igt@[email protected]
* igt@kms_big_fb@y-tiled-64bpp-rotate-180:
- shard-iclb: [PASS][15] -> [DMESG-WARN][16] ([i915#1982])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/shard-iclb7/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-iclb3/igt@[email protected]
* igt@kms_draw_crc@draw-method-rgb565-mmap-cpu-untiled:
- shard-skl: [PASS][17] -> [FAIL][18] ([i915#52] / [i915#54])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/shard-skl4/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-skl8/igt@[email protected]
* igt@kms_flip_tiling@flip-yf-tiled:
- shard-skl: [PASS][19] -> [FAIL][20] ([fdo#108145])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/shard-skl7/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-skl3/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbc-badstride:
- shard-glk: [PASS][21] -> [DMESG-WARN][22] ([i915#1982])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/shard-glk4/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-glk5/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-move:
- shard-tglb: [PASS][23] -> [DMESG-WARN][24] ([i915#1982]) +1 similar issue
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/shard-tglb5/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-tglb7/igt@[email protected]
* igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-mmap-cpu:
- shard-skl: [PASS][25] -> [FAIL][26] ([i915#49])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/shard-skl7/igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-mmap-cpu.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-skl3/igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-mmap-cpu.html
* igt@kms_hdr@bpc-switch-dpms:
- shard-skl: [PASS][27] -> [FAIL][28] ([i915#1188])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/shard-skl9/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-skl7/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min:
- shard-skl: [PASS][29] -> [FAIL][30] ([fdo#108145] / [i915#265]) +1 similar issue
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/shard-skl7/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-skl3/igt@[email protected]
* igt@kms_psr@psr2_primary_page_flip:
- shard-iclb: [PASS][31] -> [SKIP][32] ([fdo#109441]) +2 similar issues
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/shard-iclb2/igt@kms_psr@psr2_primary_page_flip.html
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-iclb8/igt@kms_psr@psr2_primary_page_flip.html
* igt@kms_vblank@pipe-a-ts-continuation-dpms-suspend:
- shard-skl: [PASS][33] -> [INCOMPLETE][34] ([i915#69])
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/shard-skl2/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-skl2/igt@[email protected]
* igt@syncobj_wait@single-wait-all-signaled:
- shard-kbl: [PASS][35] -> [DMESG-WARN][36] ([i915#93] / [i915#95]) +1 similar issue
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/shard-kbl7/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-kbl3/igt@[email protected]
#### Possible fixes ####
* {igt@gem_exec_schedule@implicit-write-read@rcs0}:
- shard-snb: [INCOMPLETE][37] ([i915#82]) -> [PASS][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/shard-snb5/igt@gem_exec_schedule@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-snb6/igt@gem_exec_schedule@[email protected]
* igt@gem_exec_whisper@basic-contexts-forked-all:
- shard-glk: [DMESG-WARN][39] ([i915#118] / [i915#95]) -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/shard-glk7/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-glk7/igt@[email protected]
* igt@gem_workarounds@suspend-resume-context:
- shard-apl: [DMESG-WARN][41] ([i915#180]) -> [PASS][42] +2 similar issues
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/shard-apl6/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-apl2/igt@[email protected]
* igt@kms_big_fb@yf-tiled-32bpp-rotate-0:
- shard-skl: [DMESG-WARN][43] ([i915#1982]) -> [PASS][44] +8 similar issues
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/shard-skl5/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-skl10/igt@[email protected]
* igt@kms_cursor_crc@pipe-a-cursor-256x256-onscreen:
- shard-tglb: [DMESG-WARN][45] ([i915#402]) -> [PASS][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/shard-tglb2/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-tglb2/igt@[email protected]
* {igt@kms_flip@flip-vs-expired-vblank-interruptible@b-edp1}:
- shard-skl: [FAIL][47] ([i915#46]) -> [PASS][48]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/shard-skl5/igt@kms_flip@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-skl10/igt@kms_flip@[email protected]
* {igt@kms_flip@plain-flip-fb-recreate-interruptible@a-dp1}:
- shard-kbl: [DMESG-WARN][49] ([i915#1982]) -> [PASS][50]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/shard-kbl1/igt@kms_flip@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-kbl7/igt@kms_flip@[email protected]
* igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-mmap-wc:
- shard-tglb: [DMESG-WARN][51] ([i915#1982]) -> [PASS][52]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/shard-tglb7/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-mmap-wc.html
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-tglb3/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-mmap-wc.html
* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes:
- shard-skl: [INCOMPLETE][53] ([i915#69]) -> [PASS][54]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/shard-skl8/igt@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-skl1/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-b-coverage-7efc:
- shard-skl: [FAIL][55] ([fdo#108145] / [i915#265]) -> [PASS][56] +1 similar issue
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/shard-skl1/igt@[email protected]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-skl3/igt@[email protected]
* igt@kms_plane_scaling@pipe-a-scaler-with-clipping-clamping:
- shard-iclb: [DMESG-WARN][57] ([i915#1982]) -> [PASS][58] +1 similar issue
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/shard-iclb3/igt@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-iclb3/igt@[email protected]
* igt@kms_psr@psr2_sprite_plane_move:
- shard-iclb: [SKIP][59] ([fdo#109441]) -> [PASS][60] +2 similar issues
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/shard-iclb6/igt@kms_psr@psr2_sprite_plane_move.html
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-iclb2/igt@kms_psr@psr2_sprite_plane_move.html
* igt@kms_setmode@basic:
- shard-glk: [FAIL][61] ([i915#31]) -> [PASS][62]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/shard-glk8/igt@[email protected]
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-glk6/igt@[email protected]
* igt@kms_vblank@pipe-a-ts-continuation-suspend:
- shard-kbl: [DMESG-WARN][63] ([i915#180]) -> [PASS][64] +5 similar issues
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/shard-kbl3/igt@[email protected]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-kbl4/igt@[email protected]
* {igt@perf@blocking-parameterized}:
- shard-tglb: [FAIL][65] ([i915#1542]) -> [PASS][66]
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/shard-tglb7/igt@[email protected]
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-tglb7/igt@[email protected]
* igt@perf_pmu@rc6-runtime-pm:
- shard-glk: [TIMEOUT][67] ([i915#1958]) -> [PASS][68] +3 similar issues
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/shard-glk5/igt@[email protected]
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-glk6/igt@[email protected]
* igt@vgem_basic@dmabuf-mmap:
- shard-apl: [DMESG-WARN][69] ([i915#95]) -> [PASS][70] +18 similar issues
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/shard-apl2/igt@[email protected]
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-apl3/igt@[email protected]
#### Warnings ####
* igt@i915_pm_rc6_residency@rc6-idle:
- shard-iclb: [WARN][71] ([i915#1515]) -> [FAIL][72] ([i915#1515])
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/shard-iclb2/igt@[email protected]
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-iclb8/igt@[email protected]
* igt@kms_content_protection@atomic:
- shard-apl: [TIMEOUT][73] ([i915#1319] / [i915#1635]) -> [DMESG-FAIL][74] ([fdo#110321] / [i915#95])
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/shard-apl6/igt@[email protected]
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-apl6/igt@[email protected]
* igt@kms_content_protection@atomic-dpms:
- shard-apl: [TIMEOUT][75] ([i915#1319]) -> [FAIL][76] ([fdo#110321] / [fdo#110336])
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/shard-apl1/igt@[email protected]
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-apl1/igt@[email protected]
* igt@kms_content_protection@srm:
- shard-apl: [FAIL][77] ([fdo#110321]) -> [TIMEOUT][78] ([i915#1319] / [i915#1635])
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/shard-apl2/igt@[email protected]
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-apl8/igt@[email protected]
* igt@kms_dp_dsc@basic-dsc-enable-edp:
- shard-iclb: [SKIP][79] ([fdo#109349]) -> [DMESG-WARN][80] ([i915#1226])
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/shard-iclb6/igt@[email protected]
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-iclb2/igt@[email protected]
* igt@kms_vblank@pipe-d-query-idle-hang:
- shard-glk: [TIMEOUT][81] ([i915#1640] / [i915#1958]) -> [SKIP][82] ([fdo#109271])
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/shard-glk5/igt@[email protected]
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-glk6/igt@[email protected]
* igt@runner@aborted:
- shard-glk: [FAIL][83] ([k.org#202321]) -> ([FAIL][84], [FAIL][85]) ([i915#1611] / [k.org#202321])
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8579/shard-glk9/igt@[email protected]
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-glk6/igt@[email protected]
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/shard-glk2/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109349]: https://bugs.freedesktop.org/show_bug.cgi?id=109349
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#110321]: https://bugs.freedesktop.org/show_bug.cgi?id=110321
[fdo#110336]: https://bugs.freedesktop.org/show_bug.cgi?id=110336
[i915#118]: https://gitlab.freedesktop.org/drm/intel/issues/118
[i915#1188]: https://gitlab.freedesktop.org/drm/intel/issues/1188
[i915#1226]: https://gitlab.freedesktop.org/drm/intel/issues/1226
[i915#1319]: https://gitlab.freedesktop.org/drm/intel/issues/1319
[i915#1515]: https://gitlab.freedesktop.org/drm/intel/issues/1515
[i915#1542]: https://gitlab.freedesktop.org/drm/intel/issues/1542
[i915#1611]: https://gitlab.freedesktop.org/drm/intel/issues/1611
[i915#1635]: https://gitlab.freedesktop.org/drm/intel/issues/1635
[i915#1640]: https://gitlab.freedesktop.org/drm/intel/issues/1640
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#1927]: https://gitlab.freedesktop.org/drm/intel/issues/1927
[i915#1930]: https://gitlab.freedesktop.org/drm/intel/issues/1930
[i915#1958]: https://gitlab.freedesktop.org/drm/intel/issues/1958
[i915#198]: https://gitlab.freedesktop.org/drm/intel/issues/198
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
[i915#275]: https://gitlab.freedesktop.org/drm/intel/issues/275
[i915#31]: https://gitlab.freedesktop.org/drm/intel/issues/31
[i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402
[i915#46]: https://gitlab.freedesktop.org/drm/intel/issues/46
[i915#49]: https://gitlab.freedesktop.org/drm/intel/issues/49
[i915#52]: https://gitlab.freedesktop.org/drm/intel/issues/52
[i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54
[i915#69]: https://gitlab.freedesktop.org/drm/intel/issues/69
[i915#82]: https://gitlab.freedesktop.org/drm/intel/issues/82
[i915#93]: https://gitlab.freedesktop.org/drm/intel/issues/93
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95
[k.org#202321]: https://bugzilla.kernel.org/show_bug.cgi?id=202321
Participating hosts (11 -> 11)
------------------------------
No changes in participating hosts
Build changes
-------------
* Linux: CI_DRM_8579 -> Patchwork_17863
CI-20190529: 20190529
CI_DRM_8579: 289eb12c88c49a4ac8d325dc457d8878c7f5bdc0 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5694: a9b6c4c74bfddf7d3d2da3be08804fe315945cea @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_17863: ce289f0dd8a55b4539309ed6a20bcd48ff88f449 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17863/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 34 lines · Vidya Srinivas
Signed-off-by Khaled Almahallawy <[email protected]>Signed-off-by Vidya Srinivas <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp.c | 40 ++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 8 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +12
-2@@ -5470,22 +5470,32 @@ intel_dp_autotest_phy_ddi_disable(struct intel_dp *intel_dp)struct drm_i915_private *dev_priv =to_i915 (dev);struct intel_crtc *crtc =to_intel_crtc (intel_dig_port->base.base.crtc);enum pipe pipe = crtc->pipe; -u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value; +u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value, trans_ddi_port_mask; +enum port port = intel_dig_port->base.port; +i915_reg_t dp_tp_reg; + +if (IS_ELKHARTLAKE (dev_priv)) { + dp_tp_reg =DP_TP_CTL (port); + trans_ddi_port_mask =TRANS_DDI_PORT_MASK ; + }else if (IS_TIGERLAKE (dev_priv)) { + dp_tp_reg =TGL_DP_TP_CTL (pipe); + trans_ddi_port_mask =TGL_TRANS_DDI_PORT_MASK ; + } trans_ddi_func_ctl_value =intel_de_read (dev_priv,TRANS_DDI_FUNC_CTL (pipe)); trans_conf_value =intel_de_read (dev_priv,PIPECONF (pipe)); - dp_tp_ctl_value =intel_de_read (dev_priv,TGL_DP_TP_CTL (pipe)); + dp_tp_ctl_value =intel_de_read (dev_priv, dp_tp_reg); trans_ddi_func_ctl_value &= ~(TRANS_DDI_FUNC_ENABLE |
drivers/gpu/drm/i915/display/intel_dp.c intel_dp_autotest_phy_ddi_disable(struct intel_dp *intel_dp) · line 5498
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_dp.c +2
-2- TGL_TRANS_DDI_PORT_MASK); + trans_ddi_port_mask); trans_conf_value &= ~PIPECONF_ENABLE ; dp_tp_ctl_value &= ~DP_TP_CTL_ENABLE ;intel_de_write (dev_priv,PIPECONF (pipe), trans_conf_value);intel_de_write (dev_priv,TRANS_DDI_FUNC_CTL (pipe), trans_ddi_func_ctl_value); -intel_de_write (dev_priv,TGL_DP_TP_CTL (pipe), dp_tp_ctl_value); +intel_de_write (dev_priv, dp_tp_reg, dp_tp_ctl_value);
All this ad-hoc modeset code really should not exist. It's going to have different bugs than the norma modeset paths, so compliance testing this special code proves absolutely nothing about the normal modeset code. IMO someone needs to take up the task of rewrtiting all this to just perform normal modesets.
Quoted 63 lines
drivers/gpu/drm/i915/display/intel_dp.c +18
-4} static void@@ -5497,20 +5507,28 @@ intel_dp_autotest_phy_ddi_enable(struct intel_dp *intel_dp, uint8_t lane_cnt)enum port port = intel_dig_port->base.port;struct intel_crtc *crtc =to_intel_crtc (intel_dig_port->base.base.crtc);enum pipe pipe = crtc->pipe; -u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value; +u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value, trans_ddi_sel_port; +i915_reg_t dp_tp_reg; + +if (IS_ELKHARTLAKE (dev_priv)) { + dp_tp_reg =DP_TP_CTL (port); + trans_ddi_sel_port =TRANS_DDI_SELECT_PORT (port); + }else if (IS_TIGERLAKE (dev_priv)) { + dp_tp_reg =TGL_DP_TP_CTL (pipe); + trans_ddi_sel_port =TGL_TRANS_DDI_SELECT_PORT (port); + } trans_ddi_func_ctl_value =intel_de_read (dev_priv,TRANS_DDI_FUNC_CTL (pipe)); trans_conf_value =intel_de_read (dev_priv,PIPECONF (pipe)); dp_tp_ctl_value =intel_de_read (dev_priv,TGL_DP_TP_CTL (pipe)); - trans_ddi_func_ctl_value |=TRANS_DDI_FUNC_ENABLE | -TGL_TRANS_DDI_SELECT_PORT (port); + trans_ddi_sel_port; trans_conf_value |=PIPECONF_ENABLE ; dp_tp_ctl_value |=DP_TP_CTL_ENABLE ;intel_de_write (dev_priv,PIPECONF (pipe), trans_conf_value); -intel_de_write (dev_priv,TGL_DP_TP_CTL (pipe), dp_tp_ctl_value); +intel_de_write (dev_priv, dp_tp_reg, dp_tp_ctl_value);intel_de_write (dev_priv,TRANS_DDI_FUNC_CTL (pipe), trans_ddi_func_ctl_value); }@@ -5557,6 +5575,7 @@ static u8 intel_dp_autotest_phy_pattern(struct intel_dp *intel_dp)static void intel_dp_handle_test_request (struct intel_dp *intel_dp) {struct drm_i915_private *i915 =dp_to_i915 (intel_dp); +struct drm_i915_private *dev_priv = i915;u8 response =DP_TEST_NAK ;u8 request =0 ;int status;@@ -5582,6 +5601,11 @@ static void intel_dp_handle_test_request(struct intel_dp *intel_dp) response =intel_dp_autotest_edid (intel_dp);break ;case DP_TEST_LINK_PHY_TEST_PATTERN : +if (!IS_ELKHARTLAKE (dev_priv) || !IS_TIGERLAKE (dev_priv)) { +drm_dbg_kms (&i915->drm, +"PHY compliance for platform not supported\n" ); +return ; + }drm_dbg_kms (&i915->drm,"PHY_PATTERN test requested\n" ); response =intel_dp_autotest_phy_pattern (intel_dp);break ;Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 47 lines · Ville Syrjälä
Quoted 46 lines · Vidya Srinivas
Signed-off-by Khaled Almahallawy <[email protected]>Signed-off-by Vidya Srinivas <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp.c | 40 ++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 8 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +13
-3@@ -5470,22 +5470,32 @@ intel_dp_autotest_phy_ddi_disable(struct intel_dp *intel_dp)struct drm_i915_private *dev_priv =to_i915 (dev);struct intel_crtc *crtc =to_intel_crtc (intel_dig_port- >base.base.crtc);enum pipe pipe = crtc->pipe; -u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value; +u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value, trans_ddi_port_mask; +enum port port = intel_dig_port->base.port; +i915_reg_t dp_tp_reg; + +if (IS_ELKHARTLAKE (dev_priv)) { + dp_tp_reg =DP_TP_CTL (port); + trans_ddi_port_mask =TRANS_DDI_PORT_MASK ; + }else if (IS_TIGERLAKE (dev_priv)) { + dp_tp_reg =TGL_DP_TP_CTL (pipe); + trans_ddi_port_mask =TGL_TRANS_DDI_PORT_MASK ; + } trans_ddi_func_ctl_value =intel_de_read (dev_priv,TRANS_DDI_FUNC_CTL (pip e)); trans_conf_value =intel_de_read (dev_priv,PIPECONF (pipe)); - dp_tp_ctl_value =intel_de_read (dev_priv,TGL_DP_TP_CTL (pipe)); + dp_tp_ctl_value =intel_de_read (dev_priv, dp_tp_reg); trans_ddi_func_ctl_value &= ~(TRANS_DDI_FUNC_ENABLE | -TGL_TRANS_DDI_PORT_MASK ); + trans_ddi_port_mask); trans_conf_value &= ~PIPECONF_ENABLE ; dp_tp_ctl_value &= ~DP_TP_CTL_ENABLE ;
Quoted 12 lines
drivers/gpu/drm/i915/display/intel_dp.c intel_dp_autotest_phy_ddi_disable(struct intel_dp *intel_dp) · line 5498
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_dp.c +0
-0intel_de_write (dev_priv,PIPECONF (pipe), trans_conf_value); intel_de_write(dev_priv, TRANS_DDI_FUNC_CTL(pipe),drivers/gpu/drm/i915/display/intel_dp.c +1
-1trans_ddi_func_ctl_value); -intel_de_write (dev_priv,TGL_DP_TP_CTL (pipe), dp_tp_ctl_value); +intel_de_write (dev_priv, dp_tp_reg, dp_tp_ctl_value);All this ad-hoc modeset code really should not exist. It's going to have different bugs than the norma modeset paths, so compliance testing
this special code proves absolutely nothing about the normal modeset code. IMO someone needs to take up the task of rewrtiting all this to just perform normal modesets.
Agree. I've just found that we get kernel NULL pointer dereference and panic when we try to access to_intel_crtc(intel_dig_port-
Quoted 1 line
base.base.crtc). This is because we didn't realize when we developed
the code that test scope has an option to send PHY test request on Long HPD. Current desing assume PHY test request on short HPD. Because of that we got the following error
[ 106.810882] i915 0000:00:02.0: [drm:intel_hpd_irq_handler [i915]] digital hpd on [ENCODER:308:DDI F] - long [ 106.810916] i915 0000:00:02.0: [drm:intel_hpd_irq_handler [i915]] Received HPD interrupt on PIN 9 - cnt: 10 [ 106.811026] i915 0000:00:02.0: [drm:intel_dp_hpd_pulse [i915]] got hpd irq on [ENCODER:308:DDI F] - long [ 106.811095] i915 0000:00:02.0: [drm:i915_hotplug_work_func [i915]] running encoder hotplug functions [ 106.811184] i915 0000:00:02.0: [drm:i915_hotplug_work_func [i915]] Connector DP-3 (pin 9) received hotplug event. (retry 0) [ 106.811227] i915 0000:00:02.0: [drm:intel_dp_detect [i915]] [CONNECTOR:309:DP-3] [ 106.811292] i915 0000:00:02.0: [drm:intel_power_well_enable [i915]] enabling TC cold off [ 106.811365] i915 0000:00:02.0: [drm:tgl_tc_cold_request [i915]] TC cold block succeeded [ 106.811489] i915 0000:00:02.0: [drm:__intel_tc_port_lock [i915]] Port F/TC#3: TC port mode reset (tbt-alt -> dp-alt) [ 106.811663] i915 0000:00:02.0: [drm:intel_power_well_enable [i915]] enabling AUX F TC3 [ 106.812449] [drm:drm_dp_dpcd_read] AUX F/port F: 0x00000 AUX -> (ret= 15) 12 14 04 80 00 00 01 00 00 00 00 00 00 00 00 [ 106.812484] i915 0000:00:02.0: [drm:intel_dp_read_dpcd [i915]] DPCD: 12 14 04 80 00 00 01 00 00 00 00 00 00 00 00 [ 106.813266] [drm:drm_dp_dpcd_read] AUX F/port F: 0x00400 AUX -> (ret= 12) 00 00 00 00 00 00 00 00 00 00 00 00 [ 106.813271] [drm:drm_dp_read_desc] DP sink: OUI 00-00-00 dev-ID HW- rev 0.0 SW-rev 0.0 quirks 0x0000 [ 106.813891] [drm:drm_dp_dpcd_read] AUX F/port F: 0x00200 AUX -> (ret= 1) 01 [ 106.813940] i915 0000:00:02.0: [drm:intel_dp_print_rates [i915]] source rates: 162000, 216000, 270000, 324000, 432000, 540000, 648000, 810000 [ 106.813974] i915 0000:00:02.0: [drm:intel_dp_print_rates [i915]] sink rates: 162000, 270000, 540000 [ 106.814007] i915 0000:00:02.0: [drm:intel_dp_print_rates [i915]] common rates: 162000, 270000, 540000 [ 106.814550] [drm:drm_dp_dpcd_read] AUX F/port F: 0x00021 AUX -> (ret= 1) 00 [ 106.814583] i915 0000:00:02.0: [drm:intel_dp_detect [i915]]
[ENCODER:308:DDI F] MST support: port: yes, sink: no, modparam: yes
.....
[ 106.927291] i915 0000:00:02.0: [drm:intel_dp_check_service_irq [i915]] PHY_PATTERN test requested [ 106.927897] [drm:drm_dp_dpcd_read] AUX F/port F: 0x00219 AUX -> (ret= 1) 0a [ 106.928507] [drm:drm_dp_dpcd_read] AUX F/port F: 0x00220 AUX -> (ret= 1) 04 [ 106.929143] [drm:drm_dp_dpcd_read] AUX F/port F: 0x00248 AUX -> (ret= 1) 00 [ 106.929824] [drm:drm_dp_dpcd_read] AUX F/port F: 0x00202 AUX -> (ret= 6) 00 00 80 00 00 00 [ 106.929830] BUG: kernel NULL pointer dereference, address: 0000000000000578 [ 106.936809] #PF: supervisor read access in kernel mode [ 106.941953] #PF: error_code(0x0000) - not-present page [ 106.947082] PGD 0 P4D 0 [ 106.949643] Oops: 0000 [#1] PREEMPT SMP NOPTI [ 106.954010] CPU: 6 PID: 200 Comm: kworker/6:2 Not tainted 5.7.0-rc7- CI-CI_DRM_8566+ #5 [ 106.975251] Workqueue: events i915_hotplug_work_func [i915] [ 106.980887] RIP: 0010:intel_dp_process_phy_request+0x94/0x5a0 [i915] [ 106.987239] Code: 48 83 c4 20 5b 5d 41 5c 41 5d 41 5e 41 5f c3 48 8d 74 24 12 4c 89 f7 e8 3a 3e 00 00 49 8b 86 28 ff ff ff 49 8b 9e d8 fe ff ff <48> 63 80 78 05 00 00 8b 93 54 0d 00 00 48 8d ab e8 0e 00 00 48 89 [ 107.005890] RSP: 0018:ffffc9000046fb20 EFLAGS: 00010246
I plan to temporarily fix this issue by ignoreing scope request on long HPD, until we have modeset based implementation.
Quoted 70 lines
Quoted 70 lines
}
static void
drivers/gpu/drm/i915/display/intel_dp.c +11
-3@@ -5497,20 +5507,28 @@ intel_dp_autotest_phy_ddi_enable(struct intel_dp *intel_dp, uint8_t lane_cnt) enum port port = intel_dig_port->base.port;struct intel_crtc *crtc =to_intel_crtc (intel_dig_port- >base.base.crtc);enum pipe pipe = crtc->pipe; -u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value; +u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value, trans_ddi_sel_port; +i915_reg_t dp_tp_reg; + +if (IS_ELKHARTLAKE (dev_priv)) { + dp_tp_reg =DP_TP_CTL (port); + trans_ddi_sel_port =TRANS_DDI_SELECT_PORT (port); + }else if (IS_TIGERLAKE (dev_priv)) { + dp_tp_reg =TGL_DP_TP_CTL (pipe); + trans_ddi_sel_port =TGL_TRANS_DDI_SELECT_PORT (port); + } trans_ddi_func_ctl_value =intel_de_read (dev_priv,TRANS_DDI_FUNC_CTL (pip e)); trans_conf_value =intel_de_read (dev_priv,PIPECONF (pipe)); dp_tp_ctl_value =intel_de_read (dev_priv,TGL_DP_TP_CTL (pipe)); - trans_ddi_func_ctl_value |=TRANS_DDI_FUNC_ENABLE | -TGL_TRANS_DDI_SELECT_PORT (port); + trans_ddi_sel_port; trans_conf_value |=PIPECONF_ENABLE ; dp_tp_ctl_value |=DP_TP_CTL_ENABLE ;drivers/gpu/drm/i915/display/intel_dp.c +2
-1intel_de_write (dev_priv,PIPECONF (pipe), trans_conf_value); -intel_de_write (dev_priv,TGL_DP_TP_CTL (pipe), dp_tp_ctl_value); +intel_de_write (dev_priv, dp_tp_reg, dp_tp_ctl_value);intel_de_write (dev_priv,TRANS_DDI_FUNC_CTL (pipe), trans_ddi_func_ctl_value); }@@ -5557,6 +5575,7 @@ static u8 intel_dp_autotest_phy_pattern(struct intel_dp *intel_dp) static void intel_dp_handle_test_request(struct intel_dp *intel_dp) {struct drm_i915_private *i915 =dp_to_i915 (intel_dp); +struct drm_i915_private *dev_priv = i915;u8 response =DP_TEST_NAK ;drivers/gpu/drm/i915/display/intel_dp.c +5
-0u8 request =0 ;int status;@@ -5582,6 +5601,11 @@ static void intel_dp_handle_test_request(struct intel_dp *intel_dp) response =intel_dp_autotest_edid (intel_dp);break ;case DP_TEST_LINK_PHY_TEST_PATTERN : +if (!IS_ELKHARTLAKE (dev_priv) || !IS_TIGERLAKE (dev_priv)) { +drm_dbg_kms (&i915->drm, +"PHY compliance for platform not supported\n"); +return ; + }drm_dbg_kms(&i915->drm, "
PHY_PATTERNtest
requested\n");drivers/gpu/drm/i915/display/intel_dp.c +0
-0response =intel_dp_autotest_phy_pattern (intel_dp);break ;Signature · 1 line
2.7.4
Quoted 6 lines
Quoted 4 lines
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 61 lines · Khaled
Quoted 47 lines · Ville Syrjälä
Quoted 46 lines · Vidya Srinivas
Signed-off-by Khaled Almahallawy <[email protected]>Signed-off-by Vidya Srinivas <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp.c | 40 ++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 8 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +13
-3@@ -5470,22 +5470,32 @@ intel_dp_autotest_phy_ddi_disable(struct intel_dp *intel_dp)struct drm_i915_private *dev_priv =to_i915 (dev);struct intel_crtc *crtc =to_intel_crtc (intel_dig_port- >base.base.crtc);enum pipe pipe = crtc->pipe; -u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value; +u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value, trans_ddi_port_mask; +enum port port = intel_dig_port->base.port; +i915_reg_t dp_tp_reg; + +if (IS_ELKHARTLAKE (dev_priv)) { + dp_tp_reg =DP_TP_CTL (port); + trans_ddi_port_mask =TRANS_DDI_PORT_MASK ; + }else if (IS_TIGERLAKE (dev_priv)) { + dp_tp_reg =TGL_DP_TP_CTL (pipe); + trans_ddi_port_mask =TGL_TRANS_DDI_PORT_MASK ; + } trans_ddi_func_ctl_value =intel_de_read (dev_priv,TRANS_DDI_FUNC_CTL (pip e)); trans_conf_value =intel_de_read (dev_priv,PIPECONF (pipe)); - dp_tp_ctl_value =intel_de_read (dev_priv,TGL_DP_TP_CTL (pipe)); + dp_tp_ctl_value =intel_de_read (dev_priv, dp_tp_reg); trans_ddi_func_ctl_value &= ~(TRANS_DDI_FUNC_ENABLE | -TGL_TRANS_DDI_PORT_MASK ); + trans_ddi_port_mask); trans_conf_value &= ~PIPECONF_ENABLE ; dp_tp_ctl_value &= ~DP_TP_CTL_ENABLE ;Quoted 12 lines
drivers/gpu/drm/i915/display/intel_dp.c intel_dp_autotest_phy_ddi_disable(struct intel_dp *intel_dp) · line 5498
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_dp.c +0
-0intel_de_write (dev_priv,PIPECONF (pipe), trans_conf_value); intel_de_write(dev_priv, TRANS_DDI_FUNC_CTL(pipe),drivers/gpu/drm/i915/display/intel_dp.c +1
-1trans_ddi_func_ctl_value); -intel_de_write (dev_priv,TGL_DP_TP_CTL (pipe), dp_tp_ctl_value); +intel_de_write (dev_priv, dp_tp_reg, dp_tp_ctl_value);All this ad-hoc modeset code really should not exist. It's going to have different bugs than the norma modeset paths, so compliance testing
this special code proves absolutely nothing about the normal modeset code. IMO someone needs to take up the task of rewrtiting all this to just perform normal modesets.
Quoted 3 lines
Agree. I've just found that we get kernel NULL pointer dereference and panic when we try to access to_intel_crtc(intel_dig_port-
Quoted 1 line
base.base.crtc).
Yeah, that's a legacy pointer which should no longer be used at all with atomic drivers. I'm slowly trying to clear out all this legacy cruft. The next step I had hoped to take was
https://patchwork.freedesktop.org/series/76993/ but then this compliacnce stuff landed and threw another wrench into the works.
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 64 lines · Ville Syrjälä
Quoted 63 lines · Khaled
Quoted 47 lines · Ville Syrjälä
Quoted 46 lines · Vidya Srinivas
Signed-off-by Khaled Almahallawy <[email protected]>Signed-off-by Vidya Srinivas <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp.c | 40 ++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 8 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +13
-3@@ -5470,22 +5470,32 @@ intel_dp_autotest_phy_ddi_disable(struct intel_dp *intel_dp)struct drm_i915_private *dev_priv =to_i915 (dev);struct intel_crtc *crtc =to_intel_crtc (intel_dig_port- >base.base.crtc);enum pipe pipe = crtc->pipe; -u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value; +u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value, trans_ddi_port_mask; +enum port port = intel_dig_port->base.port; +i915_reg_t dp_tp_reg; + +if (IS_ELKHARTLAKE (dev_priv)) { + dp_tp_reg =DP_TP_CTL (port); + trans_ddi_port_mask =TRANS_DDI_PORT_MASK ; + }else if (IS_TIGERLAKE (dev_priv)) { + dp_tp_reg =TGL_DP_TP_CTL (pipe); + trans_ddi_port_mask =TGL_TRANS_DDI_PORT_MASK ; + } trans_ddi_func_ctl_value =intel_de_read (dev_priv,TRANS_DDI_FUNC_CTL (pip e)); trans_conf_value =intel_de_read (dev_priv,PIPECONF (pipe)); - dp_tp_ctl_value =intel_de_read (dev_priv,TGL_DP_TP_CTL (pipe)); + dp_tp_ctl_value =intel_de_read (dev_priv, dp_tp_reg); trans_ddi_func_ctl_value &= ~(TRANS_DDI_FUNC_ENABLE | -TGL_TRANS_DDI_PORT_MASK ); + trans_ddi_port_mask); trans_conf_value &= ~PIPECONF_ENABLE ; dp_tp_ctl_value &= ~DP_TP_CTL_ENABLE ;Quoted 12 lines
drivers/gpu/drm/i915/display/intel_dp.c intel_dp_autotest_phy_ddi_disable(struct intel_dp *intel_dp) · line 5498
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_dp.c +0
-0intel_de_write (dev_priv,PIPECONF (pipe), trans_conf_value); intel_de_write(dev_priv, TRANS_DDI_FUNC_CTL(pipe),drivers/gpu/drm/i915/display/intel_dp.c +1
-1trans_ddi_func_ctl_value); -intel_de_write (dev_priv,TGL_DP_TP_CTL (pipe), dp_tp_ctl_value); +intel_de_write (dev_priv, dp_tp_reg, dp_tp_ctl_value);All this ad-hoc modeset code really should not exist. It's going to have different bugs than the norma modeset paths, so compliance testing
this special code proves absolutely nothing about the normal modeset code. IMO someone needs to take up the task of rewrtiting all this to just perform normal modesets.Agree. I've just found that we get kernel NULL pointer dereference and panic when we try to access to_intel_crtc(intel_dig_port-
Quoted 7 lines
Quoted 1 line
Quoted 1 line
base.base.crtc).
Yeah, that's a legacy pointer which should no longer be used at all with atomic drivers. I'm slowly trying to clear out all this legacy cruft. The next step I had hoped to take was
https://patchwork.freedesktop.org/series/76993/ but then this compliacnce stuff landed and threw another wrench into the works.
We had several discussions on design of DP PHY compliance and the patches were on the M-L for quite some time without anyone giving feedback on the actual design of whether they should happen through modeset or directly from the PHY comp request short pulse.
My first feedback was also that this should happen through a complete modeset where after we get PHY comp request we send a uevent like we do for link layer compliance and then trigger a full modeset. But honestly that was just a lot of overhead and
The reason we decided to go with this ad hoc approach was that with PHY compliance request, nothing really changes in terms of link parameters so we do not need to go through
a complete modeset request unlike link layer compliance where we need to do compute config all over again to do the link params computation.
Every PHY comp request first sends a link layer comp request that does a full modeset and sets up the desired link rate/lane count.
Then with PHY request, all we need to do is disable pipe conf, dp_tp_ctl, set the PHY patterns and renable the pipe conf and dp_tp_ctl without interfering and doing anything with a full modeset.
Now i think if we need to scale this to other platforms, can we add a per platform hook for handle_phy_request that gets the correct DP_TP_CTL etc and sets up the PHY patterns and reenables the already set link?
We have thoroughly tested this using the scopes and DPR 100 and it has been working correctly with the existing IGT compliance tool so IMO no need to rewrite the entire set of patches.
Ville, Khaled ?
Regards
Manasi
Quoted 8 lines
Signature · 7 lines
-- Ville Syrjälä Intel _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 89 lines · Manasi Navare
Quoted 64 lines · Ville Syrjälä
Quoted 63 lines · Khaled
Quoted 47 lines · Ville Syrjälä
Quoted 46 lines · Vidya Srinivas
Signed-off-by Khaled Almahallawy <[email protected]>Signed-off-by Vidya Srinivas <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp.c | 40 ++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 8 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +13
-3@@ -5470,22 +5470,32 @@ intel_dp_autotest_phy_ddi_disable(struct intel_dp *intel_dp)struct drm_i915_private *dev_priv =to_i915 (dev);struct intel_crtc *crtc =to_intel_crtc (intel_dig_port- >base.base.crtc);enum pipe pipe = crtc->pipe; -u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value; +u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value, trans_ddi_port_mask; +enum port port = intel_dig_port->base.port; +i915_reg_t dp_tp_reg; + +if (IS_ELKHARTLAKE (dev_priv)) { + dp_tp_reg =DP_TP_CTL (port); + trans_ddi_port_mask =TRANS_DDI_PORT_MASK ; + }else if (IS_TIGERLAKE (dev_priv)) { + dp_tp_reg =TGL_DP_TP_CTL (pipe); + trans_ddi_port_mask =TGL_TRANS_DDI_PORT_MASK ; + } trans_ddi_func_ctl_value =intel_de_read (dev_priv,TRANS_DDI_FUNC_CTL (pip e)); trans_conf_value =intel_de_read (dev_priv,PIPECONF (pipe)); - dp_tp_ctl_value =intel_de_read (dev_priv,TGL_DP_TP_CTL (pipe)); + dp_tp_ctl_value =intel_de_read (dev_priv, dp_tp_reg); trans_ddi_func_ctl_value &= ~(TRANS_DDI_FUNC_ENABLE | -TGL_TRANS_DDI_PORT_MASK ); + trans_ddi_port_mask); trans_conf_value &= ~PIPECONF_ENABLE ; dp_tp_ctl_value &= ~DP_TP_CTL_ENABLE ;Quoted 12 lines
drivers/gpu/drm/i915/display/intel_dp.c intel_dp_autotest_phy_ddi_disable(struct intel_dp *intel_dp) · line 5498
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_dp.c +0
-0intel_de_write (dev_priv,PIPECONF (pipe), trans_conf_value); intel_de_write(dev_priv, TRANS_DDI_FUNC_CTL(pipe),drivers/gpu/drm/i915/display/intel_dp.c +1
-1trans_ddi_func_ctl_value); -intel_de_write (dev_priv,TGL_DP_TP_CTL (pipe), dp_tp_ctl_value); +intel_de_write (dev_priv, dp_tp_reg, dp_tp_ctl_value);All this ad-hoc modeset code really should not exist. It's going to have different bugs than the norma modeset paths, so compliance testing
this special code proves absolutely nothing about the normal modeset code. IMO someone needs to take up the task of rewrtiting all this to just perform normal modesets.Agree. I've just found that we get kernel NULL pointer dereference and panic when we try to access to_intel_crtc(intel_dig_port-
Quoted 7 lines
Quoted 1 line
Quoted 1 line
base.base.crtc).
Yeah, that's a legacy pointer which should no longer be used at all with atomic drivers. I'm slowly trying to clear out all this legacy cruft. The next step I had hoped to take was
https://patchwork.freedesktop.org/series/76993/ but then this compliacnce stuff landed and threw another wrench into the works.We had several discussions on design of DP PHY compliance and the patches were on the M-L for quite some time without anyone giving feedback on the actual design of whether they should happen through modeset or directly from the PHY comp request short pulse.
My first feedback was also that this should happen through a complete modeset where after we get PHY comp request we send a uevent like we do for link layer compliance and then trigger a full modeset. But honestly that was just a lot of overhead and
The reason we decided to go with this ad hoc approach was that with PHY compliance request, nothing really changes in terms of link parameters so we do not need to go through
a complete modeset request unlike link layer compliance where we need to do compute config all over again to do the link params computation.Every PHY comp request first sends a link layer comp request that does a full modeset and sets up the desired link rate/lane count.
Then with PHY request, all we need to do is disable pipe conf,dp_tp_ctl, set the PHY patterns and renable the pipe conf anddp_tp_ctlwithout interfering and doing anything with a full modeset.
Quoted 8 lines
Now i think if we need to scale this to other platforms, can we add a per platform hook for
handle_phy_requestthat gets the correctDP_TP_CTLetc and sets up the PHY patterns and reenables the already set link?We have thoroughly tested this using the scopes and DPR 100 and it has been working correctly with the existing IGT compliance tool so IMO no need to rewrite the entire set of patches.
Ville, Khaled ?
You're just multiplying the amount of work and bugs we have for every platform.
And as said testing some special compliance paths proves pretty much nothing about the real code paths. So the only point of that code AFAICS it to tick some "we haz compliance code?" checkbox in some random spreadsheet instead of actually providing evidence that our real code works correctly.
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 102 lines · Ville Syrjälä
Quoted 89 lines · Manasi Navare
Quoted 64 lines · Ville Syrjälä
Quoted 63 lines · Khaled
Quoted 47 lines · Ville Syrjälä
Quoted 46 lines · Vidya Srinivas
Signed-off-by Khaled Almahallawy <[email protected]>Signed-off-by Vidya Srinivas <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp.c | 40 ++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 8 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +13
-3@@ -5470,22 +5470,32 @@ intel_dp_autotest_phy_ddi_disable(struct intel_dp *intel_dp)struct drm_i915_private *dev_priv =to_i915 (dev);struct intel_crtc *crtc =to_intel_crtc (intel_dig_port- >base.base.crtc);enum pipe pipe = crtc->pipe; -u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value; +u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value, trans_ddi_port_mask; +enum port port = intel_dig_port->base.port; +i915_reg_t dp_tp_reg; + +if (IS_ELKHARTLAKE (dev_priv)) { + dp_tp_reg =DP_TP_CTL (port); + trans_ddi_port_mask =TRANS_DDI_PORT_MASK ; + }else if (IS_TIGERLAKE (dev_priv)) { + dp_tp_reg =TGL_DP_TP_CTL (pipe); + trans_ddi_port_mask =TGL_TRANS_DDI_PORT_MASK ; + } trans_ddi_func_ctl_value =intel_de_read (dev_priv,TRANS_DDI_FUNC_CTL (pip e)); trans_conf_value =intel_de_read (dev_priv,PIPECONF (pipe)); - dp_tp_ctl_value =intel_de_read (dev_priv,TGL_DP_TP_CTL (pipe)); + dp_tp_ctl_value =intel_de_read (dev_priv, dp_tp_reg); trans_ddi_func_ctl_value &= ~(TRANS_DDI_FUNC_ENABLE | -TGL_TRANS_DDI_PORT_MASK ); + trans_ddi_port_mask); trans_conf_value &= ~PIPECONF_ENABLE ; dp_tp_ctl_value &= ~DP_TP_CTL_ENABLE ;Quoted 12 lines
drivers/gpu/drm/i915/display/intel_dp.c intel_dp_autotest_phy_ddi_disable(struct intel_dp *intel_dp) · line 5498
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_dp.c +0
-0intel_de_write (dev_priv,PIPECONF (pipe), trans_conf_value); intel_de_write(dev_priv, TRANS_DDI_FUNC_CTL(pipe),drivers/gpu/drm/i915/display/intel_dp.c +1
-1trans_ddi_func_ctl_value); -intel_de_write (dev_priv,TGL_DP_TP_CTL (pipe), dp_tp_ctl_value); +intel_de_write (dev_priv, dp_tp_reg, dp_tp_ctl_value);All this ad-hoc modeset code really should not exist. It's going to have different bugs than the norma modeset paths, so compliance testing
this special code proves absolutely nothing about the normal modeset code. IMO someone needs to take up the task of rewrtiting all this to just perform normal modesets.Agree. I've just found that we get kernel NULL pointer dereference and panic when we try to access to_intel_crtc(intel_dig_port-
Quoted 7 lines
Quoted 1 line
Quoted 1 line
base.base.crtc).
Yeah, that's a legacy pointer which should no longer be used at all with atomic drivers. I'm slowly trying to clear out all this legacy cruft. The next step I had hoped to take was
https://patchwork.freedesktop.org/series/76993/ but then this compliacnce stuff landed and threw another wrench into the works.We had several discussions on design of DP PHY compliance and the patches were on the M-L for quite some time without anyone giving feedback on the actual design of whether they should happen through modeset or directly from the PHY comp request short pulse.
My first feedback was also that this should happen through a complete modeset where after we get PHY comp request we send a uevent like we do for link layer compliance and then trigger a full modeset. But honestly that was just a lot of overhead and
The reason we decided to go with this ad hoc approach was that with PHY compliance request, nothing really changes in terms of link parameters so we do not need to go through
a complete modeset request unlike link layer compliance where we need to do compute config all over again to do the link params computation.Every PHY comp request first sends a link layer comp request that does a full modeset and sets up the desired link rate/lane count.
Then with PHY request, all we need to do is disable pipe conf,dp_tp_ctl, set the PHY patterns and renable the pipe conf anddp_tp_ctlwithout interfering and doing anything with a full modeset.Quoted 8 lines
Now i think if we need to scale this to other platforms, can we add a per platform hook for
handle_phy_requestthat gets the correctDP_TP_CTLetc and sets up the PHY patterns and reenables the already set link?We have thoroughly tested this using the scopes and DPR 100 and it has been working correctly with the existing IGT compliance tool so IMO no need to rewrite the entire set of patches.
Ville, Khaled ?
You're just multiplying the amount of work and bugs we have for every platform.
Quoted 7 lines
And as said testing some special compliance paths proves pretty much nothing about the real code paths. So the only point of that code AFAICS it to tick some "we haz compliance code?" checkbox in some random spreadsheet instead of actually providing evidence that our real code works correctly.
I thougt the whole point of PHY compliance is not to be able to see if the driver can do a modeset but just to confirm that driver is able to send the requested patterns out on already enabled link. So shouldnt doing this directly through the phy request handling on short pulse suffice?
But if we want to insert this in the modeset what should be the flow:
- AFter getting PHY request, store the requested PHY patterns, send a uevent
- This will trigger a complete modeset, in this path for atomic check, see if PHY compliance test active then ignore recomputing the parameters and also in the commit tail, only disable the Pipeconf, dp_tp_ctl and send these patterns and then reenable?
Manasi
Quoted 3 lines
Signature · 2 lines
Ville Syrjälä Intel
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 111 lines · Manasi Navare
Quoted 102 lines · Ville Syrjälä
Quoted 89 lines · Manasi Navare
Quoted 64 lines · Ville Syrjälä
Quoted 63 lines · Khaled
Quoted 47 lines · Ville Syrjälä
Quoted 46 lines · Vidya Srinivas
Signed-off-by Khaled Almahallawy <[email protected]>Signed-off-by Vidya Srinivas <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp.c | 40 ++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 8 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +13
-3@@ -5470,22 +5470,32 @@ intel_dp_autotest_phy_ddi_disable(struct intel_dp *intel_dp)struct drm_i915_private *dev_priv =to_i915 (dev);struct intel_crtc *crtc =to_intel_crtc (intel_dig_port- >base.base.crtc);enum pipe pipe = crtc->pipe; -u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value; +u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value, trans_ddi_port_mask; +enum port port = intel_dig_port->base.port; +i915_reg_t dp_tp_reg; + +if (IS_ELKHARTLAKE (dev_priv)) { + dp_tp_reg =DP_TP_CTL (port); + trans_ddi_port_mask =TRANS_DDI_PORT_MASK ; + }else if (IS_TIGERLAKE (dev_priv)) { + dp_tp_reg =TGL_DP_TP_CTL (pipe); + trans_ddi_port_mask =TGL_TRANS_DDI_PORT_MASK ; + } trans_ddi_func_ctl_value =intel_de_read (dev_priv,TRANS_DDI_FUNC_CTL (pip e)); trans_conf_value =intel_de_read (dev_priv,PIPECONF (pipe)); - dp_tp_ctl_value =intel_de_read (dev_priv,TGL_DP_TP_CTL (pipe)); + dp_tp_ctl_value =intel_de_read (dev_priv, dp_tp_reg); trans_ddi_func_ctl_value &= ~(TRANS_DDI_FUNC_ENABLE | -TGL_TRANS_DDI_PORT_MASK ); + trans_ddi_port_mask); trans_conf_value &= ~PIPECONF_ENABLE ; dp_tp_ctl_value &= ~DP_TP_CTL_ENABLE ;Quoted 12 lines
drivers/gpu/drm/i915/display/intel_dp.c
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_dp.c +0
-0intel_de_write (dev_priv,PIPECONF (pipe), trans_conf_value); intel_de_write(dev_priv, TRANS_DDI_FUNC_CTL(pipe),drivers/gpu/drm/i915/display/intel_dp.c +1
-1trans_ddi_func_ctl_value); -intel_de_write (dev_priv,TGL_DP_TP_CTL (pipe), dp_tp_ctl_value); +intel_de_write (dev_priv, dp_tp_reg, dp_tp_ctl_value);All this ad-hoc modeset code really should not exist. It's going to have different bugs than the norma modeset paths, so compliance testing
this special code proves absolutely nothing about the normal modeset code. IMO someone needs to take up the task of rewrtiting all this to just perform normal modesets.Agree. I've just found that we get kernel NULL pointer dereference and panic when we try to access to_intel_crtc(intel_dig_port-
Quoted 7 lines
Quoted 1 line
Quoted 1 line
base.base.crtc).
Yeah, that's a legacy pointer which should no longer be used at all with atomic drivers. I'm slowly trying to clear out all this legacy cruft. The next step I had hoped to take was
https://patchwork.freedesktop.org/series/76993/ but then this compliacnce stuff landed and threw another wrench into the works.We had several discussions on design of DP PHY compliance and the patches were on the M-L for quite some time without anyone giving feedback on the actual design of whether they should happen through modeset or directly from the PHY comp request short pulse.
My first feedback was also that this should happen through a complete modeset where after we get PHY comp request we send a uevent like we do for link layer compliance and then trigger a full modeset. But honestly that was just a lot of overhead and
The reason we decided to go with this ad hoc approach was that with PHY compliance request, nothing really changes in terms of link parameters so we do not need to go through
a complete modeset request unlike link layer compliance where we need to do compute config all over again to do the link params computation.Every PHY comp request first sends a link layer comp request that does a full modeset and sets up the desired link rate/lane count.
Then with PHY request, all we need to do is disable pipe conf,dp_tp_ctl, set the PHY patterns and renable the pipe conf anddp_tp_ctlwithout interfering and doing anything with a full modeset.Quoted 8 lines
Now i think if we need to scale this to other platforms, can we add a per platform hook for
handle_phy_requestthat gets the correctDP_TP_CTLetc and sets up the PHY patterns and reenables the already set link?We have thoroughly tested this using the scopes and DPR 100 and it has been working correctly with the existing IGT compliance tool so IMO no need to rewrite the entire set of patches.
Ville, Khaled ?
You're just multiplying the amount of work and bugs we have for every platform.
Quoted 7 lines
And as said testing some special compliance paths proves pretty much nothing about the real code paths. So the only point of that code AFAICS it to tick some "we haz compliance code?" checkbox in some random spreadsheet instead of actually providing evidence that our real code works correctly.
Quoted 4 lines
I thougt the whole point of PHY compliance is not to be able to see if the driver can do a modeset but just to confirm that driver is able to send the requested patterns out on already enabled link. So shouldnt doing this directly through the phy request handling on short pulse suffice?
You're not proving the driver proper can transmit the requested stuff, you're only proving the special compliance code can do that. I could easily break the normal codepaths and yet this magic compliance thing could still indicate that everything is hunky dory.
Quoted 3 lines
But if we want to insert this in the modeset what should be the flow:
- AFter getting PHY request, store the requested PHY patterns, send a uevent
You don't really need any uevent. We coukd do the stuff directly from the hotplug work.
Quoted 4 lines
- This will trigger a complete modeset, in this path for atomic check, see if PHY compliance test active then ignore recomputing the parameters and also in the commit tail, only disable the Pipeconf,
dp_tp_ctland send these patterns and then reenable?
We should just do a full modeset if possible. Randomly turning the pipe/etc. on/off without following the proper modeset sequence is dubious at best.
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 130 lines · Ville Syrjälä
Quoted 111 lines · Manasi Navare
Quoted 102 lines · Ville Syrjälä
Quoted 89 lines · Manasi Navare
Quoted 64 lines · Ville Syrjälä
Quoted 63 lines · Khaled
Quoted 47 lines · Ville Syrjälä
Quoted 46 lines · Vidya Srinivas
Signed-off-by Khaled Almahallawy <[email protected]>Signed-off-by Vidya Srinivas <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp.c | 40 ++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 8 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +13
-3@@ -5470,22 +5470,32 @@ intel_dp_autotest_phy_ddi_disable(struct intel_dp *intel_dp)struct drm_i915_private *dev_priv =to_i915 (dev);struct intel_crtc *crtc =to_intel_crtc (intel_dig_port- >base.base.crtc);enum pipe pipe = crtc->pipe; -u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value; +u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value, trans_ddi_port_mask; +enum port port = intel_dig_port->base.port; +i915_reg_t dp_tp_reg; + +if (IS_ELKHARTLAKE (dev_priv)) { + dp_tp_reg =DP_TP_CTL (port); + trans_ddi_port_mask =TRANS_DDI_PORT_MASK ; + }else if (IS_TIGERLAKE (dev_priv)) { + dp_tp_reg =TGL_DP_TP_CTL (pipe); + trans_ddi_port_mask =TGL_TRANS_DDI_PORT_MASK ; + } trans_ddi_func_ctl_value =intel_de_read (dev_priv,TRANS_DDI_FUNC_CTL (pip e)); trans_conf_value =intel_de_read (dev_priv,PIPECONF (pipe)); - dp_tp_ctl_value =intel_de_read (dev_priv,TGL_DP_TP_CTL (pipe)); + dp_tp_ctl_value =intel_de_read (dev_priv, dp_tp_reg); trans_ddi_func_ctl_value &= ~(TRANS_DDI_FUNC_ENABLE | -TGL_TRANS_DDI_PORT_MASK ); + trans_ddi_port_mask); trans_conf_value &= ~PIPECONF_ENABLE ; dp_tp_ctl_value &= ~DP_TP_CTL_ENABLE ;Quoted 12 lines
drivers/gpu/drm/i915/display/intel_dp.c
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_dp.c +0
-0intel_de_write (dev_priv,PIPECONF (pipe), trans_conf_value); intel_de_write(dev_priv, TRANS_DDI_FUNC_CTL(pipe),drivers/gpu/drm/i915/display/intel_dp.c +1
-1trans_ddi_func_ctl_value); -intel_de_write (dev_priv,TGL_DP_TP_CTL (pipe), dp_tp_ctl_value); +intel_de_write (dev_priv, dp_tp_reg, dp_tp_ctl_value);All this ad-hoc modeset code really should not exist. It's going to have different bugs than the norma modeset paths, so compliance testing
this special code proves absolutely nothing about the normal modeset code. IMO someone needs to take up the task of rewrtiting all this to just perform normal modesets.Agree. I've just found that we get kernel NULL pointer dereference and panic when we try to access to_intel_crtc(intel_dig_port-
Quoted 7 lines
Quoted 1 line
Quoted 1 line
base.base.crtc).
Yeah, that's a legacy pointer which should no longer be used at all with atomic drivers. I'm slowly trying to clear out all this legacy cruft. The next step I had hoped to take was
https://patchwork.freedesktop.org/series/76993/ but then this compliacnce stuff landed and threw another wrench into the works.We had several discussions on design of DP PHY compliance and the patches were on the M-L for quite some time without anyone giving feedback on the actual design of whether they should happen through modeset or directly from the PHY comp request short pulse.
My first feedback was also that this should happen through a complete modeset where after we get PHY comp request we send a uevent like we do for link layer compliance and then trigger a full modeset. But honestly that was just a lot of overhead and
The reason we decided to go with this ad hoc approach was that with PHY compliance request, nothing really changes in terms of link parameters so we do not need to go through
a complete modeset request unlike link layer compliance where we need to do compute config all over again to do the link params computation.Every PHY comp request first sends a link layer comp request that does a full modeset and sets up the desired link rate/lane count.
Then with PHY request, all we need to do is disable pipe conf,dp_tp_ctl, set the PHY patterns and renable the pipe conf anddp_tp_ctlwithout interfering and doing anything with a full modeset.Quoted 8 lines
Now i think if we need to scale this to other platforms, can we add a per platform hook for
handle_phy_requestthat gets the correctDP_TP_CTLetc and sets up the PHY patterns and reenables the already set link?We have thoroughly tested this using the scopes and DPR 100 and it has been working correctly with the existing IGT compliance tool so IMO no need to rewrite the entire set of patches.
Ville, Khaled ?
You're just multiplying the amount of work and bugs we have for every platform.
Quoted 7 lines
And as said testing some special compliance paths proves pretty much nothing about the real code paths. So the only point of that code AFAICS it to tick some "we haz compliance code?" checkbox in some random spreadsheet instead of actually providing evidence that our real code works correctly.
Quoted 4 lines
I thougt the whole point of PHY compliance is not to be able to see if the driver can do a modeset but just to confirm that driver is able to send the requested patterns out on already enabled link. So shouldnt doing this directly through the phy request handling on short pulse suffice?
You're not proving the driver proper can transmit the requested stuff, you're only proving the special compliance code can do that. I could easily break the normal codepaths and yet this magic compliance thing could still indicate that everything is hunky dory.
Quoted 3 lines
But if we want to insert this in the modeset what should be the flow:
- AFter getting PHY request, store the requested PHY patterns, send a ueventYou don't really need any uevent. We coukd do the stuff directly from the hotplug work.
Quoted 8 lines
Quoted 4 lines
- This will trigger a complete modeset, in this path for atomic check, see if PHY compliance test active then ignore recomputing the parameters and also in the commit tail, only disable the Pipeconf,
dp_tp_ctland send these patterns and then reenable?We should just do a full modeset if possible. Randomly turning the pipe/etc. on/off without following the proper modeset sequence is dubious at best.
how do we trigger a full modeset directly from the hotplug work just from within the kernel? We faced the same problem with link layer compliance and hence we decided to send the uevent there to trigger a ful modeset. How do you suggest we do otherwise?
Manasi
Quoted 4 lines
Signature · 3 lines
-- Ville Syrjälä Intel
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 136 lines · Manasi Navare
Quoted 135 lines · Ville Syrjälä
Quoted 111 lines · Manasi Navare
Quoted 102 lines · Ville Syrjälä
Quoted 89 lines · Manasi Navare
Quoted 64 lines · Ville Syrjälä
Quoted 63 lines · Khaled
Quoted 47 lines · Ville Syrjälä
Quoted 46 lines · Vidya Srinivas
Signed-off-by Khaled Almahallawy <[email protected]>Signed-off-by Vidya Srinivas <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp.c | 40 ++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 8 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +13
-3@@ -5470,22 +5470,32 @@ intel_dp_autotest_phy_ddi_disable(struct intel_dp *intel_dp)struct drm_i915_private *dev_priv =to_i915 (dev);struct intel_crtc *crtc =to_intel_crtc (intel_dig_port- >base.base.crtc);enum pipe pipe = crtc->pipe; -u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value; +u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value, trans_ddi_port_mask; +enum port port = intel_dig_port->base.port; +i915_reg_t dp_tp_reg; + +if (IS_ELKHARTLAKE (dev_priv)) { + dp_tp_reg =DP_TP_CTL (port); + trans_ddi_port_mask =TRANS_DDI_PORT_MASK ; + }else if (IS_TIGERLAKE (dev_priv)) { + dp_tp_reg =TGL_DP_TP_CTL (pipe); + trans_ddi_port_mask =TGL_TRANS_DDI_PORT_MASK ; + } trans_ddi_func_ctl_value =intel_de_read (dev_priv,TRANS_DDI_FUNC_CTL (pip e)); trans_conf_value =intel_de_read (dev_priv,PIPECONF (pipe)); - dp_tp_ctl_value =intel_de_read (dev_priv,TGL_DP_TP_CTL (pipe)); + dp_tp_ctl_value =intel_de_read (dev_priv, dp_tp_reg); trans_ddi_func_ctl_value &= ~(TRANS_DDI_FUNC_ENABLE | -TGL_TRANS_DDI_PORT_MASK ); + trans_ddi_port_mask); trans_conf_value &= ~PIPECONF_ENABLE ; dp_tp_ctl_value &= ~DP_TP_CTL_ENABLE ;Quoted 12 lines
drivers/gpu/drm/i915/display/intel_dp.c
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_dp.c +0
-0intel_de_write (dev_priv,PIPECONF (pipe), trans_conf_value); intel_de_write(dev_priv, TRANS_DDI_FUNC_CTL(pipe),drivers/gpu/drm/i915/display/intel_dp.c +1
-1trans_ddi_func_ctl_value); -intel_de_write (dev_priv,TGL_DP_TP_CTL (pipe), dp_tp_ctl_value); +intel_de_write (dev_priv, dp_tp_reg, dp_tp_ctl_value);All this ad-hoc modeset code really should not exist. It's going to have different bugs than the norma modeset paths, so compliance testing
this special code proves absolutely nothing about the normal modeset code. IMO someone needs to take up the task of rewrtiting all this to just perform normal modesets.Agree. I've just found that we get kernel NULL pointer dereference and panic when we try to access to_intel_crtc(intel_dig_port-
Quoted 7 lines
Quoted 1 line
Quoted 1 line
base.base.crtc).
Yeah, that's a legacy pointer which should no longer be used at all with atomic drivers. I'm slowly trying to clear out all this legacy cruft. The next step I had hoped to take was
https://patchwork.freedesktop.org/series/76993/ but then this compliacnce stuff landed and threw another wrench into the works.We had several discussions on design of DP PHY compliance and the patches were on the M-L for quite some time without anyone giving feedback on the actual design of whether they should happen through modeset or directly from the PHY comp request short pulse.
My first feedback was also that this should happen through a complete modeset where after we get PHY comp request we send a uevent like we do for link layer compliance and then trigger a full modeset. But honestly that was just a lot of overhead and
The reason we decided to go with this ad hoc approach was that with PHY compliance request, nothing really changes in terms of link parameters so we do not need to go through
a complete modeset request unlike link layer compliance where we need to do compute config all over again to do the link params computation.Every PHY comp request first sends a link layer comp request that does a full modeset and sets up the desired link rate/lane count.
Then with PHY request, all we need to do is disable pipe conf,dp_tp_ctl, set the PHY patterns and renable the pipe conf anddp_tp_ctlwithout interfering and doing anything with a full modeset.Quoted 8 lines
Now i think if we need to scale this to other platforms, can we add a per platform hook for
handle_phy_requestthat gets the correctDP_TP_CTLetc and sets up the PHY patterns and reenables the already set link?We have thoroughly tested this using the scopes and DPR 100 and it has been working correctly with the existing IGT compliance tool so IMO no need to rewrite the entire set of patches.
Ville, Khaled ?
You're just multiplying the amount of work and bugs we have for every platform.
Quoted 7 lines
And as said testing some special compliance paths proves pretty much nothing about the real code paths. So the only point of that code AFAICS it to tick some "we haz compliance code?" checkbox in some random spreadsheet instead of actually providing evidence that our real code works correctly.
Quoted 4 lines
I thougt the whole point of PHY compliance is not to be able to see if the driver can do a modeset but just to confirm that driver is able to send the requested patterns out on already enabled link. So shouldnt doing this directly through the phy request handling on short pulse suffice?
You're not proving the driver proper can transmit the requested stuff, you're only proving the special compliance code can do that. I could easily break the normal codepaths and yet this magic compliance thing could still indicate that everything is hunky dory.
Quoted 3 lines
But if we want to insert this in the modeset what should be the flow:
- AFter getting PHY request, store the requested PHY patterns, send a ueventYou don't really need any uevent. We coukd do the stuff directly from the hotplug work.
Quoted 4 lines
- This will trigger a complete modeset, in this path for atomic check, see if PHY compliance test active then ignore recomputing the parameters and also in the commit tail, only disable the Pipeconf,
dp_tp_ctland send these patterns and then reenable?
Quoted 7 lines
Quoted 3 lines
We should just do a full modeset if possible. Randomly turning the pipe/etc. on/off without following the proper modeset sequence is dubious at best.
how do we trigger a full modeset directly from the hotplug work just from within the kernel? We faced the same problem with link layer compliance and hence we decided to send the uevent there to trigger a ful modeset.
The full modeset via userspace route is only needed if the resolution needs to be changed since that's something userspace gets to decide. If the current mode is still OK we can directly trigger the modeset from the kernel. Not sure if we do or not.
We do a full modeset for HDMI when the sink forgets that scrambling was supposed to be on, and I'm a bit tempted to do the same for plain old DP retraining to get rid of the special case code for that (and to actually follow the modeset seqeunce properly when doing retraining).
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 150 lines · Ville Syrjälä
Quoted 136 lines · Manasi Navare
Quoted 135 lines · Ville Syrjälä
Quoted 111 lines · Manasi Navare
Quoted 102 lines · Ville Syrjälä
Quoted 89 lines · Manasi Navare
Quoted 64 lines · Ville Syrjälä
Quoted 63 lines · Khaled
Quoted 47 lines · Ville Syrjälä
Quoted 46 lines · Vidya Srinivas
Signed-off-by Khaled Almahallawy <[email protected]>Signed-off-by Vidya Srinivas <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp.c | 40 ++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 8 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +13
-3@@ -5470,22 +5470,32 @@ intel_dp_autotest_phy_ddi_disable(struct intel_dp *intel_dp)struct drm_i915_private *dev_priv =to_i915 (dev);struct intel_crtc *crtc =to_intel_crtc (intel_dig_port- >base.base.crtc);enum pipe pipe = crtc->pipe; -u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value; +u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value, trans_ddi_port_mask; +enum port port = intel_dig_port->base.port; +i915_reg_t dp_tp_reg; + +if (IS_ELKHARTLAKE (dev_priv)) { + dp_tp_reg =DP_TP_CTL (port); + trans_ddi_port_mask =TRANS_DDI_PORT_MASK ; + }else if (IS_TIGERLAKE (dev_priv)) { + dp_tp_reg =TGL_DP_TP_CTL (pipe); + trans_ddi_port_mask =TGL_TRANS_DDI_PORT_MASK ; + } trans_ddi_func_ctl_value =intel_de_read (dev_priv,TRANS_DDI_FUNC_CTL (pip e)); trans_conf_value =intel_de_read (dev_priv,PIPECONF (pipe)); - dp_tp_ctl_value =intel_de_read (dev_priv,TGL_DP_TP_CTL (pipe)); + dp_tp_ctl_value =intel_de_read (dev_priv, dp_tp_reg); trans_ddi_func_ctl_value &= ~(TRANS_DDI_FUNC_ENABLE | -TGL_TRANS_DDI_PORT_MASK ); + trans_ddi_port_mask); trans_conf_value &= ~PIPECONF_ENABLE ; dp_tp_ctl_value &= ~DP_TP_CTL_ENABLE ;Quoted 12 lines
drivers/gpu/drm/i915/display/intel_dp.c
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_dp.c +0
-0intel_de_write (dev_priv,PIPECONF (pipe), trans_conf_value); intel_de_write(dev_priv, TRANS_DDI_FUNC_CTL(pipe),drivers/gpu/drm/i915/display/intel_dp.c +1
-1trans_ddi_func_ctl_value); -intel_de_write (dev_priv,TGL_DP_TP_CTL (pipe), dp_tp_ctl_value); +intel_de_write (dev_priv, dp_tp_reg, dp_tp_ctl_value);All this ad-hoc modeset code really should not exist. It's going to have different bugs than the norma modeset paths, so compliance testing
this special code proves absolutely nothing about the normal modeset code. IMO someone needs to take up the task of rewrtiting all this to just perform normal modesets.Agree. I've just found that we get kernel NULL pointer dereference and panic when we try to access to_intel_crtc(intel_dig_port-
Quoted 7 lines
Quoted 1 line
Quoted 1 line
base.base.crtc).
Yeah, that's a legacy pointer which should no longer be used at all with atomic drivers. I'm slowly trying to clear out all this legacy cruft. The next step I had hoped to take was
https://patchwork.freedesktop.org/series/76993/ but then this compliacnce stuff landed and threw another wrench into the works.We had several discussions on design of DP PHY compliance and the patches were on the M-L for quite some time without anyone giving feedback on the actual design of whether they should happen through modeset or directly from the PHY comp request short pulse.
My first feedback was also that this should happen through a complete modeset where after we get PHY comp request we send a uevent like we do for link layer compliance and then trigger a full modeset. But honestly that was just a lot of overhead and
The reason we decided to go with this ad hoc approach was that with PHY compliance request, nothing really changes in terms of link parameters so we do not need to go through
a complete modeset request unlike link layer compliance where we need to do compute config all over again to do the link params computation.Every PHY comp request first sends a link layer comp request that does a full modeset and sets up the desired link rate/lane count.
Then with PHY request, all we need to do is disable pipe conf,dp_tp_ctl, set the PHY patterns and renable the pipe conf anddp_tp_ctlwithout interfering and doing anything with a full modeset.Quoted 8 lines
Now i think if we need to scale this to other platforms, can we add a per platform hook for
handle_phy_requestthat gets the correctDP_TP_CTLetc and sets up the PHY patterns and reenables the already set link?We have thoroughly tested this using the scopes and DPR 100 and it has been working correctly with the existing IGT compliance tool so IMO no need to rewrite the entire set of patches.
Ville, Khaled ?
You're just multiplying the amount of work and bugs we have for every platform.
Quoted 7 lines
And as said testing some special compliance paths proves pretty much nothing about the real code paths. So the only point of that code AFAICS it to tick some "we haz compliance code?" checkbox in some random spreadsheet instead of actually providing evidence that our real code works correctly.
Quoted 4 lines
I thougt the whole point of PHY compliance is not to be able to see if the driver can do a modeset but just to confirm that driver is able to send the requested patterns out on already enabled link. So shouldnt doing this directly through the phy request handling on short pulse suffice?
You're not proving the driver proper can transmit the requested stuff, you're only proving the special compliance code can do that. I could easily break the normal codepaths and yet this magic compliance thing could still indicate that everything is hunky dory.
Quoted 3 lines
But if we want to insert this in the modeset what should be the flow:
- AFter getting PHY request, store the requested PHY patterns, send a ueventYou don't really need any uevent. We coukd do the stuff directly from the hotplug work.
Quoted 4 lines
- This will trigger a complete modeset, in this path for atomic check, see if PHY compliance test active then ignore recomputing the parameters and also in the commit tail, only disable the Pipeconf,
dp_tp_ctland send these patterns and then reenable?Quoted 7 lines
Quoted 3 lines
We should just do a full modeset if possible. Randomly turning the pipe/etc. on/off without following the proper modeset sequence is dubious at best.
how do we trigger a full modeset directly from the hotplug work just from within the kernel? We faced the same problem with link layer compliance and hence we decided to send the uevent there to trigger a ful modeset.
The full modeset via userspace route is only needed if the resolution needs to be changed since that's something userspace gets to decide. If the current mode is still OK we can directly trigger the modeset from the kernel. Not sure if we do or not.
Quoted 6 lines
We do a full modeset for HDMI when the sink forgets that scrambling was supposed to be on, and I'm a bit tempted to do the same for plain old DP retraining to get rid of the special case code for that (and to actually follow the modeset seqeunce properly when doing retraining).
For retraining we dont have any special case code right, we just fallback and then send uevent. Oh but do you mean like getting rid of setting the link status and forcing a full modeset etc?
So for PHY compliance, we do something similar to calling modeset_pipe() from intel_hdmi_reset_link()? So call this modeset_pipe from intel_dp_autotest_phy_pattern() after storing the requested phy patterns in a compliance struct?
Manasi
Quoted 3 lines
Signature · 2 lines
Ville Syrjälä Intel
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 151 lines · Manasi Navare
Quoted 150 lines · Ville Syrjälä
Quoted 136 lines · Manasi Navare
Quoted 135 lines · Ville Syrjälä
Quoted 111 lines · Manasi Navare
Quoted 102 lines · Ville Syrjälä
Quoted 89 lines · Manasi Navare
Quoted 64 lines · Ville Syrjälä
Quoted 63 lines · Khaled
Quoted 47 lines · Ville Syrjälä
Quoted 46 lines · Vidya Srinivas
Signed-off-by Khaled Almahallawy <[email protected]>Signed-off-by Vidya Srinivas <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp.c | 40 ++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 8 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +13
-3@@ -5470,22 +5470,32 @@ intel_dp_autotest_phy_ddi_disable(struct intel_dp *intel_dp)struct drm_i915_private *dev_priv =to_i915 (dev);struct intel_crtc *crtc =to_intel_crtc (intel_dig_port- >base.base.crtc);enum pipe pipe = crtc->pipe; -u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value; +u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value, trans_ddi_port_mask; +enum port port = intel_dig_port->base.port; +i915_reg_t dp_tp_reg; + +if (IS_ELKHARTLAKE (dev_priv)) { + dp_tp_reg =DP_TP_CTL (port); + trans_ddi_port_mask =TRANS_DDI_PORT_MASK ; + }else if (IS_TIGERLAKE (dev_priv)) { + dp_tp_reg =TGL_DP_TP_CTL (pipe); + trans_ddi_port_mask =TGL_TRANS_DDI_PORT_MASK ; + } trans_ddi_func_ctl_value =intel_de_read (dev_priv,TRANS_DDI_FUNC_CTL (pip e)); trans_conf_value =intel_de_read (dev_priv,PIPECONF (pipe)); - dp_tp_ctl_value =intel_de_read (dev_priv,TGL_DP_TP_CTL (pipe)); + dp_tp_ctl_value =intel_de_read (dev_priv, dp_tp_reg); trans_ddi_func_ctl_value &= ~(TRANS_DDI_FUNC_ENABLE | -TGL_TRANS_DDI_PORT_MASK ); + trans_ddi_port_mask); trans_conf_value &= ~PIPECONF_ENABLE ; dp_tp_ctl_value &= ~DP_TP_CTL_ENABLE ;Quoted 12 lines
drivers/gpu/drm/i915/display/intel_dp.c
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_dp.c +0
-0intel_de_write (dev_priv,PIPECONF (pipe), trans_conf_value); intel_de_write(dev_priv, TRANS_DDI_FUNC_CTL(pipe),drivers/gpu/drm/i915/display/intel_dp.c +1
-1trans_ddi_func_ctl_value); -intel_de_write (dev_priv,TGL_DP_TP_CTL (pipe), dp_tp_ctl_value); +intel_de_write (dev_priv, dp_tp_reg, dp_tp_ctl_value);All this ad-hoc modeset code really should not exist. It's going to have different bugs than the norma modeset paths, so compliance testing
this special code proves absolutely nothing about the normal modeset code. IMO someone needs to take up the task of rewrtiting all this to just perform normal modesets.Agree. I've just found that we get kernel NULL pointer dereference and panic when we try to access to_intel_crtc(intel_dig_port-
Quoted 7 lines
Quoted 1 line
Quoted 1 line
base.base.crtc).
Yeah, that's a legacy pointer which should no longer be used at all with atomic drivers. I'm slowly trying to clear out all this legacy cruft. The next step I had hoped to take was
https://patchwork.freedesktop.org/series/76993/ but then this compliacnce stuff landed and threw another wrench into the works.We had several discussions on design of DP PHY compliance and the patches were on the M-L for quite some time without anyone giving feedback on the actual design of whether they should happen through modeset or directly from the PHY comp request short pulse.
My first feedback was also that this should happen through a complete modeset where after we get PHY comp request we send a uevent like we do for link layer compliance and then trigger a full modeset. But honestly that was just a lot of overhead and
The reason we decided to go with this ad hoc approach was that with PHY compliance request, nothing really changes in terms of link parameters so we do not need to go through
a complete modeset request unlike link layer compliance where we need to do compute config all over again to do the link params computation.Every PHY comp request first sends a link layer comp request that does a full modeset and sets up the desired link rate/lane count.
Then with PHY request, all we need to do is disable pipe conf,dp_tp_ctl, set the PHY patterns and renable the pipe conf anddp_tp_ctlwithout interfering and doing anything with a full modeset.Quoted 8 lines
Now i think if we need to scale this to other platforms, can we add a per platform hook for
handle_phy_requestthat gets the correctDP_TP_CTLetc and sets up the PHY patterns and reenables the already set link?We have thoroughly tested this using the scopes and DPR 100 and it has been working correctly with the existing IGT compliance tool so IMO no need to rewrite the entire set of patches.
Ville, Khaled ?
You're just multiplying the amount of work and bugs we have for every platform.
Quoted 7 lines
And as said testing some special compliance paths proves pretty much nothing about the real code paths. So the only point of that code AFAICS it to tick some "we haz compliance code?" checkbox in some random spreadsheet instead of actually providing evidence that our real code works correctly.
Quoted 4 lines
I thougt the whole point of PHY compliance is not to be able to see if the driver can do a modeset but just to confirm that driver is able to send the requested patterns out on already enabled link. So shouldnt doing this directly through the phy request handling on short pulse suffice?
You're not proving the driver proper can transmit the requested stuff, you're only proving the special compliance code can do that. I could easily break the normal codepaths and yet this magic compliance thing could still indicate that everything is hunky dory.
Quoted 3 lines
But if we want to insert this in the modeset what should be the flow:
- AFter getting PHY request, store the requested PHY patterns, send a ueventYou don't really need any uevent. We coukd do the stuff directly from the hotplug work.
Quoted 4 lines
- This will trigger a complete modeset, in this path for atomic check, see if PHY compliance test active then ignore recomputing the parameters and also in the commit tail, only disable the Pipeconf,
dp_tp_ctland send these patterns and then reenable?Quoted 7 lines
Quoted 3 lines
We should just do a full modeset if possible. Randomly turning the pipe/etc. on/off without following the proper modeset sequence is dubious at best.
how do we trigger a full modeset directly from the hotplug work just from within the kernel? We faced the same problem with link layer compliance and hence we decided to send the uevent there to trigger a ful modeset.
The full modeset via userspace route is only needed if the resolution needs to be changed since that's something userspace gets to decide. If the current mode is still OK we can directly trigger the modeset from the kernel. Not sure if we do or not.
Quoted 8 lines
Quoted 6 lines
We do a full modeset for HDMI when the sink forgets that scrambling was supposed to be on, and I'm a bit tempted to do the same for plain old DP retraining to get rid of the special case code for that (and to actually follow the modeset seqeunce properly when doing retraining).
For retraining we dont have any special case code right,
Yes we do. intel_dp_retrain_link().
Quoted 6 lines
we just fallback and then send uevent.
Oh but do you mean like getting rid of setting the link status and forcing a full modeset etc?So for PHY compliance, we do something similar to calling
modeset_pipe()fromintel_hdmi_reset_link()? So call thismodeset_pipefromintel_dp_autotest_phy_pattern()after storing the requested phy patterns in a compliance struct?
The modeset moust be moved into the hotplug work. The dig_port work shouldn't do anything except stash the request somewhere and kick off the hotplug work.
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 48 lines · Khaled
Quoted 47 lines · Ville Syrjälä
Quoted 46 lines · Vidya Srinivas
Signed-off-by Khaled Almahallawy <[email protected]>Signed-off-by Vidya Srinivas <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp.c | 40 ++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 8 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +13
-3@@ -5470,22 +5470,32 @@ intel_dp_autotest_phy_ddi_disable(struct intel_dp *intel_dp)struct drm_i915_private *dev_priv =to_i915 (dev);struct intel_crtc *crtc =to_intel_crtc (intel_dig_port- >base.base.crtc);enum pipe pipe = crtc->pipe; -u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value; +u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value, trans_ddi_port_mask; +enum port port = intel_dig_port->base.port; +i915_reg_t dp_tp_reg; + +if (IS_ELKHARTLAKE (dev_priv)) { + dp_tp_reg =DP_TP_CTL (port); + trans_ddi_port_mask =TRANS_DDI_PORT_MASK ; + }else if (IS_TIGERLAKE (dev_priv)) { + dp_tp_reg =TGL_DP_TP_CTL (pipe); + trans_ddi_port_mask =TGL_TRANS_DDI_PORT_MASK ; + } trans_ddi_func_ctl_value =intel_de_read (dev_priv,TRANS_DDI_FUNC_CTL (pip e)); trans_conf_value =intel_de_read (dev_priv,PIPECONF (pipe)); - dp_tp_ctl_value =intel_de_read (dev_priv,TGL_DP_TP_CTL (pipe)); + dp_tp_ctl_value =intel_de_read (dev_priv, dp_tp_reg); trans_ddi_func_ctl_value &= ~(TRANS_DDI_FUNC_ENABLE | -TGL_TRANS_DDI_PORT_MASK ); + trans_ddi_port_mask); trans_conf_value &= ~PIPECONF_ENABLE ; dp_tp_ctl_value &= ~DP_TP_CTL_ENABLE ;
Quoted 12 lines
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_dp.c +0
-0intel_de_write (dev_priv,PIPECONF (pipe), trans_conf_value); intel_de_write(dev_priv, TRANS_DDI_FUNC_CTL(pipe),drivers/gpu/drm/i915/display/intel_dp.c +0
-1trans_ddi_func_ctl_value); -intel_de_write (dev_priv,TGL_DP_TP_CTL (pipe), dp_tp_ctl_value);Quoted 8 lines
drivers/gpu/drm/i915/display/intel_dp.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_dp.c +1
-0+intel_de_write (dev_priv, dp_tp_reg, dp_tp_ctl_value);All this ad-hoc modeset code really should not exist. It's going to have different bugs than the norma modeset paths, so compliance testing
this special code proves absolutely nothing about the normal modeset code. IMO someone needs to take up the task of rewrtiting all this to just perform normal modesets.
But isnt that behaviour of the scope against the compliance spec? The PHY request as per the VESA compliance spec should only come through a short pulse.
Yes if it comes through a long pulse, it will reset the link and this whole code will fall apart.
Manasi
Quoted 157 lines
Agree. I've just found that we get kernel NULL pointer dereference and panic when we try to access to_intel_crtc(intel_dig_port-
Quoted 1 line
base.base.crtc). This is because we didn't realize when we developed
the code that test scope has an option to send PHY test request on Long HPD. Current desing assume PHY test request on short HPD. Because of that we got the following error
[ 106.810882] i915 0000:00:02.0: [drm:intel_hpd_irq_handler [i915]] digital hpd on [ENCODER:308:DDI F] - long [ 106.810916] i915 0000:00:02.0: [drm:intel_hpd_irq_handler [i915]] Received HPD interrupt on PIN 9 - cnt: 10 [ 106.811026] i915 0000:00:02.0: [drm:intel_dp_hpd_pulse [i915]] got hpd irq on [ENCODER:308:DDI F] - long [ 106.811095] i915 0000:00:02.0: [drm:i915_hotplug_work_func [i915]] running encoder hotplug functions [ 106.811184] i915 0000:00:02.0: [drm:i915_hotplug_work_func [i915]] Connector DP-3 (pin 9) received hotplug event. (retry 0) [ 106.811227] i915 0000:00:02.0: [drm:intel_dp_detect [i915]] [CONNECTOR:309:DP-3] [ 106.811292] i915 0000:00:02.0: [drm:intel_power_well_enable [i915]] enabling TC cold off [ 106.811365] i915 0000:00:02.0: [drm:tgl_tc_cold_request [i915]] TC cold block succeeded [ 106.811489] i915 0000:00:02.0: [drm:__intel_tc_port_lock [i915]] Port F/TC#3: TC port mode reset (tbt-alt -> dp-alt) [ 106.811663] i915 0000:00:02.0: [drm:intel_power_well_enable [i915]] enabling AUX F TC3 [ 106.812449] [drm:drm_dp_dpcd_read] AUX F/port F: 0x00000 AUX -> (ret= 15) 12 14 04 80 00 00 01 00 00 00 00 00 00 00 00 [ 106.812484] i915 0000:00:02.0: [drm:intel_dp_read_dpcd [i915]] DPCD: 12 14 04 80 00 00 01 00 00 00 00 00 00 00 00 [ 106.813266] [drm:drm_dp_dpcd_read] AUX F/port F: 0x00400 AUX -> (ret= 12) 00 00 00 00 00 00 00 00 00 00 00 00 [ 106.813271] [drm:drm_dp_read_desc] DP sink: OUI 00-00-00 dev-ID HW- rev 0.0 SW-rev 0.0 quirks 0x0000 [ 106.813891] [drm:drm_dp_dpcd_read] AUX F/port F: 0x00200 AUX -> (ret= 1) 01 [ 106.813940] i915 0000:00:02.0: [drm:intel_dp_print_rates [i915]] source rates: 162000, 216000, 270000, 324000, 432000, 540000, 648000, 810000 [ 106.813974] i915 0000:00:02.0: [drm:intel_dp_print_rates [i915]] sink rates: 162000, 270000, 540000 [ 106.814007] i915 0000:00:02.0: [drm:intel_dp_print_rates [i915]] common rates: 162000, 270000, 540000 [ 106.814550] [drm:drm_dp_dpcd_read] AUX F/port F: 0x00021 AUX -> (ret= 1) 00 [ 106.814583] i915 0000:00:02.0: [drm:intel_dp_detect [i915]][ENCODER:308:DDI F] MST support: port: yes, sink: no, modparam: yes
.....
[ 106.927291] i915 0000:00:02.0: [drm:intel_dp_check_service_irq [i915]] PHY_PATTERN test requested [ 106.927897] [drm:drm_dp_dpcd_read] AUX F/port F: 0x00219 AUX -> (ret= 1) 0a [ 106.928507] [drm:drm_dp_dpcd_read] AUX F/port F: 0x00220 AUX -> (ret= 1) 04 [ 106.929143] [drm:drm_dp_dpcd_read] AUX F/port F: 0x00248 AUX -> (ret= 1) 00 [ 106.929824] [drm:drm_dp_dpcd_read] AUX F/port F: 0x00202 AUX -> (ret= 6) 00 00 80 00 00 00 [ 106.929830] BUG: kernel NULL pointer dereference, address: 0000000000000578 [ 106.936809] #PF: supervisor read access in kernel mode [ 106.941953] #PF: error_code(0x0000) - not-present page [ 106.947082] PGD 0 P4D 0 [ 106.949643] Oops: 0000 [#1] PREEMPT SMP NOPTI [ 106.954010] CPU: 6 PID: 200 Comm: kworker/6:2 Not tainted 5.7.0-rc7- CI-CI_DRM_8566+ #5 [ 106.975251] Workqueue: events i915_hotplug_work_func [i915] [ 106.980887] RIP: 0010:intel_dp_process_phy_request+0x94/0x5a0 [i915] [ 106.987239] Code: 48 83 c4 20 5b 5d 41 5c 41 5d 41 5e 41 5f c3 48 8d 74 24 12 4c 89 f7 e8 3a 3e 00 00 49 8b 86 28 ff ff ff 49 8b 9e d8 fe ff ff <48> 63 80 78 05 00 00 8b 93 54 0d 00 00 48 8d ab e8 0e 00 00 48 89 [ 107.005890] RSP: 0018:ffffc9000046fb20 EFLAGS: 00010246I plan to temporarily fix this issue by ignoreing scope request on long HPD, until we have modeset based implementation.
Quoted 70 lines
Quoted 70 lines
}
static void
drivers/gpu/drm/i915/display/intel_dp.c +11
-3@@ -5497,20 +5507,28 @@ intel_dp_autotest_phy_ddi_enable(struct intel_dp *intel_dp, uint8_t lane_cnt) enum port port = intel_dig_port->base.port;struct intel_crtc *crtc =to_intel_crtc (intel_dig_port- >base.base.crtc);enum pipe pipe = crtc->pipe; -u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value; +u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value, trans_ddi_sel_port; +i915_reg_t dp_tp_reg; + +if (IS_ELKHARTLAKE (dev_priv)) { + dp_tp_reg =DP_TP_CTL (port); + trans_ddi_sel_port =TRANS_DDI_SELECT_PORT (port); + }else if (IS_TIGERLAKE (dev_priv)) { + dp_tp_reg =TGL_DP_TP_CTL (pipe); + trans_ddi_sel_port =TGL_TRANS_DDI_SELECT_PORT (port); + } trans_ddi_func_ctl_value =intel_de_read (dev_priv,TRANS_DDI_FUNC_CTL (pip e)); trans_conf_value =intel_de_read (dev_priv,PIPECONF (pipe)); dp_tp_ctl_value =intel_de_read (dev_priv,TGL_DP_TP_CTL (pipe)); - trans_ddi_func_ctl_value |=TRANS_DDI_FUNC_ENABLE | -TGL_TRANS_DDI_SELECT_PORT (port); + trans_ddi_sel_port; trans_conf_value |=PIPECONF_ENABLE ; dp_tp_ctl_value |=DP_TP_CTL_ENABLE ;drivers/gpu/drm/i915/display/intel_dp.c +2
-1intel_de_write (dev_priv,PIPECONF (pipe), trans_conf_value); -intel_de_write (dev_priv,TGL_DP_TP_CTL (pipe), dp_tp_ctl_value); +intel_de_write (dev_priv, dp_tp_reg, dp_tp_ctl_value);intel_de_write (dev_priv,TRANS_DDI_FUNC_CTL (pipe), trans_ddi_func_ctl_value); }@@ -5557,6 +5575,7 @@ static u8 intel_dp_autotest_phy_pattern(struct intel_dp *intel_dp) static void intel_dp_handle_test_request(struct intel_dp *intel_dp) {struct drm_i915_private *i915 =dp_to_i915 (intel_dp); +struct drm_i915_private *dev_priv = i915;u8 response =DP_TEST_NAK ;drivers/gpu/drm/i915/display/intel_dp.c +5
-0u8 request =0 ;int status;@@ -5582,6 +5601,11 @@ static void intel_dp_handle_test_request(struct intel_dp *intel_dp) response =intel_dp_autotest_edid (intel_dp);break ;case DP_TEST_LINK_PHY_TEST_PATTERN : +if (!IS_ELKHARTLAKE (dev_priv) || !IS_TIGERLAKE (dev_priv)) { +drm_dbg_kms (&i915->drm, +"PHY compliance for platform not supported\n"); +return ; + }drm_dbg_kms(&i915->drm, "
PHY_PATTERNtest
requested\n");drivers/gpu/drm/i915/display/intel_dp.c +0
-0response =intel_dp_autotest_phy_pattern (intel_dp);break ;Signature · 1 line
2.7.4Quoted 6 lines
Quoted 4 lines
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 4 lines
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 62 lines · Manasi Navare
Quoted 48 lines · Khaled
Quoted 47 lines · Ville Syrjälä
Quoted 46 lines · Vidya Srinivas
Signed-off-by Khaled Almahallawy <[email protected]>Signed-off-by Vidya Srinivas <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp.c | 40 ++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 8 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +13
-3@@ -5470,22 +5470,32 @@ intel_dp_autotest_phy_ddi_disable(struct intel_dp *intel_dp)struct drm_i915_private *dev_priv =to_i915 (dev);struct intel_crtc *crtc =to_intel_crtc (intel_dig_port- >base.base.crtc);enum pipe pipe = crtc->pipe; -u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value; +u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value, trans_ddi_port_mask; +enum port port = intel_dig_port->base.port; +i915_reg_t dp_tp_reg; + +if (IS_ELKHARTLAKE (dev_priv)) { + dp_tp_reg =DP_TP_CTL (port); + trans_ddi_port_mask =TRANS_DDI_PORT_MASK ; + }else if (IS_TIGERLAKE (dev_priv)) { + dp_tp_reg =TGL_DP_TP_CTL (pipe); + trans_ddi_port_mask =TGL_TRANS_DDI_PORT_MASK ; + } trans_ddi_func_ctl_value =intel_de_read (dev_priv,TRANS_DDI_FUNC_CTL (pip e)); trans_conf_value =intel_de_read (dev_priv,PIPECONF (pipe)); - dp_tp_ctl_value =intel_de_read (dev_priv,TGL_DP_TP_CTL (pipe)); + dp_tp_ctl_value =intel_de_read (dev_priv, dp_tp_reg); trans_ddi_func_ctl_value &= ~(TRANS_DDI_FUNC_ENABLE | -TGL_TRANS_DDI_PORT_MASK ); + trans_ddi_port_mask); trans_conf_value &= ~PIPECONF_ENABLE ; dp_tp_ctl_value &= ~DP_TP_CTL_ENABLE ;Quoted 12 lines
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_dp.c +0
-0intel_de_write (dev_priv,PIPECONF (pipe), trans_conf_value); intel_de_write(dev_priv, TRANS_DDI_FUNC_CTL(pipe),drivers/gpu/drm/i915/display/intel_dp.c +0
-1trans_ddi_func_ctl_value); -intel_de_write (dev_priv,TGL_DP_TP_CTL (pipe), dp_tp_ctl_value);Quoted 8 lines
drivers/gpu/drm/i915/display/intel_dp.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_dp.c +1
-0+intel_de_write (dev_priv, dp_tp_reg, dp_tp_ctl_value);All this ad-hoc modeset code really should not exist. It's going to have different bugs than the norma modeset paths, so compliance testing
this special code proves absolutely nothing about the normal modeset code. IMO someone needs to take up the task of rewrtiting all this to just perform normal modesets.
Quoted 1 line
But isnt that behaviour of the scope against the compliance spec?
scope?
Quoted 4 lines
The PHY request as per the VESA compliance spec should only come through a short pulse.
Yes if it comes through a long pulse, it will reset the link and this whole code will fall apart.
I am not saying anything about how the sink signals the requests. That's just an implementation detail that doesn't really matter.
Quoted 164 lines
Manasi
Quoted 161 lines
Agree. I've just found that we get kernel NULL pointer dereference and panic when we try to access to_intel_crtc(intel_dig_port-
Quoted 1 line
base.base.crtc). This is because we didn't realize when we developed
the code that test scope has an option to send PHY test request on Long HPD. Current desing assume PHY test request on short HPD. Because of that we got the following error
[ 106.810882] i915 0000:00:02.0: [drm:intel_hpd_irq_handler [i915]] digital hpd on [ENCODER:308:DDI F] - long [ 106.810916] i915 0000:00:02.0: [drm:intel_hpd_irq_handler [i915]] Received HPD interrupt on PIN 9 - cnt: 10 [ 106.811026] i915 0000:00:02.0: [drm:intel_dp_hpd_pulse [i915]] got hpd irq on [ENCODER:308:DDI F] - long [ 106.811095] i915 0000:00:02.0: [drm:i915_hotplug_work_func [i915]] running encoder hotplug functions [ 106.811184] i915 0000:00:02.0: [drm:i915_hotplug_work_func [i915]] Connector DP-3 (pin 9) received hotplug event. (retry 0) [ 106.811227] i915 0000:00:02.0: [drm:intel_dp_detect [i915]] [CONNECTOR:309:DP-3] [ 106.811292] i915 0000:00:02.0: [drm:intel_power_well_enable [i915]] enabling TC cold off [ 106.811365] i915 0000:00:02.0: [drm:tgl_tc_cold_request [i915]] TC cold block succeeded [ 106.811489] i915 0000:00:02.0: [drm:__intel_tc_port_lock [i915]] Port F/TC#3: TC port mode reset (tbt-alt -> dp-alt) [ 106.811663] i915 0000:00:02.0: [drm:intel_power_well_enable [i915]] enabling AUX F TC3 [ 106.812449] [drm:drm_dp_dpcd_read] AUX F/port F: 0x00000 AUX -> (ret= 15) 12 14 04 80 00 00 01 00 00 00 00 00 00 00 00 [ 106.812484] i915 0000:00:02.0: [drm:intel_dp_read_dpcd [i915]] DPCD: 12 14 04 80 00 00 01 00 00 00 00 00 00 00 00 [ 106.813266] [drm:drm_dp_dpcd_read] AUX F/port F: 0x00400 AUX -> (ret= 12) 00 00 00 00 00 00 00 00 00 00 00 00 [ 106.813271] [drm:drm_dp_read_desc] DP sink: OUI 00-00-00 dev-ID HW- rev 0.0 SW-rev 0.0 quirks 0x0000 [ 106.813891] [drm:drm_dp_dpcd_read] AUX F/port F: 0x00200 AUX -> (ret= 1) 01 [ 106.813940] i915 0000:00:02.0: [drm:intel_dp_print_rates [i915]] source rates: 162000, 216000, 270000, 324000, 432000, 540000, 648000, 810000 [ 106.813974] i915 0000:00:02.0: [drm:intel_dp_print_rates [i915]] sink rates: 162000, 270000, 540000 [ 106.814007] i915 0000:00:02.0: [drm:intel_dp_print_rates [i915]] common rates: 162000, 270000, 540000 [ 106.814550] [drm:drm_dp_dpcd_read] AUX F/port F: 0x00021 AUX -> (ret= 1) 00 [ 106.814583] i915 0000:00:02.0: [drm:intel_dp_detect [i915]][ENCODER:308:DDI F] MST support: port: yes, sink: no, modparam: yes
.....
[ 106.927291] i915 0000:00:02.0: [drm:intel_dp_check_service_irq [i915]] PHY_PATTERN test requested [ 106.927897] [drm:drm_dp_dpcd_read] AUX F/port F: 0x00219 AUX -> (ret= 1) 0a [ 106.928507] [drm:drm_dp_dpcd_read] AUX F/port F: 0x00220 AUX -> (ret= 1) 04 [ 106.929143] [drm:drm_dp_dpcd_read] AUX F/port F: 0x00248 AUX -> (ret= 1) 00 [ 106.929824] [drm:drm_dp_dpcd_read] AUX F/port F: 0x00202 AUX -> (ret= 6) 00 00 80 00 00 00 [ 106.929830] BUG: kernel NULL pointer dereference, address: 0000000000000578 [ 106.936809] #PF: supervisor read access in kernel mode [ 106.941953] #PF: error_code(0x0000) - not-present page [ 106.947082] PGD 0 P4D 0 [ 106.949643] Oops: 0000 [#1] PREEMPT SMP NOPTI [ 106.954010] CPU: 6 PID: 200 Comm: kworker/6:2 Not tainted 5.7.0-rc7- CI-CI_DRM_8566+ #5 [ 106.975251] Workqueue: events i915_hotplug_work_func [i915] [ 106.980887] RIP: 0010:intel_dp_process_phy_request+0x94/0x5a0 [i915] [ 106.987239] Code: 48 83 c4 20 5b 5d 41 5c 41 5d 41 5e 41 5f c3 48 8d 74 24 12 4c 89 f7 e8 3a 3e 00 00 49 8b 86 28 ff ff ff 49 8b 9e d8 fe ff ff <48> 63 80 78 05 00 00 8b 93 54 0d 00 00 48 8d ab e8 0e 00 00 48 89 [ 107.005890] RSP: 0018:ffffc9000046fb20 EFLAGS: 00010246I plan to temporarily fix this issue by ignoreing scope request on long HPD, until we have modeset based implementation.
Quoted 70 lines
Quoted 70 lines
}
static void
drivers/gpu/drm/i915/display/intel_dp.c +11
-3@@ -5497,20 +5507,28 @@ intel_dp_autotest_phy_ddi_enable(struct intel_dp *intel_dp, uint8_t lane_cnt) enum port port = intel_dig_port->base.port;struct intel_crtc *crtc =to_intel_crtc (intel_dig_port- >base.base.crtc);enum pipe pipe = crtc->pipe; -u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value; +u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value, trans_ddi_sel_port; +i915_reg_t dp_tp_reg; + +if (IS_ELKHARTLAKE (dev_priv)) { + dp_tp_reg =DP_TP_CTL (port); + trans_ddi_sel_port =TRANS_DDI_SELECT_PORT (port); + }else if (IS_TIGERLAKE (dev_priv)) { + dp_tp_reg =TGL_DP_TP_CTL (pipe); + trans_ddi_sel_port =TGL_TRANS_DDI_SELECT_PORT (port); + } trans_ddi_func_ctl_value =intel_de_read (dev_priv,TRANS_DDI_FUNC_CTL (pip e)); trans_conf_value =intel_de_read (dev_priv,PIPECONF (pipe)); dp_tp_ctl_value =intel_de_read (dev_priv,TGL_DP_TP_CTL (pipe)); - trans_ddi_func_ctl_value |=TRANS_DDI_FUNC_ENABLE | -TGL_TRANS_DDI_SELECT_PORT (port); + trans_ddi_sel_port; trans_conf_value |=PIPECONF_ENABLE ; dp_tp_ctl_value |=DP_TP_CTL_ENABLE ;drivers/gpu/drm/i915/display/intel_dp.c +2
-1intel_de_write (dev_priv,PIPECONF (pipe), trans_conf_value); -intel_de_write (dev_priv,TGL_DP_TP_CTL (pipe), dp_tp_ctl_value); +intel_de_write (dev_priv, dp_tp_reg, dp_tp_ctl_value);intel_de_write (dev_priv,TRANS_DDI_FUNC_CTL (pipe), trans_ddi_func_ctl_value); }@@ -5557,6 +5575,7 @@ static u8 intel_dp_autotest_phy_pattern(struct intel_dp *intel_dp) static void intel_dp_handle_test_request(struct intel_dp *intel_dp) {struct drm_i915_private *i915 =dp_to_i915 (intel_dp); +struct drm_i915_private *dev_priv = i915;u8 response =DP_TEST_NAK ;drivers/gpu/drm/i915/display/intel_dp.c +5
-0u8 request =0 ;int status;@@ -5582,6 +5601,11 @@ static void intel_dp_handle_test_request(struct intel_dp *intel_dp) response =intel_dp_autotest_edid (intel_dp);break ;case DP_TEST_LINK_PHY_TEST_PATTERN : +if (!IS_ELKHARTLAKE (dev_priv) || !IS_TIGERLAKE (dev_priv)) { +drm_dbg_kms (&i915->drm, +"PHY compliance for platform not supported\n"); +return ; + }drm_dbg_kms(&i915->drm, "
PHY_PATTERNtest
requested\n");drivers/gpu/drm/i915/display/intel_dp.c +0
-0response =intel_dp_autotest_phy_pattern (intel_dp);break ;Signature · 1 line
2.7.4Quoted 6 lines
Quoted 4 lines
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/3 drm/dp: Add PHY_TEST_PATTERN CP2520 Pattern 2 and 3
In reply to Vidya SrinivasFrom: Khaled Almahallawy <[email protected]>
Add the missing CP2520 pattern 2 and 3 phy compliance patterns
v2: cosemtic changes
--- drivers/gpu/drm/drm_dp_helper.c | 2 +- include/drm/drm_dp_helper.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_dp_helper.c +1 -1
@@ -1583,7 +1583,7 @@ int drm_dp_get_phy_test_pattern(struct drm_dp_aux *aux,return err;break ; -case DP_PHY_TEST_PATTERN_CP2520 : +case DP_PHY_TEST_PATTERN_CP2520_PAT1 : err =drm_dp_dpcd_read (aux,DP_TEST_HBR2_SCRAMBLER_RESET , &data->hbr2_reset,sizeof (data->hbr2_reset));
include/drm/drm_dp_helper.h +3 -1
@@ -708,7 +708,9 @@# define DP_PHY_TEST_PATTERN_ERROR_COUNT 0x2# define DP_PHY_TEST_PATTERN_PRBS7 0x3# define DP_PHY_TEST_PATTERN_80BIT_CUSTOM 0x4 -# define DP_PHY_TEST_PATTERN_CP2520 0x5 +# define DP_PHY_TEST_PATTERN_CP2520_PAT1 0x5 +# define DP_PHY_TEST_PATTERN_CP2520_PAT2 0x6 +# define DP_PHY_TEST_PATTERN_CP2520_PAT3 0x7#define DP_TEST_HBR2_SCRAMBLER_RESET 0x24A#define DP_TEST_80BIT_CUSTOM_PATTERN_7_0 0x250
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/1 drm/i915/dp: DP PHY compliance for EHL/JSL
v2: Rebased patch on top of:
https://patchwork.freedesktop.org/series/79779/
Fixed phy patterns for JSL/EHL
Add TPS4 support for JSL/EHL
--- drivers/gpu/drm/i915/display/intel_dp.c | 81 +++++++++++++++++++++++++-------- drivers/gpu/drm/i915/i915_reg.h | 18 ++++++-- 2 files changed, 78 insertions(+), 21 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +63 -18
@@ -5405,25 +5405,32 @@ static void intel_dp_phy_pattern_update(struct intel_dp *intel_dp)enum pipe pipe = crtc->pipe;u32 pattern_val, dp_tp_ctl; +i915_reg_t dp_comp_reg; + +if (IS_ELKHARTLAKE (dev_priv)) + dp_comp_reg =EHL_DDI_DP_COMP_CTL (dig_port->base.port); +else if (IS_TIGERLAKE (dev_priv)) + dp_comp_reg =DDI_DP_COMP_CTL (pipe); +switch (data->phy_pattern) {case DP_PHY_TEST_PATTERN_NONE :DRM_DEBUG_KMS ("Disable Phy Test Pattern\n" ); -intel_de_write (dev_priv,DDI_DP_COMP_CTL (pipe),0x0 ); +intel_de_write (dev_priv, dp_comp_reg,0x0 );break ;case DP_PHY_TEST_PATTERN_D10_2 :DRM_DEBUG_KMS ("Set D10.2 Phy Test Pattern\n" ); -intel_de_write (dev_priv,DDI_DP_COMP_CTL (pipe), +intel_de_write (dev_priv, dp_comp_reg,DDI_DP_COMP_CTL_ENABLE |DDI_DP_COMP_CTL_D10_2 );break ;case DP_PHY_TEST_PATTERN_ERROR_COUNT :DRM_DEBUG_KMS ("Set Error Count Phy Test Pattern\n" ); -intel_de_write (dev_priv,DDI_DP_COMP_CTL (pipe), +intel_de_write (dev_priv, dp_comp_reg,DDI_DP_COMP_CTL_ENABLE |DDI_DP_COMP_CTL_SCRAMBLED_0 );break ;case DP_PHY_TEST_PATTERN_PRBS7 :DRM_DEBUG_KMS ("Set PRBS7 Phy Test Pattern\n" ); -intel_de_write (dev_priv,DDI_DP_COMP_CTL (pipe), +intel_de_write (dev_priv, dp_comp_reg,DDI_DP_COMP_CTL_ENABLE |DDI_DP_COMP_CTL_PRBS7 );break ;case DP_PHY_TEST_PATTERN_80BIT_CUSTOM :
@@ -5432,14 +5439,27 @@ static void intel_dp_phy_pattern_update(struct intel_dp *intel_dp)* current firmware of DPR-100 could not set it, so hardcoding * now for complaince test. */ -DRM_DEBUG_KMS ("Set 80Bit Custom Phy Test Pattern 0x3e0f83e0 0x0f83e0f8 0x0000f83e\n" ); +DRM_DEBUG_KMS ("Set 80Bit Custom Phy Test Pattern \ +0x3e0f83e0 0x0f83e0f8 0x0000f83e\n" ); pattern_val =0x3e0f83e0 ; -intel_de_write (dev_priv,DDI_DP_COMP_PAT (pipe,0 ), pattern_val); +if (IS_ELKHARTLAKE (dev_priv)) +intel_de_write (dev_priv,EHL_DDI_DP_COMP_PAT (dig_port->base.port,0 ), + pattern_val); +else +intel_de_write (dev_priv,DDI_DP_COMP_PAT (pipe,0 ), pattern_val); pattern_val =0x0f83e0f8 ; -intel_de_write (dev_priv,DDI_DP_COMP_PAT (pipe,1 ), pattern_val); +if (IS_ELKHARTLAKE (dev_priv)) +intel_de_write (dev_priv,EHL_DDI_DP_COMP_PAT (dig_port->base.port,1 ), + pattern_val); +else +intel_de_write (dev_priv,DDI_DP_COMP_PAT (pipe,1 ), pattern_val); pattern_val =0x0000f83e ; -intel_de_write (dev_priv,DDI_DP_COMP_PAT (pipe,2 ), pattern_val); -intel_de_write (dev_priv,DDI_DP_COMP_CTL (pipe), +if (IS_ELKHARTLAKE (dev_priv)) +intel_de_write (dev_priv,EHL_DDI_DP_COMP_PAT (dig_port->base.port,2 ), + pattern_val); +else +intel_de_write (dev_priv,DDI_DP_COMP_PAT (pipe,2 ), pattern_val); +intel_de_write (dev_priv, dp_comp_reg,DDI_DP_COMP_CTL_ENABLE |DDI_DP_COMP_CTL_CUSTOM80 );break ;
@@ -5451,7 +5471,7 @@ static void intel_dp_phy_pattern_update(struct intel_dp *intel_dp)*/ DRM_DEBUG_KMS ("Set HBR2 compliance Phy Test Pattern\n" ); pattern_val =0xFB ; -intel_de_write (dev_priv,DDI_DP_COMP_CTL (pipe), +intel_de_write (dev_priv, dp_comp_reg,DDI_DP_COMP_CTL_ENABLE |DDI_DP_COMP_CTL_HBR2 | pattern_val);break ;
@@ -5478,22 +5498,32 @@ intel_dp_autotest_phy_ddi_disable(struct intel_dp *intel_dp)struct drm_i915_private *dev_priv =to_i915 (dev);struct intel_crtc *crtc =to_intel_crtc (dig_port->base.base.crtc);enum pipe pipe = crtc->pipe; -u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value; +u32 trans_ddi_func_ctl_value, trans_conf_value, + dp_tp_ctl_value, trans_ddi_port_mask; +i915_reg_t dp_tp_reg; + +if (IS_ELKHARTLAKE (dev_priv)) { + dp_tp_reg =DP_TP_CTL (dig_port->base.port); + trans_ddi_port_mask =TRANS_DDI_PORT_MASK ; + }else if (IS_TIGERLAKE (dev_priv)) { + dp_tp_reg =TGL_DP_TP_CTL (pipe); + trans_ddi_port_mask =TGL_TRANS_DDI_PORT_MASK ; + } trans_ddi_func_ctl_value =intel_de_read (dev_priv,TRANS_DDI_FUNC_CTL (pipe)); trans_conf_value =intel_de_read (dev_priv,PIPECONF (pipe)); - dp_tp_ctl_value =intel_de_read (dev_priv,TGL_DP_TP_CTL (pipe)); + dp_tp_ctl_value =intel_de_read (dev_priv, dp_tp_reg); trans_ddi_func_ctl_value &= ~(TRANS_DDI_FUNC_ENABLE | -TGL_TRANS_DDI_PORT_MASK ); + trans_ddi_port_mask); trans_conf_value &= ~PIPECONF_ENABLE ; dp_tp_ctl_value &= ~DP_TP_CTL_ENABLE ;intel_de_write (dev_priv,PIPECONF (pipe), trans_conf_value);intel_de_write (dev_priv,TRANS_DDI_FUNC_CTL (pipe), trans_ddi_func_ctl_value); -intel_de_write (dev_priv,TGL_DP_TP_CTL (pipe), dp_tp_ctl_value); +intel_de_write (dev_priv, dp_tp_reg, dp_tp_ctl_value); } static void
@@ -5505,20 +5535,29 @@ intel_dp_autotest_phy_ddi_enable(struct intel_dp *intel_dp, uint8_t lane_cnt)enum port port = dig_port->base.port;struct intel_crtc *crtc =to_intel_crtc (dig_port->base.base.crtc);enum pipe pipe = crtc->pipe; -u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value; +u32 trans_ddi_func_ctl_value, trans_conf_value, + dp_tp_ctl_value, trans_ddi_sel_port; +i915_reg_t dp_tp_reg; + +if (IS_ELKHARTLAKE (dev_priv)) { + dp_tp_reg =DP_TP_CTL (port); + trans_ddi_sel_port =TRANS_DDI_SELECT_PORT (port); + }else if (IS_TIGERLAKE (dev_priv)) { + dp_tp_reg =TGL_DP_TP_CTL (pipe); + trans_ddi_sel_port =TGL_TRANS_DDI_SELECT_PORT (port); + } trans_ddi_func_ctl_value =intel_de_read (dev_priv,TRANS_DDI_FUNC_CTL (pipe)); trans_conf_value =intel_de_read (dev_priv,PIPECONF (pipe)); dp_tp_ctl_value =intel_de_read (dev_priv,TGL_DP_TP_CTL (pipe)); - trans_ddi_func_ctl_value |=TRANS_DDI_FUNC_ENABLE | -TGL_TRANS_DDI_SELECT_PORT (port); + trans_ddi_sel_port; trans_conf_value |=PIPECONF_ENABLE ; dp_tp_ctl_value |=DP_TP_CTL_ENABLE ;intel_de_write (dev_priv,PIPECONF (pipe), trans_conf_value); -intel_de_write (dev_priv,TGL_DP_TP_CTL (pipe), dp_tp_ctl_value); +intel_de_write (dev_priv, dp_tp_reg, dp_tp_ctl_value);intel_de_write (dev_priv,TRANS_DDI_FUNC_CTL (pipe), trans_ddi_func_ctl_value); }
@@ -5565,6 +5604,7 @@ static u8 intel_dp_autotest_phy_pattern(struct intel_dp *intel_dp)static void intel_dp_handle_test_request (struct intel_dp *intel_dp) {struct drm_i915_private *i915 =dp_to_i915 (intel_dp); +struct drm_i915_private *dev_priv = i915;u8 response =DP_TEST_NAK ;u8 request =0 ;int status;
@@ -5590,6 +5630,11 @@ static void intel_dp_handle_test_request(struct intel_dp *intel_dp) response =intel_dp_autotest_edid (intel_dp);break ;case DP_TEST_LINK_PHY_TEST_PATTERN : +if (!IS_ELKHARTLAKE (dev_priv) && !IS_TIGERLAKE (dev_priv)) { +drm_dbg_kms (&i915->drm, +"PHY compliance for platform not supported\n" ); +return ; + }drm_dbg_kms (&i915->drm,"PHY_PATTERN test requested\n" ); response =intel_dp_autotest_phy_pattern (intel_dp);break ;
drivers/gpu/drm/i915/i915_reg.h +15 -3
@@ -10026,10 +10026,16 @@ enum skl_power_gate {#define DDI_BUF_BALANCE_LEG_ENABLE (1 << 31)#define DDI_BUF_TRANS_HI (port, i) _MMIO(_PORT(port, _DDI_BUF_TRANS_A, _DDI_BUF_TRANS_B) + (i) * 8 + 4) +/* EHL/JSL DP compliance control */ +#define _EHL_DDI_DP_COMP_CTL_A 0x640F0 +#define _EHL_DDI_DP_COMP_CTL_B 0x641F0 +#define EHL_DDI_DP_COMP_CTL (port) \ + _MMIO_PORT(port, _EHL_DDI_DP_COMP_CTL_A, _EHL_DDI_DP_COMP_CTL_B) +/* DDI DP Compliance Control */ -#define _DDI_DP_COMP_CTL_A 0x605F0 -#define _DDI_DP_COMP_CTL_B 0x615F0 -#define DDI_DP_COMP_CTL (pipe) _MMIO_PIPE(pipe, _DDI_DP_COMP_CTL_A, _DDI_DP_COMP_CTL_B) +#define _DDI_DP_COMP_CTL_A 0x605F0 +#define _DDI_DP_COMP_CTL_B 0x615F0 +#define DDI_DP_COMP_CTL (pipe) _MMIO_PIPE(pipe, _DDI_DP_COMP_CTL_A, _DDI_DP_COMP_CTL_B)#define DDI_DP_COMP_CTL_ENABLE (1 << 31)#define DDI_DP_COMP_CTL_D10_2 (0 << 28)#define DDI_DP_COMP_CTL_SCRAMBLED_0 (1 << 28)
@@ -10039,6 +10045,12 @@ enum skl_power_gate {#define DDI_DP_COMP_CTL_SCRAMBLED_1 (5 << 28)#define DDI_DP_COMP_CTL_HBR2_RESET (0xFC << 0) +/* EHL */ +#define _EHL_DDI_DP_COMP_PAT_A 0x640F4 +#define _EHL_DDI_DP_COMP_PAT_B 0x641F4 +#define EHL_DDI_DP_COMP_PAT (port, i) \ + _MMIO(_PORT(port, _EHL_DDI_DP_COMP_PAT_A, _EHL_DDI_DP_COMP_PAT_B) + (i) * 4) +/* DDI DP Compliance Pattern */ #define _DDI_DP_COMP_PAT_A 0x605F4#define _DDI_DP_COMP_PAT_B 0x615F4
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/3 drm/i915/dp: TPS4 PHY test pattern compliance support
In reply to Vidya SrinivasFrom: Khaled Almahallawy <[email protected]>
Adding support for TPS4 (CP2520 Pattern 3) PHY pattern source tests.
v2: uniform bit names TP4a/b/c (Manasi)
--- drivers/gpu/drm/i915/display/intel_dp.c | 14 ++++++++++++-- drivers/gpu/drm/i915/i915_reg.h | 4 ++++ 2 files changed, 16 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +12 -2
@@ -5403,7 +5403,7 @@ static void intel_dp_phy_pattern_update(struct intel_dp *intel_dp) &intel_dp->compliance.test_data.phytest;struct intel_crtc *crtc =to_intel_crtc (dig_port->base.base.crtc);enum pipe pipe = crtc->pipe; -u32 pattern_val; +u32 pattern_val, dp_tp_ctl;switch (data->phy_pattern) {case DP_PHY_TEST_PATTERN_NONE :
@@ -5443,7 +5443,7 @@ static void intel_dp_phy_pattern_update(struct intel_dp *intel_dp)DDI_DP_COMP_CTL_ENABLE | DDI_DP_COMP_CTL_CUSTOM80);break ; -case DP_PHY_TEST_PATTERN_CP2520 : +case DP_PHY_TEST_PATTERN_CP2520_PAT1 :/* * FIXME: Ideally pattern should come from DPCD 0x24A. As * current firmware of DPR-100 could not set it, so hardcoding
@@ -5455,6 +5455,16 @@ static void intel_dp_phy_pattern_update(struct intel_dp *intel_dp)DDI_DP_COMP_CTL_ENABLE |DDI_DP_COMP_CTL_HBR2 | pattern_val);break ; +case DP_PHY_TEST_PATTERN_CP2520_PAT3 : +DRM_DEBUG_KMS ("Set TPS4 Phy Test Pattern\n" ); +intel_de_write (dev_priv,DDI_DP_COMP_CTL (pipe),0x0 ); + dp_tp_ctl =intel_de_read (dev_priv,TGL_DP_TP_CTL (pipe)); + dp_tp_ctl &= ~DP_TP_CTL_TRAIN_PAT4_SEL_MASK ; + dp_tp_ctl |= DP_TP_CTL_TRAIN_PAT4_SEL_TP4a; + dp_tp_ctl &= ~DP_TP_CTL_LINK_TRAIN_MASK ; + dp_tp_ctl |=DP_TP_CTL_LINK_TRAIN_PAT4 ; +intel_de_write (dev_priv,TGL_DP_TP_CTL (pipe), dp_tp_ctl); +break ;default :WARN (1 ,"Invalid Phy Test Pattern\n" ); }
drivers/gpu/drm/i915/i915_reg.h +4 -0
@@ -9974,6 +9974,10 @@ enum skl_power_gate {#define DP_TP_CTL_MODE_SST (0 << 27)#define DP_TP_CTL_MODE_MST (1 << 27)#define DP_TP_CTL_FORCE_ACT (1 << 25) +#define DP_TP_CTL_TRAIN_PAT4_SEL_MASK (3 << 19) +#define DP_TP_CTL_TRAIN_PAT4_SEL_TP4a (0 << 19) +#define DP_TP_CTL_TRAIN_PAT4_SEL_TP4b (1 << 19) +#define DP_TP_CTL_TRAIN_PAT4_SEL_TP4c (2 << 19)#define DP_TP_CTL_ENHANCED_FRAME_ENABLE (1 << 18)#define DP_TP_CTL_FDI_AUTOTRAIN (1 << 15)#define DP_TP_CTL_LINK_TRAIN_MASK (7 << 8)
Signature · 6 lines
2.7.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
RFC PATCH 3/3 drm/i915/dp: DP PHY compliance for EHL/JSL
In reply to Vidya SrinivasPlease Note: Comment from Ville could not be addressed as his comments are with respect to base implementation (design) which are already merged. We need JSL changes for compliance. Hence pushing the required changes on top of existing design. Apoligies for that.
v2: Rebased patch on top of Khaled's (yet to be merged):
https://patchwork.freedesktop.org/series/79779/
Fixed phy patterns for JSL/EHL
Add TPS4 support for JSL/EHL
--- drivers/gpu/drm/i915/display/intel_dp.c | 81 +++++++++++++++++++++++++-------- drivers/gpu/drm/i915/i915_reg.h | 18 ++++++-- 2 files changed, 78 insertions(+), 21 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +63 -18
@@ -5405,25 +5405,32 @@ static void intel_dp_phy_pattern_update(struct intel_dp *intel_dp)enum pipe pipe = crtc->pipe;u32 pattern_val, dp_tp_ctl; +i915_reg_t dp_comp_reg; + +if (IS_ELKHARTLAKE (dev_priv)) + dp_comp_reg =EHL_DDI_DP_COMP_CTL (dig_port->base.port); +else if (IS_TIGERLAKE (dev_priv)) + dp_comp_reg =DDI_DP_COMP_CTL (pipe); +switch (data->phy_pattern) {case DP_PHY_TEST_PATTERN_NONE :DRM_DEBUG_KMS ("Disable Phy Test Pattern\n" ); -intel_de_write (dev_priv,DDI_DP_COMP_CTL (pipe),0x0 ); +intel_de_write (dev_priv, dp_comp_reg,0x0 );break ;case DP_PHY_TEST_PATTERN_D10_2 :DRM_DEBUG_KMS ("Set D10.2 Phy Test Pattern\n" ); -intel_de_write (dev_priv,DDI_DP_COMP_CTL (pipe), +intel_de_write (dev_priv, dp_comp_reg,DDI_DP_COMP_CTL_ENABLE |DDI_DP_COMP_CTL_D10_2 );break ;case DP_PHY_TEST_PATTERN_ERROR_COUNT :DRM_DEBUG_KMS ("Set Error Count Phy Test Pattern\n" ); -intel_de_write (dev_priv,DDI_DP_COMP_CTL (pipe), +intel_de_write (dev_priv, dp_comp_reg,DDI_DP_COMP_CTL_ENABLE |DDI_DP_COMP_CTL_SCRAMBLED_0 );break ;case DP_PHY_TEST_PATTERN_PRBS7 :DRM_DEBUG_KMS ("Set PRBS7 Phy Test Pattern\n" ); -intel_de_write (dev_priv,DDI_DP_COMP_CTL (pipe), +intel_de_write (dev_priv, dp_comp_reg,DDI_DP_COMP_CTL_ENABLE |DDI_DP_COMP_CTL_PRBS7 );break ;case DP_PHY_TEST_PATTERN_80BIT_CUSTOM :
@@ -5432,14 +5439,27 @@ static void intel_dp_phy_pattern_update(struct intel_dp *intel_dp)* current firmware of DPR-100 could not set it, so hardcoding * now for complaince test. */ -DRM_DEBUG_KMS ("Set 80Bit Custom Phy Test Pattern 0x3e0f83e0 0x0f83e0f8 0x0000f83e\n" ); +DRM_DEBUG_KMS ("Set 80Bit Custom Phy Test Pattern \ +0x3e0f83e0 0x0f83e0f8 0x0000f83e\n" ); pattern_val =0x3e0f83e0 ; -intel_de_write (dev_priv,DDI_DP_COMP_PAT (pipe,0 ), pattern_val); +if (IS_ELKHARTLAKE (dev_priv)) +intel_de_write (dev_priv,EHL_DDI_DP_COMP_PAT (dig_port->base.port,0 ), + pattern_val); +else +intel_de_write (dev_priv,DDI_DP_COMP_PAT (pipe,0 ), pattern_val); pattern_val =0x0f83e0f8 ; -intel_de_write (dev_priv,DDI_DP_COMP_PAT (pipe,1 ), pattern_val); +if (IS_ELKHARTLAKE (dev_priv)) +intel_de_write (dev_priv,EHL_DDI_DP_COMP_PAT (dig_port->base.port,1 ), + pattern_val); +else +intel_de_write (dev_priv,DDI_DP_COMP_PAT (pipe,1 ), pattern_val); pattern_val =0x0000f83e ; -intel_de_write (dev_priv,DDI_DP_COMP_PAT (pipe,2 ), pattern_val); -intel_de_write (dev_priv,DDI_DP_COMP_CTL (pipe), +if (IS_ELKHARTLAKE (dev_priv)) +intel_de_write (dev_priv,EHL_DDI_DP_COMP_PAT (dig_port->base.port,2 ), + pattern_val); +else +intel_de_write (dev_priv,DDI_DP_COMP_PAT (pipe,2 ), pattern_val); +intel_de_write (dev_priv, dp_comp_reg,DDI_DP_COMP_CTL_ENABLE |DDI_DP_COMP_CTL_CUSTOM80 );break ;
@@ -5451,7 +5471,7 @@ static void intel_dp_phy_pattern_update(struct intel_dp *intel_dp)*/ DRM_DEBUG_KMS ("Set HBR2 compliance Phy Test Pattern\n" ); pattern_val =0xFB ; -intel_de_write (dev_priv,DDI_DP_COMP_CTL (pipe), +intel_de_write (dev_priv, dp_comp_reg,DDI_DP_COMP_CTL_ENABLE |DDI_DP_COMP_CTL_HBR2 | pattern_val);break ;
@@ -5478,22 +5498,32 @@ intel_dp_autotest_phy_ddi_disable(struct intel_dp *intel_dp)struct drm_i915_private *dev_priv =to_i915 (dev);struct intel_crtc *crtc =to_intel_crtc (dig_port->base.base.crtc);enum pipe pipe = crtc->pipe; -u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value; +u32 trans_ddi_func_ctl_value, trans_conf_value, + dp_tp_ctl_value, trans_ddi_port_mask; +i915_reg_t dp_tp_reg; + +if (IS_ELKHARTLAKE (dev_priv)) { + dp_tp_reg =DP_TP_CTL (dig_port->base.port); + trans_ddi_port_mask =TRANS_DDI_PORT_MASK ; + }else if (IS_TIGERLAKE (dev_priv)) { + dp_tp_reg =TGL_DP_TP_CTL (pipe); + trans_ddi_port_mask =TGL_TRANS_DDI_PORT_MASK ; + } trans_ddi_func_ctl_value =intel_de_read (dev_priv,TRANS_DDI_FUNC_CTL (pipe)); trans_conf_value =intel_de_read (dev_priv,PIPECONF (pipe)); - dp_tp_ctl_value =intel_de_read (dev_priv,TGL_DP_TP_CTL (pipe)); + dp_tp_ctl_value =intel_de_read (dev_priv, dp_tp_reg); trans_ddi_func_ctl_value &= ~(TRANS_DDI_FUNC_ENABLE | -TGL_TRANS_DDI_PORT_MASK ); + trans_ddi_port_mask); trans_conf_value &= ~PIPECONF_ENABLE ; dp_tp_ctl_value &= ~DP_TP_CTL_ENABLE ;intel_de_write (dev_priv,PIPECONF (pipe), trans_conf_value);intel_de_write (dev_priv,TRANS_DDI_FUNC_CTL (pipe), trans_ddi_func_ctl_value); -intel_de_write (dev_priv,TGL_DP_TP_CTL (pipe), dp_tp_ctl_value); +intel_de_write (dev_priv, dp_tp_reg, dp_tp_ctl_value); } static void
@@ -5505,20 +5535,29 @@ intel_dp_autotest_phy_ddi_enable(struct intel_dp *intel_dp, uint8_t lane_cnt)enum port port = dig_port->base.port;struct intel_crtc *crtc =to_intel_crtc (dig_port->base.base.crtc);enum pipe pipe = crtc->pipe; -u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value; +u32 trans_ddi_func_ctl_value, trans_conf_value, + dp_tp_ctl_value, trans_ddi_sel_port; +i915_reg_t dp_tp_reg; + +if (IS_ELKHARTLAKE (dev_priv)) { + dp_tp_reg =DP_TP_CTL (port); + trans_ddi_sel_port =TRANS_DDI_SELECT_PORT (port); + }else if (IS_TIGERLAKE (dev_priv)) { + dp_tp_reg =TGL_DP_TP_CTL (pipe); + trans_ddi_sel_port =TGL_TRANS_DDI_SELECT_PORT (port); + } trans_ddi_func_ctl_value =intel_de_read (dev_priv,TRANS_DDI_FUNC_CTL (pipe)); trans_conf_value =intel_de_read (dev_priv,PIPECONF (pipe)); dp_tp_ctl_value =intel_de_read (dev_priv,TGL_DP_TP_CTL (pipe)); - trans_ddi_func_ctl_value |=TRANS_DDI_FUNC_ENABLE | -TGL_TRANS_DDI_SELECT_PORT (port); + trans_ddi_sel_port; trans_conf_value |=PIPECONF_ENABLE ; dp_tp_ctl_value |=DP_TP_CTL_ENABLE ;intel_de_write (dev_priv,PIPECONF (pipe), trans_conf_value); -intel_de_write (dev_priv,TGL_DP_TP_CTL (pipe), dp_tp_ctl_value); +intel_de_write (dev_priv, dp_tp_reg, dp_tp_ctl_value);intel_de_write (dev_priv,TRANS_DDI_FUNC_CTL (pipe), trans_ddi_func_ctl_value); }
@@ -5565,6 +5604,7 @@ static u8 intel_dp_autotest_phy_pattern(struct intel_dp *intel_dp)static void intel_dp_handle_test_request (struct intel_dp *intel_dp) {struct drm_i915_private *i915 =dp_to_i915 (intel_dp); +struct drm_i915_private *dev_priv = i915;u8 response =DP_TEST_NAK ;u8 request =0 ;int status;
@@ -5590,6 +5630,11 @@ static void intel_dp_handle_test_request(struct intel_dp *intel_dp) response =intel_dp_autotest_edid (intel_dp);break ;case DP_TEST_LINK_PHY_TEST_PATTERN : +if (!IS_ELKHARTLAKE (dev_priv) && !IS_TIGERLAKE (dev_priv)) { +drm_dbg_kms (&i915->drm, +"PHY compliance for platform not supported\n" ); +return ; + }drm_dbg_kms (&i915->drm,"PHY_PATTERN test requested\n" ); response =intel_dp_autotest_phy_pattern (intel_dp);break ;
drivers/gpu/drm/i915/i915_reg.h +15 -3
@@ -10026,10 +10026,16 @@ enum skl_power_gate {#define DDI_BUF_BALANCE_LEG_ENABLE (1 << 31)#define DDI_BUF_TRANS_HI (port, i) _MMIO(_PORT(port, _DDI_BUF_TRANS_A, _DDI_BUF_TRANS_B) + (i) * 8 + 4) +/* EHL/JSL DP compliance control */ +#define _EHL_DDI_DP_COMP_CTL_A 0x640F0 +#define _EHL_DDI_DP_COMP_CTL_B 0x641F0 +#define EHL_DDI_DP_COMP_CTL (port) \ + _MMIO_PORT(port, _EHL_DDI_DP_COMP_CTL_A, _EHL_DDI_DP_COMP_CTL_B) +/* DDI DP Compliance Control */ -#define _DDI_DP_COMP_CTL_A 0x605F0 -#define _DDI_DP_COMP_CTL_B 0x615F0 -#define DDI_DP_COMP_CTL (pipe) _MMIO_PIPE(pipe, _DDI_DP_COMP_CTL_A, _DDI_DP_COMP_CTL_B) +#define _DDI_DP_COMP_CTL_A 0x605F0 +#define _DDI_DP_COMP_CTL_B 0x615F0 +#define DDI_DP_COMP_CTL (pipe) _MMIO_PIPE(pipe, _DDI_DP_COMP_CTL_A, _DDI_DP_COMP_CTL_B)#define DDI_DP_COMP_CTL_ENABLE (1 << 31)#define DDI_DP_COMP_CTL_D10_2 (0 << 28)#define DDI_DP_COMP_CTL_SCRAMBLED_0 (1 << 28)
@@ -10039,6 +10045,12 @@ enum skl_power_gate {#define DDI_DP_COMP_CTL_SCRAMBLED_1 (5 << 28)#define DDI_DP_COMP_CTL_HBR2_RESET (0xFC << 0) +/* EHL */ +#define _EHL_DDI_DP_COMP_PAT_A 0x640F4 +#define _EHL_DDI_DP_COMP_PAT_B 0x641F4 +#define EHL_DDI_DP_COMP_PAT (port, i) \ + _MMIO(_PORT(port, _EHL_DDI_DP_COMP_PAT_A, _EHL_DDI_DP_COMP_PAT_B) + (i) * 4) +/* DDI DP Compliance Pattern */ #define _DDI_DP_COMP_PAT_A 0x605F4#define _DDI_DP_COMP_PAT_B 0x615F4
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/3 drm/dp: Add PHY_TEST_PATTERN CP2520 Pattern 2 and 3
In reply to Vidya SrinivasFrom: Khaled Almahallawy <[email protected]>
Add the missing CP2520 pattern 2 and 3 phy compliance patterns
v2: cosemtic changes
--- drivers/gpu/drm/drm_dp_helper.c | 2 +- include/drm/drm_dp_helper.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_dp_helper.c +1 -1
@@ -1583,7 +1583,7 @@ int drm_dp_get_phy_test_pattern(struct drm_dp_aux *aux,return err;break ; -case DP_PHY_TEST_PATTERN_CP2520 : +case DP_PHY_TEST_PATTERN_CP2520_PAT1 : err =drm_dp_dpcd_read (aux,DP_TEST_HBR2_SCRAMBLER_RESET , &data->hbr2_reset,sizeof (data->hbr2_reset));
include/drm/drm_dp_helper.h +3 -1
@@ -708,7 +708,9 @@# define DP_PHY_TEST_PATTERN_ERROR_COUNT 0x2# define DP_PHY_TEST_PATTERN_PRBS7 0x3# define DP_PHY_TEST_PATTERN_80BIT_CUSTOM 0x4 -# define DP_PHY_TEST_PATTERN_CP2520 0x5 +# define DP_PHY_TEST_PATTERN_CP2520_PAT1 0x5 +# define DP_PHY_TEST_PATTERN_CP2520_PAT2 0x6 +# define DP_PHY_TEST_PATTERN_CP2520_PAT3 0x7#define DP_TEST_HBR2_SCRAMBLER_RESET 0x24A#define DP_TEST_80BIT_CUSTOM_PATTERN_7_0 0x250
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/3 drm/i915/dp: TPS4 PHY test pattern compliance support
From: Khaled Almahallawy <[email protected]>
Adding support for TPS4 (CP2520 Pattern 3) PHY pattern source tests.
v2: uniform bit names TP4a/b/c (Manasi)
--- drivers/gpu/drm/i915/display/intel_dp.c | 14 ++++++++++++-- drivers/gpu/drm/i915/i915_reg.h | 4 ++++ 2 files changed, 16 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +12 -2
@@ -5403,7 +5403,7 @@ static void intel_dp_phy_pattern_update(struct intel_dp *intel_dp) &intel_dp->compliance.test_data.phytest;struct intel_crtc *crtc =to_intel_crtc (dig_port->base.base.crtc);enum pipe pipe = crtc->pipe; -u32 pattern_val; +u32 pattern_val, dp_tp_ctl;switch (data->phy_pattern) {case DP_PHY_TEST_PATTERN_NONE :
@@ -5443,7 +5443,7 @@ static void intel_dp_phy_pattern_update(struct intel_dp *intel_dp)DDI_DP_COMP_CTL_ENABLE | DDI_DP_COMP_CTL_CUSTOM80);break ; -case DP_PHY_TEST_PATTERN_CP2520 : +case DP_PHY_TEST_PATTERN_CP2520_PAT1 :/* * FIXME: Ideally pattern should come from DPCD 0x24A. As * current firmware of DPR-100 could not set it, so hardcoding
@@ -5455,6 +5455,16 @@ static void intel_dp_phy_pattern_update(struct intel_dp *intel_dp)DDI_DP_COMP_CTL_ENABLE |DDI_DP_COMP_CTL_HBR2 | pattern_val);break ; +case DP_PHY_TEST_PATTERN_CP2520_PAT3 : +DRM_DEBUG_KMS ("Set TPS4 Phy Test Pattern\n" ); +intel_de_write (dev_priv,DDI_DP_COMP_CTL (pipe),0x0 ); + dp_tp_ctl =intel_de_read (dev_priv,TGL_DP_TP_CTL (pipe)); + dp_tp_ctl &= ~DP_TP_CTL_TRAIN_PAT4_SEL_MASK ; + dp_tp_ctl |= DP_TP_CTL_TRAIN_PAT4_SEL_TP4a; + dp_tp_ctl &= ~DP_TP_CTL_LINK_TRAIN_MASK ; + dp_tp_ctl |=DP_TP_CTL_LINK_TRAIN_PAT4 ; +intel_de_write (dev_priv,TGL_DP_TP_CTL (pipe), dp_tp_ctl); +break ;default :WARN (1 ,"Invalid Phy Test Pattern\n" ); }
drivers/gpu/drm/i915/i915_reg.h +4 -0
@@ -9974,6 +9974,10 @@ enum skl_power_gate {#define DP_TP_CTL_MODE_SST (0 << 27)#define DP_TP_CTL_MODE_MST (1 << 27)#define DP_TP_CTL_FORCE_ACT (1 << 25) +#define DP_TP_CTL_TRAIN_PAT4_SEL_MASK (3 << 19) +#define DP_TP_CTL_TRAIN_PAT4_SEL_TP4a (0 << 19) +#define DP_TP_CTL_TRAIN_PAT4_SEL_TP4b (1 << 19) +#define DP_TP_CTL_TRAIN_PAT4_SEL_TP4c (2 << 19)#define DP_TP_CTL_ENHANCED_FRAME_ENABLE (1 << 18)#define DP_TP_CTL_FDI_AUTOTRAIN (1 << 15)#define DP_TP_CTL_LINK_TRAIN_MASK (7 << 8)
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
RFC PATCH 3/3 drm/i915/dp: DP PHY compliance for EHL/JSL
In reply to Vidya SrinivasPlease Note: Comment from Ville could not be addressed as his comments are with respect to base implementation (design) which are already merged. We need JSL changes for compliance. Hence pushing the required changes on top of existing design. Apoligies for that.
v2: Rebased patch on top of Khaled's (yet to be merged):
https://patchwork.freedesktop.org/series/79779/
Fixed phy patterns for JSL/EHL
Add TPS4 support for JSL/EHL
--- drivers/gpu/drm/i915/display/intel_dp.c | 81 +++++++++++++++++++++++++-------- drivers/gpu/drm/i915/i915_reg.h | 18 ++++++-- 2 files changed, 78 insertions(+), 21 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +63 -18
@@ -5405,25 +5405,32 @@ static void intel_dp_phy_pattern_update(struct intel_dp *intel_dp)enum pipe pipe = crtc->pipe;u32 pattern_val, dp_tp_ctl; +i915_reg_t dp_comp_reg; + +if (IS_ELKHARTLAKE (dev_priv)) + dp_comp_reg =EHL_DDI_DP_COMP_CTL (dig_port->base.port); +else if (IS_TIGERLAKE (dev_priv)) + dp_comp_reg =DDI_DP_COMP_CTL (pipe); +switch (data->phy_pattern) {case DP_PHY_TEST_PATTERN_NONE :DRM_DEBUG_KMS ("Disable Phy Test Pattern\n" ); -intel_de_write (dev_priv,DDI_DP_COMP_CTL (pipe),0x0 ); +intel_de_write (dev_priv, dp_comp_reg,0x0 );break ;case DP_PHY_TEST_PATTERN_D10_2 :DRM_DEBUG_KMS ("Set D10.2 Phy Test Pattern\n" ); -intel_de_write (dev_priv,DDI_DP_COMP_CTL (pipe), +intel_de_write (dev_priv, dp_comp_reg,DDI_DP_COMP_CTL_ENABLE |DDI_DP_COMP_CTL_D10_2 );break ;case DP_PHY_TEST_PATTERN_ERROR_COUNT :DRM_DEBUG_KMS ("Set Error Count Phy Test Pattern\n" ); -intel_de_write (dev_priv,DDI_DP_COMP_CTL (pipe), +intel_de_write (dev_priv, dp_comp_reg,DDI_DP_COMP_CTL_ENABLE |DDI_DP_COMP_CTL_SCRAMBLED_0 );break ;case DP_PHY_TEST_PATTERN_PRBS7 :DRM_DEBUG_KMS ("Set PRBS7 Phy Test Pattern\n" ); -intel_de_write (dev_priv,DDI_DP_COMP_CTL (pipe), +intel_de_write (dev_priv, dp_comp_reg,DDI_DP_COMP_CTL_ENABLE |DDI_DP_COMP_CTL_PRBS7 );break ;case DP_PHY_TEST_PATTERN_80BIT_CUSTOM :
@@ -5432,14 +5439,27 @@ static void intel_dp_phy_pattern_update(struct intel_dp *intel_dp)* current firmware of DPR-100 could not set it, so hardcoding * now for complaince test. */ -DRM_DEBUG_KMS ("Set 80Bit Custom Phy Test Pattern 0x3e0f83e0 0x0f83e0f8 0x0000f83e\n" ); +DRM_DEBUG_KMS ("Set 80Bit Custom Phy Test Pattern \ +0x3e0f83e0 0x0f83e0f8 0x0000f83e\n" ); pattern_val =0x3e0f83e0 ; -intel_de_write (dev_priv,DDI_DP_COMP_PAT (pipe,0 ), pattern_val); +if (IS_ELKHARTLAKE (dev_priv)) +intel_de_write (dev_priv,EHL_DDI_DP_COMP_PAT (dig_port->base.port,0 ), + pattern_val); +else +intel_de_write (dev_priv,DDI_DP_COMP_PAT (pipe,0 ), pattern_val); pattern_val =0x0f83e0f8 ; -intel_de_write (dev_priv,DDI_DP_COMP_PAT (pipe,1 ), pattern_val); +if (IS_ELKHARTLAKE (dev_priv)) +intel_de_write (dev_priv,EHL_DDI_DP_COMP_PAT (dig_port->base.port,1 ), + pattern_val); +else +intel_de_write (dev_priv,DDI_DP_COMP_PAT (pipe,1 ), pattern_val); pattern_val =0x0000f83e ; -intel_de_write (dev_priv,DDI_DP_COMP_PAT (pipe,2 ), pattern_val); -intel_de_write (dev_priv,DDI_DP_COMP_CTL (pipe), +if (IS_ELKHARTLAKE (dev_priv)) +intel_de_write (dev_priv,EHL_DDI_DP_COMP_PAT (dig_port->base.port,2 ), + pattern_val); +else +intel_de_write (dev_priv,DDI_DP_COMP_PAT (pipe,2 ), pattern_val); +intel_de_write (dev_priv, dp_comp_reg,DDI_DP_COMP_CTL_ENABLE |DDI_DP_COMP_CTL_CUSTOM80 );break ;
@@ -5451,7 +5471,7 @@ static void intel_dp_phy_pattern_update(struct intel_dp *intel_dp)*/ DRM_DEBUG_KMS ("Set HBR2 compliance Phy Test Pattern\n" ); pattern_val =0xFB ; -intel_de_write (dev_priv,DDI_DP_COMP_CTL (pipe), +intel_de_write (dev_priv, dp_comp_reg,DDI_DP_COMP_CTL_ENABLE |DDI_DP_COMP_CTL_HBR2 | pattern_val);break ;
@@ -5478,22 +5498,32 @@ intel_dp_autotest_phy_ddi_disable(struct intel_dp *intel_dp)struct drm_i915_private *dev_priv =to_i915 (dev);struct intel_crtc *crtc =to_intel_crtc (dig_port->base.base.crtc);enum pipe pipe = crtc->pipe; -u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value; +u32 trans_ddi_func_ctl_value, trans_conf_value, + dp_tp_ctl_value, trans_ddi_port_mask; +i915_reg_t dp_tp_reg; + +if (IS_ELKHARTLAKE (dev_priv)) { + dp_tp_reg =DP_TP_CTL (dig_port->base.port); + trans_ddi_port_mask =TRANS_DDI_PORT_MASK ; + }else if (IS_TIGERLAKE (dev_priv)) { + dp_tp_reg =TGL_DP_TP_CTL (pipe); + trans_ddi_port_mask =TGL_TRANS_DDI_PORT_MASK ; + } trans_ddi_func_ctl_value =intel_de_read (dev_priv,TRANS_DDI_FUNC_CTL (pipe)); trans_conf_value =intel_de_read (dev_priv,PIPECONF (pipe)); - dp_tp_ctl_value =intel_de_read (dev_priv,TGL_DP_TP_CTL (pipe)); + dp_tp_ctl_value =intel_de_read (dev_priv, dp_tp_reg); trans_ddi_func_ctl_value &= ~(TRANS_DDI_FUNC_ENABLE | -TGL_TRANS_DDI_PORT_MASK ); + trans_ddi_port_mask); trans_conf_value &= ~PIPECONF_ENABLE ; dp_tp_ctl_value &= ~DP_TP_CTL_ENABLE ;intel_de_write (dev_priv,PIPECONF (pipe), trans_conf_value);intel_de_write (dev_priv,TRANS_DDI_FUNC_CTL (pipe), trans_ddi_func_ctl_value); -intel_de_write (dev_priv,TGL_DP_TP_CTL (pipe), dp_tp_ctl_value); +intel_de_write (dev_priv, dp_tp_reg, dp_tp_ctl_value); } static void
@@ -5505,20 +5535,29 @@ intel_dp_autotest_phy_ddi_enable(struct intel_dp *intel_dp, uint8_t lane_cnt)enum port port = dig_port->base.port;struct intel_crtc *crtc =to_intel_crtc (dig_port->base.base.crtc);enum pipe pipe = crtc->pipe; -u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value; +u32 trans_ddi_func_ctl_value, trans_conf_value, + dp_tp_ctl_value, trans_ddi_sel_port; +i915_reg_t dp_tp_reg; + +if (IS_ELKHARTLAKE (dev_priv)) { + dp_tp_reg =DP_TP_CTL (port); + trans_ddi_sel_port =TRANS_DDI_SELECT_PORT (port); + }else if (IS_TIGERLAKE (dev_priv)) { + dp_tp_reg =TGL_DP_TP_CTL (pipe); + trans_ddi_sel_port =TGL_TRANS_DDI_SELECT_PORT (port); + } trans_ddi_func_ctl_value =intel_de_read (dev_priv,TRANS_DDI_FUNC_CTL (pipe)); trans_conf_value =intel_de_read (dev_priv,PIPECONF (pipe)); dp_tp_ctl_value =intel_de_read (dev_priv,TGL_DP_TP_CTL (pipe)); - trans_ddi_func_ctl_value |=TRANS_DDI_FUNC_ENABLE | -TGL_TRANS_DDI_SELECT_PORT (port); + trans_ddi_sel_port; trans_conf_value |=PIPECONF_ENABLE ; dp_tp_ctl_value |=DP_TP_CTL_ENABLE ;intel_de_write (dev_priv,PIPECONF (pipe), trans_conf_value); -intel_de_write (dev_priv,TGL_DP_TP_CTL (pipe), dp_tp_ctl_value); +intel_de_write (dev_priv, dp_tp_reg, dp_tp_ctl_value);intel_de_write (dev_priv,TRANS_DDI_FUNC_CTL (pipe), trans_ddi_func_ctl_value); }
@@ -5565,6 +5604,7 @@ static u8 intel_dp_autotest_phy_pattern(struct intel_dp *intel_dp)static void intel_dp_handle_test_request (struct intel_dp *intel_dp) {struct drm_i915_private *i915 =dp_to_i915 (intel_dp); +struct drm_i915_private *dev_priv = i915;u8 response =DP_TEST_NAK ;u8 request =0 ;int status;
@@ -5590,6 +5630,11 @@ static void intel_dp_handle_test_request(struct intel_dp *intel_dp) response =intel_dp_autotest_edid (intel_dp);break ;case DP_TEST_LINK_PHY_TEST_PATTERN : +if (!IS_ELKHARTLAKE (dev_priv) && !IS_TIGERLAKE (dev_priv)) { +drm_dbg_kms (&i915->drm, +"PHY compliance for platform not supported\n" ); +return ; + }drm_dbg_kms (&i915->drm,"PHY_PATTERN test requested\n" ); response =intel_dp_autotest_phy_pattern (intel_dp);break ;
drivers/gpu/drm/i915/i915_reg.h +15 -3
@@ -10026,10 +10026,16 @@ enum skl_power_gate {#define DDI_BUF_BALANCE_LEG_ENABLE (1 << 31)#define DDI_BUF_TRANS_HI (port, i) _MMIO(_PORT(port, _DDI_BUF_TRANS_A, _DDI_BUF_TRANS_B) + (i) * 8 + 4) +/* EHL/JSL DP compliance control */ +#define _EHL_DDI_DP_COMP_CTL_A 0x640F0 +#define _EHL_DDI_DP_COMP_CTL_B 0x641F0 +#define EHL_DDI_DP_COMP_CTL (port) \ + _MMIO_PORT(port, _EHL_DDI_DP_COMP_CTL_A, _EHL_DDI_DP_COMP_CTL_B) +/* DDI DP Compliance Control */ -#define _DDI_DP_COMP_CTL_A 0x605F0 -#define _DDI_DP_COMP_CTL_B 0x615F0 -#define DDI_DP_COMP_CTL (pipe) _MMIO_PIPE(pipe, _DDI_DP_COMP_CTL_A, _DDI_DP_COMP_CTL_B) +#define _DDI_DP_COMP_CTL_A 0x605F0 +#define _DDI_DP_COMP_CTL_B 0x615F0 +#define DDI_DP_COMP_CTL (pipe) _MMIO_PIPE(pipe, _DDI_DP_COMP_CTL_A, _DDI_DP_COMP_CTL_B)#define DDI_DP_COMP_CTL_ENABLE (1 << 31)#define DDI_DP_COMP_CTL_D10_2 (0 << 28)#define DDI_DP_COMP_CTL_SCRAMBLED_0 (1 << 28)
@@ -10039,6 +10045,12 @@ enum skl_power_gate {#define DDI_DP_COMP_CTL_SCRAMBLED_1 (5 << 28)#define DDI_DP_COMP_CTL_HBR2_RESET (0xFC << 0) +/* EHL */ +#define _EHL_DDI_DP_COMP_PAT_A 0x640F4 +#define _EHL_DDI_DP_COMP_PAT_B 0x641F4 +#define EHL_DDI_DP_COMP_PAT (port, i) \ + _MMIO(_PORT(port, _EHL_DDI_DP_COMP_PAT_A, _EHL_DDI_DP_COMP_PAT_B) + (i) * 4) +/* DDI DP Compliance Pattern */ #define _DDI_DP_COMP_PAT_A 0x605F4#define _DDI_DP_COMP_PAT_B 0x615F4
Signature · 6 lines
2.7.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
RFC PATCH 1/1 drm/i915/dp: DP PHY compliance for EHL/JSL
In reply to Vidya SrinivasPlease Note: Comment from Ville could not be addressed as his comments are with respect to base implementation (design) which are already merged. We need JSL changes for compliance. Hence pushing the required changes on top of existing design. Apoligies for that.
v2: Rebased patch on top of Khaled's (yet to be merged):
https://patchwork.freedesktop.org/series/79779/
Fixed phy patterns for JSL/EHL
Add TPS4 support for JSL/EHL
--- drivers/gpu/drm/i915/display/intel_dp.c | 81 +++++++++++++++++++++++++-------- drivers/gpu/drm/i915/i915_reg.h | 18 ++++++-- 2 files changed, 78 insertions(+), 21 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +63 -18
@@ -5405,25 +5405,32 @@ static void intel_dp_phy_pattern_update(struct intel_dp *intel_dp)enum pipe pipe = crtc->pipe;u32 pattern_val, dp_tp_ctl; +i915_reg_t dp_comp_reg; + +if (IS_ELKHARTLAKE (dev_priv)) + dp_comp_reg =EHL_DDI_DP_COMP_CTL (dig_port->base.port); +else if (IS_TIGERLAKE (dev_priv)) + dp_comp_reg =DDI_DP_COMP_CTL (pipe); +switch (data->phy_pattern) {case DP_PHY_TEST_PATTERN_NONE :DRM_DEBUG_KMS ("Disable Phy Test Pattern\n" ); -intel_de_write (dev_priv,DDI_DP_COMP_CTL (pipe),0x0 ); +intel_de_write (dev_priv, dp_comp_reg,0x0 );break ;case DP_PHY_TEST_PATTERN_D10_2 :DRM_DEBUG_KMS ("Set D10.2 Phy Test Pattern\n" ); -intel_de_write (dev_priv,DDI_DP_COMP_CTL (pipe), +intel_de_write (dev_priv, dp_comp_reg,DDI_DP_COMP_CTL_ENABLE |DDI_DP_COMP_CTL_D10_2 );break ;case DP_PHY_TEST_PATTERN_ERROR_COUNT :DRM_DEBUG_KMS ("Set Error Count Phy Test Pattern\n" ); -intel_de_write (dev_priv,DDI_DP_COMP_CTL (pipe), +intel_de_write (dev_priv, dp_comp_reg,DDI_DP_COMP_CTL_ENABLE |DDI_DP_COMP_CTL_SCRAMBLED_0 );break ;case DP_PHY_TEST_PATTERN_PRBS7 :DRM_DEBUG_KMS ("Set PRBS7 Phy Test Pattern\n" ); -intel_de_write (dev_priv,DDI_DP_COMP_CTL (pipe), +intel_de_write (dev_priv, dp_comp_reg,DDI_DP_COMP_CTL_ENABLE |DDI_DP_COMP_CTL_PRBS7 );break ;case DP_PHY_TEST_PATTERN_80BIT_CUSTOM :
@@ -5432,14 +5439,27 @@ static void intel_dp_phy_pattern_update(struct intel_dp *intel_dp)* current firmware of DPR-100 could not set it, so hardcoding * now for complaince test. */ -DRM_DEBUG_KMS ("Set 80Bit Custom Phy Test Pattern 0x3e0f83e0 0x0f83e0f8 0x0000f83e\n" ); +DRM_DEBUG_KMS ("Set 80Bit Custom Phy Test Pattern \ +0x3e0f83e0 0x0f83e0f8 0x0000f83e\n" ); pattern_val =0x3e0f83e0 ; -intel_de_write (dev_priv,DDI_DP_COMP_PAT (pipe,0 ), pattern_val); +if (IS_ELKHARTLAKE (dev_priv)) +intel_de_write (dev_priv,EHL_DDI_DP_COMP_PAT (dig_port->base.port,0 ), + pattern_val); +else +intel_de_write (dev_priv,DDI_DP_COMP_PAT (pipe,0 ), pattern_val); pattern_val =0x0f83e0f8 ; -intel_de_write (dev_priv,DDI_DP_COMP_PAT (pipe,1 ), pattern_val); +if (IS_ELKHARTLAKE (dev_priv)) +intel_de_write (dev_priv,EHL_DDI_DP_COMP_PAT (dig_port->base.port,1 ), + pattern_val); +else +intel_de_write (dev_priv,DDI_DP_COMP_PAT (pipe,1 ), pattern_val); pattern_val =0x0000f83e ; -intel_de_write (dev_priv,DDI_DP_COMP_PAT (pipe,2 ), pattern_val); -intel_de_write (dev_priv,DDI_DP_COMP_CTL (pipe), +if (IS_ELKHARTLAKE (dev_priv)) +intel_de_write (dev_priv,EHL_DDI_DP_COMP_PAT (dig_port->base.port,2 ), + pattern_val); +else +intel_de_write (dev_priv,DDI_DP_COMP_PAT (pipe,2 ), pattern_val); +intel_de_write (dev_priv, dp_comp_reg,DDI_DP_COMP_CTL_ENABLE |DDI_DP_COMP_CTL_CUSTOM80 );break ;
@@ -5451,7 +5471,7 @@ static void intel_dp_phy_pattern_update(struct intel_dp *intel_dp)*/ DRM_DEBUG_KMS ("Set HBR2 compliance Phy Test Pattern\n" ); pattern_val =0xFB ; -intel_de_write (dev_priv,DDI_DP_COMP_CTL (pipe), +intel_de_write (dev_priv, dp_comp_reg,DDI_DP_COMP_CTL_ENABLE |DDI_DP_COMP_CTL_HBR2 | pattern_val);break ;
@@ -5478,22 +5498,32 @@ intel_dp_autotest_phy_ddi_disable(struct intel_dp *intel_dp)struct drm_i915_private *dev_priv =to_i915 (dev);struct intel_crtc *crtc =to_intel_crtc (dig_port->base.base.crtc);enum pipe pipe = crtc->pipe; -u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value; +u32 trans_ddi_func_ctl_value, trans_conf_value, + dp_tp_ctl_value, trans_ddi_port_mask; +i915_reg_t dp_tp_reg; + +if (IS_ELKHARTLAKE (dev_priv)) { + dp_tp_reg =DP_TP_CTL (dig_port->base.port); + trans_ddi_port_mask =TRANS_DDI_PORT_MASK ; + }else if (IS_TIGERLAKE (dev_priv)) { + dp_tp_reg =TGL_DP_TP_CTL (pipe); + trans_ddi_port_mask =TGL_TRANS_DDI_PORT_MASK ; + } trans_ddi_func_ctl_value =intel_de_read (dev_priv,TRANS_DDI_FUNC_CTL (pipe)); trans_conf_value =intel_de_read (dev_priv,PIPECONF (pipe)); - dp_tp_ctl_value =intel_de_read (dev_priv,TGL_DP_TP_CTL (pipe)); + dp_tp_ctl_value =intel_de_read (dev_priv, dp_tp_reg); trans_ddi_func_ctl_value &= ~(TRANS_DDI_FUNC_ENABLE | -TGL_TRANS_DDI_PORT_MASK ); + trans_ddi_port_mask); trans_conf_value &= ~PIPECONF_ENABLE ; dp_tp_ctl_value &= ~DP_TP_CTL_ENABLE ;intel_de_write (dev_priv,PIPECONF (pipe), trans_conf_value);intel_de_write (dev_priv,TRANS_DDI_FUNC_CTL (pipe), trans_ddi_func_ctl_value); -intel_de_write (dev_priv,TGL_DP_TP_CTL (pipe), dp_tp_ctl_value); +intel_de_write (dev_priv, dp_tp_reg, dp_tp_ctl_value); } static void
@@ -5505,20 +5535,29 @@ intel_dp_autotest_phy_ddi_enable(struct intel_dp *intel_dp, uint8_t lane_cnt)enum port port = dig_port->base.port;struct intel_crtc *crtc =to_intel_crtc (dig_port->base.base.crtc);enum pipe pipe = crtc->pipe; -u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value; +u32 trans_ddi_func_ctl_value, trans_conf_value, + dp_tp_ctl_value, trans_ddi_sel_port; +i915_reg_t dp_tp_reg; + +if (IS_ELKHARTLAKE (dev_priv)) { + dp_tp_reg =DP_TP_CTL (port); + trans_ddi_sel_port =TRANS_DDI_SELECT_PORT (port); + }else if (IS_TIGERLAKE (dev_priv)) { + dp_tp_reg =TGL_DP_TP_CTL (pipe); + trans_ddi_sel_port =TGL_TRANS_DDI_SELECT_PORT (port); + } trans_ddi_func_ctl_value =intel_de_read (dev_priv,TRANS_DDI_FUNC_CTL (pipe)); trans_conf_value =intel_de_read (dev_priv,PIPECONF (pipe)); dp_tp_ctl_value =intel_de_read (dev_priv,TGL_DP_TP_CTL (pipe)); - trans_ddi_func_ctl_value |=TRANS_DDI_FUNC_ENABLE | -TGL_TRANS_DDI_SELECT_PORT (port); + trans_ddi_sel_port; trans_conf_value |=PIPECONF_ENABLE ; dp_tp_ctl_value |=DP_TP_CTL_ENABLE ;intel_de_write (dev_priv,PIPECONF (pipe), trans_conf_value); -intel_de_write (dev_priv,TGL_DP_TP_CTL (pipe), dp_tp_ctl_value); +intel_de_write (dev_priv, dp_tp_reg, dp_tp_ctl_value);intel_de_write (dev_priv,TRANS_DDI_FUNC_CTL (pipe), trans_ddi_func_ctl_value); }
@@ -5565,6 +5604,7 @@ static u8 intel_dp_autotest_phy_pattern(struct intel_dp *intel_dp)static void intel_dp_handle_test_request (struct intel_dp *intel_dp) {struct drm_i915_private *i915 =dp_to_i915 (intel_dp); +struct drm_i915_private *dev_priv = i915;u8 response =DP_TEST_NAK ;u8 request =0 ;int status;
@@ -5590,6 +5630,11 @@ static void intel_dp_handle_test_request(struct intel_dp *intel_dp) response =intel_dp_autotest_edid (intel_dp);break ;case DP_TEST_LINK_PHY_TEST_PATTERN : +if (!IS_ELKHARTLAKE (dev_priv) && !IS_TIGERLAKE (dev_priv)) { +drm_dbg_kms (&i915->drm, +"PHY compliance for platform not supported\n" ); +return ; + }drm_dbg_kms (&i915->drm,"PHY_PATTERN test requested\n" ); response =intel_dp_autotest_phy_pattern (intel_dp);break ;
drivers/gpu/drm/i915/i915_reg.h +15 -3
@@ -10026,10 +10026,16 @@ enum skl_power_gate {#define DDI_BUF_BALANCE_LEG_ENABLE (1 << 31)#define DDI_BUF_TRANS_HI (port, i) _MMIO(_PORT(port, _DDI_BUF_TRANS_A, _DDI_BUF_TRANS_B) + (i) * 8 + 4) +/* EHL/JSL DP compliance control */ +#define _EHL_DDI_DP_COMP_CTL_A 0x640F0 +#define _EHL_DDI_DP_COMP_CTL_B 0x641F0 +#define EHL_DDI_DP_COMP_CTL (port) \ + _MMIO_PORT(port, _EHL_DDI_DP_COMP_CTL_A, _EHL_DDI_DP_COMP_CTL_B) +/* DDI DP Compliance Control */ -#define _DDI_DP_COMP_CTL_A 0x605F0 -#define _DDI_DP_COMP_CTL_B 0x615F0 -#define DDI_DP_COMP_CTL (pipe) _MMIO_PIPE(pipe, _DDI_DP_COMP_CTL_A, _DDI_DP_COMP_CTL_B) +#define _DDI_DP_COMP_CTL_A 0x605F0 +#define _DDI_DP_COMP_CTL_B 0x615F0 +#define DDI_DP_COMP_CTL (pipe) _MMIO_PIPE(pipe, _DDI_DP_COMP_CTL_A, _DDI_DP_COMP_CTL_B)#define DDI_DP_COMP_CTL_ENABLE (1 << 31)#define DDI_DP_COMP_CTL_D10_2 (0 << 28)#define DDI_DP_COMP_CTL_SCRAMBLED_0 (1 << 28)
@@ -10039,6 +10045,12 @@ enum skl_power_gate {#define DDI_DP_COMP_CTL_SCRAMBLED_1 (5 << 28)#define DDI_DP_COMP_CTL_HBR2_RESET (0xFC << 0) +/* EHL */ +#define _EHL_DDI_DP_COMP_PAT_A 0x640F4 +#define _EHL_DDI_DP_COMP_PAT_B 0x641F4 +#define EHL_DDI_DP_COMP_PAT (port, i) \ + _MMIO(_PORT(port, _EHL_DDI_DP_COMP_PAT_A, _EHL_DDI_DP_COMP_PAT_B) + (i) * 4) +/* DDI DP Compliance Pattern */ #define _DDI_DP_COMP_PAT_A 0x605F4#define _DDI_DP_COMP_PAT_B 0x615F4
Signature · 6 lines
2.7.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
RFC PATCH 1/1 drm/i915/dp: DP PHY compliance for EHL/JSL
Please Note: Comment from Ville could not be addressed as his comments are with respect to base implementation (design) which are already merged. We need JSL changes for compliance. Hence pushing the required changes on top of existing design. Apoligies for that.
v2: Rebased patch on top of Khaled's (yet to be merged):
https://patchwork.freedesktop.org/series/79779/
Fixed phy patterns for JSL/EHL
Add TPS4 support for JSL/EHL
--- drivers/gpu/drm/i915/display/intel_dp.c | 106 +++++++++++++++++++++++--------- drivers/gpu/drm/i915/i915_reg.h | 18 +++++- 2 files changed, 92 insertions(+), 32 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +77 -29
@@ -5404,26 +5404,37 @@ static void intel_dp_phy_pattern_update(struct intel_dp *intel_dp)struct intel_crtc *crtc =to_intel_crtc (dig_port->base.base.crtc);enum pipe pipe = crtc->pipe;u32 pattern_val, dp_tp_ctl; +i915_reg_t dp_tp_reg, dp_comp_reg; + +if (IS_ELKHARTLAKE (dev_priv)) + dp_tp_reg =DP_TP_CTL (dig_port->base.port); +else if (IS_TIGERLAKE (dev_priv)) + dp_tp_reg =TGL_DP_TP_CTL (pipe); + +if (IS_ELKHARTLAKE (dev_priv)) + dp_comp_reg =EHL_DDI_DP_COMP_CTL (dig_port->base.port); +else if (IS_TIGERLAKE (dev_priv)) + dp_comp_reg =DDI_DP_COMP_CTL (pipe);switch (data->phy_pattern) {case DP_PHY_TEST_PATTERN_NONE :DRM_DEBUG_KMS ("Disable Phy Test Pattern\n" ); -intel_de_write (dev_priv,DDI_DP_COMP_CTL (pipe),0x0 ); +intel_de_write (dev_priv, dp_comp_reg,0x0 );break ;case DP_PHY_TEST_PATTERN_D10_2 :DRM_DEBUG_KMS ("Set D10.2 Phy Test Pattern\n" ); -intel_de_write (dev_priv,DDI_DP_COMP_CTL (pipe), +intel_de_write (dev_priv, dp_comp_reg,DDI_DP_COMP_CTL_ENABLE |DDI_DP_COMP_CTL_D10_2 );break ;case DP_PHY_TEST_PATTERN_ERROR_COUNT :DRM_DEBUG_KMS ("Set Error Count Phy Test Pattern\n" ); -intel_de_write (dev_priv,DDI_DP_COMP_CTL (pipe), +intel_de_write (dev_priv, dp_comp_reg,DDI_DP_COMP_CTL_ENABLE |DDI_DP_COMP_CTL_SCRAMBLED_0 );break ;case DP_PHY_TEST_PATTERN_PRBS7 :DRM_DEBUG_KMS ("Set PRBS7 Phy Test Pattern\n" ); -intel_de_write (dev_priv,DDI_DP_COMP_CTL (pipe), +intel_de_write (dev_priv, dp_comp_reg,DDI_DP_COMP_CTL_ENABLE |DDI_DP_COMP_CTL_PRBS7 );break ;case DP_PHY_TEST_PATTERN_80BIT_CUSTOM :
@@ -5432,14 +5443,27 @@ static void intel_dp_phy_pattern_update(struct intel_dp *intel_dp)* current firmware of DPR-100 could not set it, so hardcoding * now for complaince test. */ -DRM_DEBUG_KMS ("Set 80Bit Custom Phy Test Pattern 0x3e0f83e0 0x0f83e0f8 0x0000f83e\n" ); +DRM_DEBUG_KMS ("Set 80Bit Custom Phy Test Pattern \ +0x3e0f83e0 0x0f83e0f8 0x0000f83e\n" ); pattern_val =0x3e0f83e0 ; -intel_de_write (dev_priv,DDI_DP_COMP_PAT (pipe,0 ), pattern_val); +if (IS_ELKHARTLAKE (dev_priv)) +intel_de_write (dev_priv,EHL_DDI_DP_COMP_PAT (dig_port->base.port,0 ), + pattern_val); +else +intel_de_write (dev_priv,DDI_DP_COMP_PAT (pipe,0 ), pattern_val); pattern_val =0x0f83e0f8 ; -intel_de_write (dev_priv,DDI_DP_COMP_PAT (pipe,1 ), pattern_val); +if (IS_ELKHARTLAKE (dev_priv)) +intel_de_write (dev_priv,EHL_DDI_DP_COMP_PAT (dig_port->base.port,1 ), + pattern_val); +else +intel_de_write (dev_priv,DDI_DP_COMP_PAT (pipe,1 ), pattern_val); pattern_val =0x0000f83e ; -intel_de_write (dev_priv,DDI_DP_COMP_PAT (pipe,2 ), pattern_val); -intel_de_write (dev_priv,DDI_DP_COMP_CTL (pipe), +if (IS_ELKHARTLAKE (dev_priv)) +intel_de_write (dev_priv,EHL_DDI_DP_COMP_PAT (dig_port->base.port,2 ), + pattern_val); +else +intel_de_write (dev_priv,DDI_DP_COMP_PAT (pipe,2 ), pattern_val); +intel_de_write (dev_priv, dp_comp_reg,DDI_DP_COMP_CTL_ENABLE |DDI_DP_COMP_CTL_CUSTOM80 );break ;
@@ -5451,20 +5475,20 @@ static void intel_dp_phy_pattern_update(struct intel_dp *intel_dp)*/ DRM_DEBUG_KMS ("Set HBR2 compliance Phy Test Pattern\n" ); pattern_val =0xFB ; -intel_de_write (dev_priv,DDI_DP_COMP_CTL (pipe), +intel_de_write (dev_priv, dp_comp_reg,DDI_DP_COMP_CTL_ENABLE |DDI_DP_COMP_CTL_HBR2 | pattern_val);break ; -case DP_PHY_TEST_PATTERN_CP2520_PAT3 : -DRM_DEBUG_KMS ("Set TPS4 Phy Test Pattern\n" ); -intel_de_write (dev_priv,DDI_DP_COMP_CTL (pipe),0x0 ); - dp_tp_ctl =intel_de_read (dev_priv,TGL_DP_TP_CTL (pipe)); - dp_tp_ctl &= ~DP_TP_CTL_TRAIN_PAT4_SEL_MASK ; - dp_tp_ctl |= DP_TP_CTL_TRAIN_PAT4_SEL_TP4a; - dp_tp_ctl &= ~DP_TP_CTL_LINK_TRAIN_MASK ; - dp_tp_ctl |=DP_TP_CTL_LINK_TRAIN_PAT4 ; -intel_de_write (dev_priv,TGL_DP_TP_CTL (pipe), dp_tp_ctl); -break ; +case DP_PHY_TEST_PATTERN_CP2520_PAT3 : +DRM_DEBUG_KMS ("Set TPS4 Phy Test Pattern\n" ); +intel_de_write (dev_priv, dp_comp_reg,0x0 ); + dp_tp_ctl =intel_de_read (dev_priv, dp_tp_reg); + dp_tp_ctl &= ~DP_TP_CTL_TRAIN_PAT4_SEL_MASK ; + dp_tp_ctl |= DP_TP_CTL_TRAIN_PAT4_SEL_TP4a; + dp_tp_ctl &= ~DP_TP_CTL_LINK_TRAIN_MASK ; + dp_tp_ctl |=DP_TP_CTL_LINK_TRAIN_PAT4 ; +intel_de_write (dev_priv, dp_tp_reg, dp_tp_ctl); +break ;default :WARN (1 ,"Invalid Phy Test Pattern\n" ); }
@@ -5478,22 +5502,32 @@ intel_dp_autotest_phy_ddi_disable(struct intel_dp *intel_dp)struct drm_i915_private *dev_priv =to_i915 (dev);struct intel_crtc *crtc =to_intel_crtc (dig_port->base.base.crtc);enum pipe pipe = crtc->pipe; -u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value; +u32 trans_ddi_func_ctl_value, trans_conf_value, + dp_tp_ctl_value, trans_ddi_port_mask; +i915_reg_t dp_tp_reg; + +if (IS_ELKHARTLAKE (dev_priv)) { + dp_tp_reg =DP_TP_CTL (dig_port->base.port); + trans_ddi_port_mask =TRANS_DDI_PORT_MASK ; + }else if (IS_TIGERLAKE (dev_priv)) { + dp_tp_reg =TGL_DP_TP_CTL (pipe); + trans_ddi_port_mask =TGL_TRANS_DDI_PORT_MASK ; + } trans_ddi_func_ctl_value =intel_de_read (dev_priv,TRANS_DDI_FUNC_CTL (pipe)); trans_conf_value =intel_de_read (dev_priv,PIPECONF (pipe)); - dp_tp_ctl_value =intel_de_read (dev_priv,TGL_DP_TP_CTL (pipe)); + dp_tp_ctl_value =intel_de_read (dev_priv, dp_tp_reg); trans_ddi_func_ctl_value &= ~(TRANS_DDI_FUNC_ENABLE | -TGL_TRANS_DDI_PORT_MASK ); + trans_ddi_port_mask); trans_conf_value &= ~PIPECONF_ENABLE ; dp_tp_ctl_value &= ~DP_TP_CTL_ENABLE ;intel_de_write (dev_priv,PIPECONF (pipe), trans_conf_value);intel_de_write (dev_priv,TRANS_DDI_FUNC_CTL (pipe), trans_ddi_func_ctl_value); -intel_de_write (dev_priv,TGL_DP_TP_CTL (pipe), dp_tp_ctl_value); +intel_de_write (dev_priv, dp_tp_reg, dp_tp_ctl_value); } static void
@@ -5505,20 +5539,29 @@ intel_dp_autotest_phy_ddi_enable(struct intel_dp *intel_dp, uint8_t lane_cnt)enum port port = dig_port->base.port;struct intel_crtc *crtc =to_intel_crtc (dig_port->base.base.crtc);enum pipe pipe = crtc->pipe; -u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value; +u32 trans_ddi_func_ctl_value, trans_conf_value, + dp_tp_ctl_value, trans_ddi_sel_port; +i915_reg_t dp_tp_reg; + +if (IS_ELKHARTLAKE (dev_priv)) { + dp_tp_reg =DP_TP_CTL (port); + trans_ddi_sel_port =TRANS_DDI_SELECT_PORT (port); + }else if (IS_TIGERLAKE (dev_priv)) { + dp_tp_reg =TGL_DP_TP_CTL (pipe); + trans_ddi_sel_port =TGL_TRANS_DDI_SELECT_PORT (port); + } trans_ddi_func_ctl_value =intel_de_read (dev_priv,TRANS_DDI_FUNC_CTL (pipe)); trans_conf_value =intel_de_read (dev_priv,PIPECONF (pipe)); - dp_tp_ctl_value =intel_de_read (dev_priv,TGL_DP_TP_CTL (pipe)); - + dp_tp_ctl_value =intel_de_read (dev_priv, dp_tp_reg); trans_ddi_func_ctl_value |=TRANS_DDI_FUNC_ENABLE | -TGL_TRANS_DDI_SELECT_PORT (port); + trans_ddi_sel_port; trans_conf_value |=PIPECONF_ENABLE ; dp_tp_ctl_value |=DP_TP_CTL_ENABLE ;intel_de_write (dev_priv,PIPECONF (pipe), trans_conf_value); -intel_de_write (dev_priv,TGL_DP_TP_CTL (pipe), dp_tp_ctl_value); +intel_de_write (dev_priv, dp_tp_reg, dp_tp_ctl_value);intel_de_write (dev_priv,TRANS_DDI_FUNC_CTL (pipe), trans_ddi_func_ctl_value); }
@@ -5590,6 +5633,11 @@ static void intel_dp_handle_test_request(struct intel_dp *intel_dp) response =intel_dp_autotest_edid (intel_dp);break ;case DP_TEST_LINK_PHY_TEST_PATTERN : +if (!IS_ELKHARTLAKE (dev_priv) && !IS_TIGERLAKE (dev_priv)) { +DRM_DEBUG_KMS ( \ +"PHY compliance for platform not supported\n" ); +return ; + }drm_dbg_kms (&i915->drm,"PHY_PATTERN test requested\n" ); response =intel_dp_autotest_phy_pattern (intel_dp);break ;
drivers/gpu/drm/i915/i915_reg.h +15 -3
@@ -10026,10 +10026,16 @@ enum skl_power_gate {#define DDI_BUF_BALANCE_LEG_ENABLE (1 << 31)#define DDI_BUF_TRANS_HI (port, i) _MMIO(_PORT(port, _DDI_BUF_TRANS_A, _DDI_BUF_TRANS_B) + (i) * 8 + 4) +/* EHL/JSL DP compliance control */ +#define _EHL_DDI_DP_COMP_CTL_A 0x640F0 +#define _EHL_DDI_DP_COMP_CTL_B 0x641F0 +#define EHL_DDI_DP_COMP_CTL (port) \ + _MMIO_PORT(port, _EHL_DDI_DP_COMP_CTL_A, _EHL_DDI_DP_COMP_CTL_B) +/* DDI DP Compliance Control */ -#define _DDI_DP_COMP_CTL_A 0x605F0 -#define _DDI_DP_COMP_CTL_B 0x615F0 -#define DDI_DP_COMP_CTL (pipe) _MMIO_PIPE(pipe, _DDI_DP_COMP_CTL_A, _DDI_DP_COMP_CTL_B) +#define _DDI_DP_COMP_CTL_A 0x605F0 +#define _DDI_DP_COMP_CTL_B 0x615F0 +#define DDI_DP_COMP_CTL (pipe) _MMIO_PIPE(pipe, _DDI_DP_COMP_CTL_A, _DDI_DP_COMP_CTL_B)#define DDI_DP_COMP_CTL_ENABLE (1 << 31)#define DDI_DP_COMP_CTL_D10_2 (0 << 28)#define DDI_DP_COMP_CTL_SCRAMBLED_0 (1 << 28)
@@ -10039,6 +10045,12 @@ enum skl_power_gate {#define DDI_DP_COMP_CTL_SCRAMBLED_1 (5 << 28)#define DDI_DP_COMP_CTL_HBR2_RESET (0xFC << 0) +/* EHL */ +#define _EHL_DDI_DP_COMP_PAT_A 0x640F4 +#define _EHL_DDI_DP_COMP_PAT_B 0x641F4 +#define EHL_DDI_DP_COMP_PAT (port, i) \ + _MMIO(_PORT(port, _EHL_DDI_DP_COMP_PAT_A, _EHL_DDI_DP_COMP_PAT_B) + (i) * 4) +/* DDI DP Compliance Pattern */ #define _DDI_DP_COMP_PAT_A 0x605F4#define _DDI_DP_COMP_PAT_B 0x615F4
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915/dp: DP PHY compliance for JSL (rev11)
In reply to Vidya Srinivas== Series Details ==
== Series Details ==
Series: drm/i915/dp: DP PHY compliance for JSL (rev11)
URL : https://patchwork.freedesktop.org/series/77977/
State : failure
== Summary ==
Applying: drm/i915/dp: DP PHY compliance for EHL/JSL
error: sha1 information is lacking or useless (drivers/gpu/drm/i915/display/intel_dp.c).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 drm/i915/dp: DP PHY compliance for EHL/JSL
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx