drm/i915/tgl: Add DKL PHY vswing table for HDMI
diff mbox series

Message ID 20191118180219.9309-1-matthew.d.roper@intel.com
State New
Headers show
Series
  • drm/i915/tgl: Add DKL PHY vswing table for HDMI
Related show

Commit Message

Matt Roper Nov. 18, 2019, 6:02 p.m. UTC
The bspec initially provided a single DKL PHY vswing table for both HDMI
and DP, but was recently updated to include an independent table for
HDMI.

Bspec: 49292
Fixes: 978c3e539be2 ("drm/i915/tgl: Add dkl phy programming sequences")
Cc: Clinton A Taylor <clinton.a.taylor@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
---
 drivers/gpu/drm/i915/display/intel_ddi.c | 29 ++++++++++++++++++++----
 1 file changed, 24 insertions(+), 5 deletions(-)

Comments

Souza, Jose Nov. 18, 2019, 8:45 p.m. UTC | #1
On Mon, 2019-11-18 at 10:02 -0800, Matt Roper wrote:
> The bspec initially provided a single DKL PHY vswing table for both
> HDMI
> and DP, but was recently updated to include an independent table for
> HDMI.
> 

Thanks, I had that in my TODO list to finish TC legacy.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>

> Bspec: 49292
> Fixes: 978c3e539be2 ("drm/i915/tgl: Add dkl phy programming
> sequences")
> Cc: Clinton A Taylor <clinton.a.taylor@intel.com>
> Cc: Lucas De Marchi <lucas.demarchi@intel.com>
> Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_ddi.c | 29 ++++++++++++++++++++
> ----
>  1 file changed, 24 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c
> b/drivers/gpu/drm/i915/display/intel_ddi.c
> index 8f817de34460..a976606d21c7 100644
> --- a/drivers/gpu/drm/i915/display/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/display/intel_ddi.c
> @@ -593,7 +593,7 @@ struct tgl_dkl_phy_ddi_buf_trans {
>  	u32 dkl_de_emphasis_control;
>  };
>  
> -static const struct tgl_dkl_phy_ddi_buf_trans
> tgl_dkl_phy_ddi_translations[] = {
> +static const struct tgl_dkl_phy_ddi_buf_trans
> tgl_dkl_phy_dp_ddi_trans[] = {
>  				/* VS	pre-emp	Non-trans mV	Pre-
> emph dB */
>  	{ 0x7, 0x0, 0x00 },	/* 0	0	400mV		0 dB
> */
>  	{ 0x5, 0x0, 0x03 },	/* 0	1	400mV		3.5
> dB */
> @@ -607,6 +607,20 @@ static const struct tgl_dkl_phy_ddi_buf_trans
> tgl_dkl_phy_ddi_translations[] = {
>  	{ 0x0, 0x0, 0x00 },	/* 3	0	1200mV		0 dB
> HDMI default */
>  };
>  
> +static const struct tgl_dkl_phy_ddi_buf_trans
> tgl_dkl_phy_hdmi_ddi_trans[] = {
> +				/* HDMI Preset	VS	Pre-emph */
> +	{ 0x7, 0x0, 0x0 },	/* 1		400mV	0dB */
> +	{ 0x6, 0x0, 0x0 },	/* 2		500mV	0dB */
> +	{ 0x4, 0x0, 0x0 },	/* 3		650mV	0dB */
> +	{ 0x2, 0x0, 0x0 },	/* 4		800mV	0dB */
> +	{ 0x0, 0x0, 0x0 },	/* 5		1000mV	0dB */
> +	{ 0x0, 0x0, 0x5 },	/* 6		Full	-1.5 dB */
> +	{ 0x0, 0x0, 0x6 },	/* 7		Full	-1.8 dB */
> +	{ 0x0, 0x0, 0x7 },	/* 8		Full	-2 dB */
> +	{ 0x0, 0x0, 0x8 },	/* 9		Full	-2.5 dB */
> +	{ 0x0, 0x0, 0xA },	/* 10		Full	-3 dB */
> +};
> +
>  static const struct ddi_buf_trans *
>  bdw_get_buf_trans_edp(struct drm_i915_private *dev_priv, int
> *n_entries)
>  {
> @@ -897,7 +911,7 @@ static int intel_ddi_hdmi_level(struct
> drm_i915_private *dev_priv, enum port por
>  			icl_get_combo_buf_trans(dev_priv,
> INTEL_OUTPUT_HDMI,
>  						0, &n_entries);
>  		else
> -			n_entries =
> ARRAY_SIZE(tgl_dkl_phy_ddi_translations);
> +			n_entries =
> ARRAY_SIZE(tgl_dkl_phy_hdmi_ddi_trans);
>  		default_entry = n_entries - 1;
>  	} else if (INTEL_GEN(dev_priv) == 11) {
>  		if (intel_phy_is_combo(dev_priv, phy))
> @@ -2358,7 +2372,7 @@ u8 intel_ddi_dp_voltage_max(struct
> intel_encoder *encoder)
>  			icl_get_combo_buf_trans(dev_priv, encoder-
> >type,
>  						intel_dp->link_rate,
> &n_entries);
>  		else
> -			n_entries =
> ARRAY_SIZE(tgl_dkl_phy_ddi_translations);
> +			n_entries =
> ARRAY_SIZE(tgl_dkl_phy_dp_ddi_trans);
>  	} else if (INTEL_GEN(dev_priv) == 11) {
>  		if (intel_phy_is_combo(dev_priv, phy))
>  			icl_get_combo_buf_trans(dev_priv, encoder-
> >type,
> @@ -2810,8 +2824,13 @@ tgl_dkl_phy_ddi_vswing_sequence(struct
> intel_encoder *encoder, int link_clock,
>  	const struct tgl_dkl_phy_ddi_buf_trans *ddi_translations;
>  	u32 n_entries, val, ln, dpcnt_mask, dpcnt_val;
>  
> -	n_entries = ARRAY_SIZE(tgl_dkl_phy_ddi_translations);
> -	ddi_translations = tgl_dkl_phy_ddi_translations;
> +	if (encoder->type == INTEL_OUTPUT_HDMI) {
> +		n_entries = ARRAY_SIZE(tgl_dkl_phy_hdmi_ddi_trans);
> +		ddi_translations = tgl_dkl_phy_hdmi_ddi_trans;
> +	} else {
> +		n_entries = ARRAY_SIZE(tgl_dkl_phy_dp_ddi_trans);
> +		ddi_translations = tgl_dkl_phy_dp_ddi_trans;
> +	}
>  
>  	if (level >= n_entries)
>  		level = n_entries - 1;
Matt Roper Nov. 19, 2019, 4:42 p.m. UTC | #2
On Tue, Nov 19, 2019 at 05:25:31AM +0000, Patchwork wrote:
> == Series Details ==
> 
> Series: drm/i915/tgl: Add DKL PHY vswing table for HDMI
> URL   : https://patchwork.freedesktop.org/series/69639/
> State : success
> 
> == Summary ==
> 
> CI Bug Log - changes from CI_DRM_7365_full -> Patchwork_15319_full
> ====================================================
> 
> Summary
> -------
> 
>   **WARNING**
> 
>   Minor unknown changes coming with Patchwork_15319_full need to be verified
>   manually.
>   
>   If you think the reported changes have nothing to do with the changes
>   introduced in Patchwork_15319_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_15319_full:
> 
> ### IGT changes ###
> 
> #### Warnings ####
> 
>   * igt@tools_test@sysfs_l3_parity:
>     - shard-tglb:         [SKIP][1] ([fdo#109307]) -> [SKIP][2]
>    [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-tglb9/igt@tools_test@sysfs_l3_parity.html
>    [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-tglb9/igt@tools_test@sysfs_l3_parity.html

Skip because !HAS_L3_DPF on TGL.  This seems to be expected behavior
since this flag is only set for IVB and HSW platforms.

Pushed to dinq.  Thanks Jose for the review.


Matt

> 
>   
> Known issues
> ------------
> 
>   Here are the changes found in Patchwork_15319_full that come from known issues:
> 
> ### IGT changes ###
> 
> #### Issues hit ####
> 
>   * igt@gem_busy@busy-vcs1:
>     - shard-iclb:         [PASS][3] -> [SKIP][4] ([fdo#112080]) +12 similar issues
>    [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-iclb1/igt@gem_busy@busy-vcs1.html
>    [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-iclb8/igt@gem_busy@busy-vcs1.html
> 
>   * igt@gem_ctx_isolation@rcs0-s3:
>     - shard-apl:          [PASS][5] -> [DMESG-WARN][6] ([fdo#108566]) +2 similar issues
>    [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-apl7/igt@gem_ctx_isolation@rcs0-s3.html
>    [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-apl4/igt@gem_ctx_isolation@rcs0-s3.html
> 
>   * igt@gem_ctx_persistence@vcs1-mixed-process:
>     - shard-iclb:         [PASS][7] -> [SKIP][8] ([fdo#109276] / [fdo#112080])
>    [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-iclb2/igt@gem_ctx_persistence@vcs1-mixed-process.html
>    [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-iclb3/igt@gem_ctx_persistence@vcs1-mixed-process.html
> 
>   * igt@gem_ctx_switch@all-light:
>     - shard-tglb:         [PASS][9] -> [INCOMPLETE][10] ([fdo#111672])
>    [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-tglb1/igt@gem_ctx_switch@all-light.html
>    [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-tglb6/igt@gem_ctx_switch@all-light.html
> 
>   * igt@gem_exec_parallel@contexts:
>     - shard-tglb:         [PASS][11] -> [INCOMPLETE][12] ([fdo#111867])
>    [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-tglb7/igt@gem_exec_parallel@contexts.html
>    [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-tglb6/igt@gem_exec_parallel@contexts.html
> 
>   * igt@gem_exec_reloc@basic-wc-read-active:
>     - shard-skl:          [PASS][13] -> [DMESG-WARN][14] ([fdo#106107])
>    [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-skl8/igt@gem_exec_reloc@basic-wc-read-active.html
>    [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-skl1/igt@gem_exec_reloc@basic-wc-read-active.html
> 
>   * igt@gem_exec_schedule@independent-bsd2:
>     - shard-iclb:         [PASS][15] -> [SKIP][16] ([fdo#109276]) +17 similar issues
>    [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-iclb2/igt@gem_exec_schedule@independent-bsd2.html
>    [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-iclb3/igt@gem_exec_schedule@independent-bsd2.html
> 
>   * igt@gem_exec_schedule@reorder-wide-bsd:
>     - shard-iclb:         [PASS][17] -> [SKIP][18] ([fdo#112146]) +8 similar issues
>    [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-iclb6/igt@gem_exec_schedule@reorder-wide-bsd.html
>    [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-iclb4/igt@gem_exec_schedule@reorder-wide-bsd.html
> 
>   * igt@gem_exec_whisper@normal:
>     - shard-tglb:         [PASS][19] -> [INCOMPLETE][20] ([fdo#111747])
>    [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-tglb7/igt@gem_exec_whisper@normal.html
>    [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-tglb6/igt@gem_exec_whisper@normal.html
> 
>   * igt@gem_flink_race@flink_close:
>     - shard-iclb:         [PASS][21] -> [INCOMPLETE][22] ([fdo#107713])
>    [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-iclb7/igt@gem_flink_race@flink_close.html
>    [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-iclb7/igt@gem_flink_race@flink_close.html
> 
>   * igt@gem_persistent_relocs@forked-interruptible-thrash-inactive:
>     - shard-apl:          [PASS][23] -> [TIMEOUT][24] ([fdo#112113])
>    [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-apl1/igt@gem_persistent_relocs@forked-interruptible-thrash-inactive.html
>    [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-apl1/igt@gem_persistent_relocs@forked-interruptible-thrash-inactive.html
> 
>   * igt@gem_userptr_blits@dmabuf-sync:
>     - shard-snb:          [PASS][25] -> [DMESG-WARN][26] ([fdo#111870])
>    [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-snb7/igt@gem_userptr_blits@dmabuf-sync.html
>    [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-snb6/igt@gem_userptr_blits@dmabuf-sync.html
>     - shard-hsw:          [PASS][27] -> [DMESG-WARN][28] ([fdo#111870])
>    [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-hsw5/igt@gem_userptr_blits@dmabuf-sync.html
>    [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-hsw6/igt@gem_userptr_blits@dmabuf-sync.html
> 
>   * igt@i915_pm_rpm@modeset-stress-extra-wait:
>     - shard-glk:          [PASS][29] -> [DMESG-WARN][30] ([fdo#105763] / [fdo#106538])
>    [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-glk3/igt@i915_pm_rpm@modeset-stress-extra-wait.html
>    [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-glk8/igt@i915_pm_rpm@modeset-stress-extra-wait.html
> 
>   * igt@i915_pm_rpm@system-suspend:
>     - shard-kbl:          [PASS][31] -> [DMESG-WARN][32] ([fdo#103558] / [fdo#105602]) +18 similar issues
>    [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-kbl4/igt@i915_pm_rpm@system-suspend.html
>    [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-kbl7/igt@i915_pm_rpm@system-suspend.html
> 
>   * igt@i915_suspend@fence-restore-tiled2untiled:
>     - shard-tglb:         [PASS][33] -> [INCOMPLETE][34] ([fdo#111832] / [fdo#111850]) +3 similar issues
>    [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-tglb5/igt@i915_suspend@fence-restore-tiled2untiled.html
>    [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-tglb3/igt@i915_suspend@fence-restore-tiled2untiled.html
> 
>   * igt@kms_color@pipe-a-ctm-green-to-red:
>     - shard-skl:          [PASS][35] -> [FAIL][36] ([fdo#107201])
>    [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-skl2/igt@kms_color@pipe-a-ctm-green-to-red.html
>    [36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-skl9/igt@kms_color@pipe-a-ctm-green-to-red.html
> 
>   * igt@kms_cursor_crc@pipe-a-cursor-suspend:
>     - shard-kbl:          [PASS][37] -> [DMESG-WARN][38] ([fdo#108566]) +3 similar issues
>    [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-kbl6/igt@kms_cursor_crc@pipe-a-cursor-suspend.html
>    [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-kbl4/igt@kms_cursor_crc@pipe-a-cursor-suspend.html
> 
>   * igt@kms_flip@flip-vs-suspend-interruptible:
>     - shard-tglb:         [PASS][39] -> [INCOMPLETE][40] ([fdo#111832] / [fdo#111850] / [fdo#112031])
>    [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-tglb9/igt@kms_flip@flip-vs-suspend-interruptible.html
>    [40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-tglb4/igt@kms_flip@flip-vs-suspend-interruptible.html
>     - shard-hsw:          [PASS][41] -> [INCOMPLETE][42] ([fdo#103540])
>    [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-hsw5/igt@kms_flip@flip-vs-suspend-interruptible.html
>    [42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-hsw8/igt@kms_flip@flip-vs-suspend-interruptible.html
> 
>   * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-indfb-msflip-blt:
>     - shard-tglb:         [PASS][43] -> [FAIL][44] ([fdo#103167]) +3 similar issues
>    [43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-tglb4/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-indfb-msflip-blt.html
>    [44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-tglb2/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-indfb-msflip-blt.html
> 
>   * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-indfb-pgflip-blt:
>     - shard-iclb:         [PASS][45] -> [FAIL][46] ([fdo#103167]) +4 similar issues
>    [45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-iclb6/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-indfb-pgflip-blt.html
>    [46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-iclb2/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-indfb-pgflip-blt.html
> 
>   * igt@kms_frontbuffer_tracking@fbcpsr-suspend:
>     - shard-tglb:         [PASS][47] -> [INCOMPLETE][48] ([fdo#111832] / [fdo#111850] / [fdo#111884])
>    [47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-tglb9/igt@kms_frontbuffer_tracking@fbcpsr-suspend.html
>    [48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-tglb4/igt@kms_frontbuffer_tracking@fbcpsr-suspend.html
> 
>   * igt@kms_frontbuffer_tracking@psr-1p-rte:
>     - shard-skl:          [PASS][49] -> [FAIL][50] ([fdo#103167])
>    [49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-skl2/igt@kms_frontbuffer_tracking@psr-1p-rte.html
>    [50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-skl9/igt@kms_frontbuffer_tracking@psr-1p-rte.html
> 
>   * igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min:
>     - shard-skl:          [PASS][51] -> [FAIL][52] ([fdo#108145]) +2 similar issues
>    [51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-skl4/igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min.html
>    [52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-skl2/igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min.html
> 
>   * igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
>     - shard-skl:          [PASS][53] -> [FAIL][54] ([fdo#108145] / [fdo#110403])
>    [53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-skl5/igt@kms_plane_alpha_blend@pipe-c-coverage-7efc.html
>    [54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-skl2/igt@kms_plane_alpha_blend@pipe-c-coverage-7efc.html
> 
>   * igt@kms_plane_lowres@pipe-a-tiling-x:
>     - shard-iclb:         [PASS][55] -> [FAIL][56] ([fdo#103166])
>    [55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-iclb3/igt@kms_plane_lowres@pipe-a-tiling-x.html
>    [56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-iclb1/igt@kms_plane_lowres@pipe-a-tiling-x.html
> 
>   * igt@kms_psr@no_drrs:
>     - shard-iclb:         [PASS][57] -> [FAIL][58] ([fdo#108341])
>    [57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-iclb3/igt@kms_psr@no_drrs.html
>    [58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-iclb1/igt@kms_psr@no_drrs.html
> 
>   * igt@kms_psr@psr2_primary_blt:
>     - shard-iclb:         [PASS][59] -> [SKIP][60] ([fdo#109441])
>    [59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-iclb2/igt@kms_psr@psr2_primary_blt.html
>    [60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-iclb4/igt@kms_psr@psr2_primary_blt.html
> 
>   * igt@kms_setmode@basic:
>     - shard-apl:          [PASS][61] -> [FAIL][62] ([fdo#99912])
>    [61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-apl6/igt@kms_setmode@basic.html
>    [62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-apl8/igt@kms_setmode@basic.html
>     - shard-skl:          [PASS][63] -> [FAIL][64] ([fdo#99912])
>    [63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-skl1/igt@kms_setmode@basic.html
>    [64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-skl6/igt@kms_setmode@basic.html
>     - shard-hsw:          [PASS][65] -> [FAIL][66] ([fdo#99912])
>    [65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-hsw6/igt@kms_setmode@basic.html
>    [66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-hsw1/igt@kms_setmode@basic.html
> 
>   
> #### Possible fixes ####
> 
>   * igt@gem_ctx_isolation@vcs1-none:
>     - shard-iclb:         [SKIP][67] ([fdo#109276] / [fdo#112080]) -> [PASS][68] +1 similar issue
>    [67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-iclb6/igt@gem_ctx_isolation@vcs1-none.html
>    [68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-iclb4/igt@gem_ctx_isolation@vcs1-none.html
> 
>   * igt@gem_exec_nop@basic-series:
>     - shard-tglb:         [INCOMPLETE][69] ([fdo#111747]) -> [PASS][70]
>    [69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-tglb6/igt@gem_exec_nop@basic-series.html
>    [70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-tglb1/igt@gem_exec_nop@basic-series.html
> 
>   * igt@gem_exec_parallel@vcs1-fds:
>     - shard-iclb:         [SKIP][71] ([fdo#112080]) -> [PASS][72] +9 similar issues
>    [71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-iclb5/igt@gem_exec_parallel@vcs1-fds.html
>    [72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-iclb2/igt@gem_exec_parallel@vcs1-fds.html
> 
>   * igt@gem_exec_schedule@preempt-queue-bsd:
>     - shard-iclb:         [SKIP][73] ([fdo#112146]) -> [PASS][74] +1 similar issue
>    [73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-iclb2/igt@gem_exec_schedule@preempt-queue-bsd.html
>    [74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-iclb3/igt@gem_exec_schedule@preempt-queue-bsd.html
> 
>   * igt@gem_userptr_blits@sync-unmap-after-close:
>     - shard-snb:          [DMESG-WARN][75] ([fdo#111870]) -> [PASS][76]
>    [75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-snb1/igt@gem_userptr_blits@sync-unmap-after-close.html
>    [76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-snb4/igt@gem_userptr_blits@sync-unmap-after-close.html
> 
>   * igt@i915_pm_dc@dc6-dpms:
>     - shard-iclb:         [FAIL][77] ([fdo#111830 ]) -> [PASS][78] +1 similar issue
>    [77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-iclb3/igt@i915_pm_dc@dc6-dpms.html
>    [78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-iclb2/igt@i915_pm_dc@dc6-dpms.html
> 
>   * igt@kms_cursor_crc@pipe-c-cursor-suspend:
>     - shard-iclb:         [INCOMPLETE][79] ([fdo#107713]) -> [PASS][80]
>    [79]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-iclb8/igt@kms_cursor_crc@pipe-c-cursor-suspend.html
>    [80]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-iclb8/igt@kms_cursor_crc@pipe-c-cursor-suspend.html
> 
>   * igt@kms_flip@flip-vs-suspend-interruptible:
>     - shard-skl:          [INCOMPLETE][81] ([fdo#109507]) -> [PASS][82]
>    [81]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-skl10/igt@kms_flip@flip-vs-suspend-interruptible.html
>    [82]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-skl5/igt@kms_flip@flip-vs-suspend-interruptible.html
>     - shard-snb:          [INCOMPLETE][83] ([fdo#105411]) -> [PASS][84]
>    [83]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-snb1/igt@kms_flip@flip-vs-suspend-interruptible.html
>    [84]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-snb4/igt@kms_flip@flip-vs-suspend-interruptible.html
> 
>   * igt@kms_flip@plain-flip-fb-recreate-interruptible:
>     - shard-skl:          [FAIL][85] ([fdo#100368]) -> [PASS][86]
>    [85]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-skl10/igt@kms_flip@plain-flip-fb-recreate-interruptible.html
>    [86]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-skl4/igt@kms_flip@plain-flip-fb-recreate-interruptible.html
> 
>   * igt@kms_flip_tiling@flip-x-tiled:
>     - shard-iclb:         [FAIL][87] ([fdo#108303]) -> [PASS][88]
>    [87]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-iclb4/igt@kms_flip_tiling@flip-x-tiled.html
>    [88]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-iclb5/igt@kms_flip_tiling@flip-x-tiled.html
> 
>   * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-pwrite:
>     - shard-iclb:         [FAIL][89] ([fdo#103167]) -> [PASS][90] +8 similar issues
>    [89]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-iclb5/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-pwrite.html
>    [90]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-iclb2/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-pwrite.html
> 
>   * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-shrfb-plflip-blt:
>     - shard-tglb:         [FAIL][91] ([fdo#103167]) -> [PASS][92] +5 similar issues
>    [91]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-tglb1/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-shrfb-plflip-blt.html
>    [92]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-tglb5/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-shrfb-plflip-blt.html
> 
>   * igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes:
>     - shard-kbl:          [DMESG-WARN][93] ([fdo#108566]) -> [PASS][94] +1 similar issue
>    [93]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-kbl1/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes.html
>    [94]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-kbl2/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes.html
> 
>   * igt@kms_plane_alpha_blend@pipe-b-coverage-7efc:
>     - shard-skl:          [FAIL][95] ([fdo#108145] / [fdo#110403]) -> [PASS][96]
>    [95]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-skl5/igt@kms_plane_alpha_blend@pipe-b-coverage-7efc.html
>    [96]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-skl2/igt@kms_plane_alpha_blend@pipe-b-coverage-7efc.html
> 
>   * igt@kms_psr@psr2_primary_mmap_cpu:
>     - shard-iclb:         [SKIP][97] ([fdo#109441]) -> [PASS][98] +1 similar issue
>    [97]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-iclb3/igt@kms_psr@psr2_primary_mmap_cpu.html
>    [98]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-iclb2/igt@kms_psr@psr2_primary_mmap_cpu.html
> 
>   * igt@kms_psr@suspend:
>     - shard-skl:          [INCOMPLETE][99] ([fdo#108972]) -> [PASS][100]
>    [99]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-skl1/igt@kms_psr@suspend.html
>    [100]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-skl7/igt@kms_psr@suspend.html
>     - shard-tglb:         [INCOMPLETE][101] ([fdo#111832] / [fdo#111850]) -> [PASS][102] +2 similar issues
>    [101]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-tglb4/igt@kms_psr@suspend.html
>    [102]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-tglb2/igt@kms_psr@suspend.html
> 
>   * igt@perf@short-reads:
>     - shard-kbl:          [TIMEOUT][103] ([fdo#103183]) -> [PASS][104]
>    [103]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-kbl4/igt@perf@short-reads.html
>    [104]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-kbl3/igt@perf@short-reads.html
>     - shard-glk:          [TIMEOUT][105] ([fdo#103183]) -> [PASS][106]
>    [105]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-glk7/igt@perf@short-reads.html
>    [106]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-glk3/igt@perf@short-reads.html
> 
>   * igt@prime_busy@hang-bsd2:
>     - shard-iclb:         [SKIP][107] ([fdo#109276]) -> [PASS][108] +18 similar issues
>    [107]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7365/shard-iclb8/igt@prime_busy@hang-bsd2.html
>    [108]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/shard-iclb4/igt@prime_busy@hang-bsd2.html
> 
>   
> #### Warnings ####
> 
>   * igt@gem_c
> 
> == Logs ==
> 
> For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15319/index.html

Patch
diff mbox series

diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
index 8f817de34460..a976606d21c7 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi.c
@@ -593,7 +593,7 @@  struct tgl_dkl_phy_ddi_buf_trans {
 	u32 dkl_de_emphasis_control;
 };
 
-static const struct tgl_dkl_phy_ddi_buf_trans tgl_dkl_phy_ddi_translations[] = {
+static const struct tgl_dkl_phy_ddi_buf_trans tgl_dkl_phy_dp_ddi_trans[] = {
 				/* VS	pre-emp	Non-trans mV	Pre-emph dB */
 	{ 0x7, 0x0, 0x00 },	/* 0	0	400mV		0 dB */
 	{ 0x5, 0x0, 0x03 },	/* 0	1	400mV		3.5 dB */
@@ -607,6 +607,20 @@  static const struct tgl_dkl_phy_ddi_buf_trans tgl_dkl_phy_ddi_translations[] = {
 	{ 0x0, 0x0, 0x00 },	/* 3	0	1200mV		0 dB HDMI default */
 };
 
+static const struct tgl_dkl_phy_ddi_buf_trans tgl_dkl_phy_hdmi_ddi_trans[] = {
+				/* HDMI Preset	VS	Pre-emph */
+	{ 0x7, 0x0, 0x0 },	/* 1		400mV	0dB */
+	{ 0x6, 0x0, 0x0 },	/* 2		500mV	0dB */
+	{ 0x4, 0x0, 0x0 },	/* 3		650mV	0dB */
+	{ 0x2, 0x0, 0x0 },	/* 4		800mV	0dB */
+	{ 0x0, 0x0, 0x0 },	/* 5		1000mV	0dB */
+	{ 0x0, 0x0, 0x5 },	/* 6		Full	-1.5 dB */
+	{ 0x0, 0x0, 0x6 },	/* 7		Full	-1.8 dB */
+	{ 0x0, 0x0, 0x7 },	/* 8		Full	-2 dB */
+	{ 0x0, 0x0, 0x8 },	/* 9		Full	-2.5 dB */
+	{ 0x0, 0x0, 0xA },	/* 10		Full	-3 dB */
+};
+
 static const struct ddi_buf_trans *
 bdw_get_buf_trans_edp(struct drm_i915_private *dev_priv, int *n_entries)
 {
@@ -897,7 +911,7 @@  static int intel_ddi_hdmi_level(struct drm_i915_private *dev_priv, enum port por
 			icl_get_combo_buf_trans(dev_priv, INTEL_OUTPUT_HDMI,
 						0, &n_entries);
 		else
-			n_entries = ARRAY_SIZE(tgl_dkl_phy_ddi_translations);
+			n_entries = ARRAY_SIZE(tgl_dkl_phy_hdmi_ddi_trans);
 		default_entry = n_entries - 1;
 	} else if (INTEL_GEN(dev_priv) == 11) {
 		if (intel_phy_is_combo(dev_priv, phy))
@@ -2358,7 +2372,7 @@  u8 intel_ddi_dp_voltage_max(struct intel_encoder *encoder)
 			icl_get_combo_buf_trans(dev_priv, encoder->type,
 						intel_dp->link_rate, &n_entries);
 		else
-			n_entries = ARRAY_SIZE(tgl_dkl_phy_ddi_translations);
+			n_entries = ARRAY_SIZE(tgl_dkl_phy_dp_ddi_trans);
 	} else if (INTEL_GEN(dev_priv) == 11) {
 		if (intel_phy_is_combo(dev_priv, phy))
 			icl_get_combo_buf_trans(dev_priv, encoder->type,
@@ -2810,8 +2824,13 @@  tgl_dkl_phy_ddi_vswing_sequence(struct intel_encoder *encoder, int link_clock,
 	const struct tgl_dkl_phy_ddi_buf_trans *ddi_translations;
 	u32 n_entries, val, ln, dpcnt_mask, dpcnt_val;
 
-	n_entries = ARRAY_SIZE(tgl_dkl_phy_ddi_translations);
-	ddi_translations = tgl_dkl_phy_ddi_translations;
+	if (encoder->type == INTEL_OUTPUT_HDMI) {
+		n_entries = ARRAY_SIZE(tgl_dkl_phy_hdmi_ddi_trans);
+		ddi_translations = tgl_dkl_phy_hdmi_ddi_trans;
+	} else {
+		n_entries = ARRAY_SIZE(tgl_dkl_phy_dp_ddi_trans);
+		ddi_translations = tgl_dkl_phy_dp_ddi_trans;
+	}
 
 	if (level >= n_entries)
 		level = n_entries - 1;