Skip to contentSkip to conversation

drm/i915/icl: Add pre_pll_enable hook for ICL and set DFLEXDPMLE in this hook

PATCH In review Manasi Navare 3 participants 4 messages Aug 1, 2018 – Aug 13, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915/icl: Add pre_pll_enable hook for ICL and set DFLEXDPMLE in this hook

In case of Legacy DP connector on TypeC port (C, D, E or F), the flex IO DPMLE register is set to maximum number of lanes since there is no muxing with other controllers in this case. While in case of the TypeC connector, it is set to the lane count obained from DFLEXDPSP register.
This needs to be programmed before enabling the shared PLLs hence add a pre_pll_enable hook for ICL and add this programming in that hook.

v3:
* Call intel_dp_max_common_lane_count that gets lane count common between sink, source, fia
v2:
* Add pre pll enable hook and move dflexdpmle programming to that hook (Animesh)

Cc Jani Nikula <[email protected]>
Cc Animesh Manna <[email protected]>
Cc Anusha Srivatsa <[email protected]>
Cc Paulo Zanoni <[email protected]>
---
 drivers/gpu/drm/i915/intel_ddi.c | 18 ++++++++++++++++++
 drivers/gpu/drm/i915/intel_dp.c  | 20 ++++++++++++++++++++
 drivers/gpu/drm/i915/intel_drv.h |  1 +
 3 files changed, 39 insertions(+)
drivers/gpu/drm/i915/intel_ddi.c +18 -0
index 0adc043..eb00ac4 100644
@@ -3193,6 +3193,22 @@ static void bxt_ddi_pre_pll_enable(struct intel_encoder *encoder,
 	bxt_ddi_phy_set_lane_optim_mask(encoder, mask);
 }
 
+static void icl_ddi_pre_pll_enable(struct intel_encoder *encoder,
+				   const struct intel_crtc_state *pipe_config,
+				   const struct drm_connector_state *conn_state)
+{
+	struct intel_dp *intel_dp = enc_to_intel_dp(&encoder->base);
+	struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
+	struct drm_i915_private *dev_priv = to_i915(intel_dig_port->base.base.dev);
+	enum tc_port tc_port = intel_port_to_tc(dev_priv,
+						intel_dig_port->base.port);
+
+	if (tc_port == PORT_TC_NONE || intel_dig_port->tc_type == TC_PORT_TBT)
+		return;
+
+	intel_dp_set_fia_lane_count(intel_dp);
+}
+
 void intel_ddi_prepare_link_retrain(struct intel_dp *intel_dp)
 {
 	struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
@@ -3709,6 +3725,8 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port)
 	intel_encoder->enable = intel_enable_ddi;
 	if (IS_GEN9_LP(dev_priv))
 		intel_encoder->pre_pll_enable = bxt_ddi_pre_pll_enable;
+	if (IS_ICELAKE(dev_priv))
+		intel_encoder->pre_pll_enable = icl_ddi_pre_pll_enable;
 	intel_encoder->pre_enable = intel_ddi_pre_enable;
 	intel_encoder->disable = intel_disable_ddi;
 	intel_encoder->post_disable = intel_ddi_post_disable;
drivers/gpu/drm/i915/intel_dp.c +20 -0
index 49a3149..6683cdc 100644
@@ -2127,6 +2127,26 @@ void intel_dp_set_link_params(struct intel_dp *intel_dp,
 	intel_dp->link_mst = link_mst;
 }
 
+void intel_dp_set_fia_lane_count(struct intel_dp *intel_dp)
+{
+	struct drm_device *dev = intel_dp_to_dev(intel_dp);
+	struct drm_i915_private *dev_priv = to_i915(dev);
+	struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
+	enum tc_port tc_port = intel_port_to_tc(dev_priv,
+						intel_dig_port->base.port);
+	u8 lane_count = intel_dp_max_common_lane_count(intel_dp);
+	u32 val;
+
+	/* In case of legacy/static DP over Type-C port there is no muxing
+	 * with other controllers so this is set to max lane count.
+	 * In case of Type_C it is set to the DFLEXDPSP.DPX4TXLATC value.
+	 */
+	val = I915_READ(PORT_TX_DFLEXDPMLE1);
+	val &= ~DFLEXDPMLE1_DPMLETC_MASK(tc_port);
+	val |= DFLEXDPMLE1_DPMLETC(tc_port, lane_count);
+	I915_WRITE(PORT_TX_DFLEXDPMLE1, val);
+}
+
 static void intel_dp_prepare(struct intel_encoder *encoder,
 			     const struct intel_crtc_state *pipe_config)
 {
drivers/gpu/drm/i915/intel_drv.h +1 -0
index 1ad7c11..d98cdb9 100644
@@ -1676,6 +1676,7 @@ bool intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
 void intel_dp_set_link_params(struct intel_dp *intel_dp,
 			      int link_rate, uint8_t lane_count,
 			      bool link_mst);
+void intel_dp_set_fia_lane_count(struct intel_dp *intel_dp);
 int intel_dp_get_link_train_fallback_values(struct intel_dp *intel_dp,
 					    int link_rate, uint8_t lane_count);
 void intel_dp_start_link_train(struct intel_dp *intel_dp);
Signature · 6 lines
2.7.4

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

✗ Fi.CI.BAT: failure for drm/i915/icl: Add pre_pll_enable hook for ICL and set DFLEXDPMLE in this hook

== Series Details ==

== Series Details ==

Series: drm/i915/icl: Add pre_pll_enable hook for ICL and set DFLEXDPMLE in this hook
URL : https://patchwork.freedesktop.org/series/47519/
State : failure

== Summary ==

= CI Bug Log - changes from CI_DRM_4600 -> Patchwork_9827 =

== Summary - FAILURE ==

Serious unknown changes coming with Patchwork_9827 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_9827, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

External URL: https://patchwork.freedesktop.org/api/1.0/series/47519/revisions/1/mbox/

== Possible new issues ==

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

=== IGT changes ===

    ==== Possible regressions ====

    igt@gem_ringfill@basic-default-hang:
      fi-elk-e7500:       PASS -> DMESG-WARN

== Known issues ==

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

=== IGT changes ===

    ==== Issues hit ====

    igt@drv_selftest@live_guc:
      fi-skl-guc:         NOTRUN -> DMESG-WARN (fdo#107175, fdo#107258)

    igt@drv_selftest@live_hangcheck:
      fi-bdw-5557u:       PASS -> DMESG-FAIL (fdo#106560)

    igt@drv_selftest@live_workarounds:
      fi-cnl-psr:         PASS -> DMESG-FAIL (fdo#107292)

    igt@kms_flip@basic-flip-vs-dpms:
      fi-skl-6700hq:      PASS -> DMESG-WARN (fdo#105998)

    
    ==== Possible fixes ====

    igt@drv_selftest@live_hangcheck:
      fi-kbl-guc:         DMESG-FAIL (fdo#106947) -> PASS
      fi-skl-6260u:       DMESG-FAIL (fdo#107174, fdo#106560) -> PASS

    igt@kms_frontbuffer_tracking@basic:
      fi-hsw-peppy:       DMESG-FAIL (fdo#106103, fdo#102614) -> PASS

    igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a:
      fi-skl-6700k2:      FAIL (fdo#103191) -> PASS

    
    ==== Warnings ====

    {igt@kms_psr@primary_page_flip}:
      fi-cnl-psr:         DMESG-FAIL (fdo#107372) -> DMESG-WARN (fdo#107372)

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

fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#105998 https://bugs.freedesktop.org/show_bug.cgi?id=105998
fdo#106103 https://bugs.freedesktop.org/show_bug.cgi?id=106103
fdo#106560 https://bugs.freedesktop.org/show_bug.cgi?id=106560
fdo#106947 https://bugs.freedesktop.org/show_bug.cgi?id=106947
fdo#107174 https://bugs.freedesktop.org/show_bug.cgi?id=107174
fdo#107175 https://bugs.freedesktop.org/show_bug.cgi?id=107175
fdo#107258 https://bugs.freedesktop.org/show_bug.cgi?id=107258
fdo#107292 https://bugs.freedesktop.org/show_bug.cgi?id=107292
fdo#107372 https://bugs.freedesktop.org/show_bug.cgi?id=107372

== Participating hosts (48 -> 45) ==

Additional (2): fi-skl-guc fi-glk-j4005
Missing (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-byt-clapper fi-hsw-4200u

== Build changes ==

* Linux: CI_DRM_4600 -> Patchwork_9827

CI_DRM_4600: 308427119c70d0aaa90433b05969a0317165b122 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4581: f1c868dae24056ebc27e4f3c197724ce9b956a8a @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9827: e5529aa3662792da36e042b8676bcc5c227915f9 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

e5529aa36627 drm/i915/icl: Add pre_pll_enable hook for ICL and set DFLEXDPMLE in this hook

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9827/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw
In reply to Manasi Navare
Quoted 1 line · Manasi Navare

In case of Legacy DP connector on TypeC port (C, D, E or F), the

Legacy DP connector(DisplayPort Alternative Mode)

Quoted 2 lines

flex IO DPMLE register is set to maximum number of lanes since there is no muxing with other controllers in this case.

Okay there is no muxing but driver could choose to use few lanes do save power.

Quoted 2 lines

While in case of the TypeC connector, it is set to the lane count obained from DFLEXDPSP register.

obtained

Quoted 59 lines

This needs to be programmed before enabling the shared PLLs hence add a pre_pll_enable hook for ICL and add this programming in that hook.

v3:
* Call intel_dp_max_common_lane_count that gets lane count common between sink, source, fia
v2:
* Add pre pll enable hook and move dflexdpmle programming to that hook (Animesh)

Cc Jani Nikula <[email protected]>
Cc Animesh Manna <[email protected]>
Cc Anusha Srivatsa <[email protected]>
Cc Paulo Zanoni <[email protected]>
---
 drivers/gpu/drm/i915/intel_ddi.c | 18 ++++++++++++++++++
 drivers/gpu/drm/i915/intel_dp.c  | 20 ++++++++++++++++++++
 drivers/gpu/drm/i915/intel_drv.h |  1 +
 3 files changed, 39 insertions(+)
drivers/gpu/drm/i915/intel_ddi.c +6 -0
index 0adc043..eb00ac4 100644
@@ -3193,6 +3193,22 @@ static void bxt_ddi_pre_pll_enable(struct
 intel_encoder *encoder,
 	bxt_ddi_phy_set_lane_optim_mask(encoder, mask);
 }
 
+static void icl_ddi_pre_pll_enable(struct intel_encoder *encoder,
+				   const struct intel_crtc_state
 *pipe_config,
+				   const struct drm_connector_state
 *conn_state)
+{
+	struct intel_dp *intel_dp = enc_to_intel_dp(&encoder->base);
+	struct intel_digital_port *intel_dig_port =

dp_to_dig_port(intel_dp);

drivers/gpu/drm/i915/intel_ddi.c +1 -0
+	struct drm_i915_private *dev_priv = to_i915(intel_dig_port-
Quoted 1 line

base.base.dev);

drivers/gpu/drm/i915/intel_ddi.c +2 -0
+	enum tc_port tc_port = intel_port_to_tc(dev_priv,
+						intel_dig_port-
Quoted 1 line

base.port);

drivers/gpu/drm/i915/intel_ddi.c +2 -0
+
+	if (tc_port == PORT_TC_NONE || intel_dig_port->tc_type ==

TC_PORT_TBT)

drivers/gpu/drm/i915/intel_ddi.c +5 -0
+		return;
+
+	intel_dp_set_fia_lane_count(intel_dp);
+}
+
 void intel_ddi_prepare_link_retrain(struct intel_dp *intel_dp)
 {
 	struct intel_digital_port *intel_dig_port =

dp_to_dig_port(intel_dp);

drivers/gpu/drm/i915/intel_ddi.c void intel_ddi_init(struct drm_i915_private · line 3730

Quoted 6 lines
drivers/gpu/drm/i915/intel_ddi.c +2 -0
@@ -3709,6 +3725,8 @@ void intel_ddi_init(struct drm_i915_private
 *dev_priv, enum port port)
 	intel_encoder->enable = intel_enable_ddi;
 	if (IS_GEN9_LP(dev_priv))
 		intel_encoder->pre_pll_enable = bxt_ddi_pre_pll_enable;
+	if (IS_ICELAKE(dev_priv))
+		intel_encoder->pre_pll_enable = icl_ddi_pre_pll_enable;

pre_pll_enable is set initialy in intel_crt_init() for most of the gens, maybe those 4 lines should be moved there but that can be done in another patch.

Quoted 13 lines
drivers/gpu/drm/i915/intel_ddi.c +0 -0
 	intel_encoder->pre_enable = intel_ddi_pre_enable;
 	intel_encoder->disable = intel_disable_ddi;
drivers/gpu/drm/i915/intel_ddi.c +0 -0
 	intel_encoder->post_disable = intel_ddi_post_disable;
drivers/gpu/drm/i915/intel_dp.c +0 -0
index 49a3149..6683cdc 100644
@@ -2127,6 +2127,26 @@ void intel_dp_set_link_params(struct intel_dp
 *intel_dp,
 	intel_dp->link_mst = link_mst;
 }
 

drivers/gpu/drm/i915/intel_dp.c void intel_dp_set_link_params(struct intel_dp · line 2140

Quoted 10 lines
drivers/gpu/drm/i915/intel_dp.c +8 -0
+void intel_dp_set_fia_lane_count(struct intel_dp *intel_dp)
+{
+	struct drm_device *dev = intel_dp_to_dev(intel_dp);
+	struct drm_i915_private *dev_priv = to_i915(dev);
+	struct intel_digital_port *intel_dig_port =
 dp_to_dig_port(intel_dp);
+	enum tc_port tc_port = intel_port_to_tc(dev_priv,
+						intel_dig_port-
 >base.port);
+	u8 lane_count = intel_dp_max_common_lane_count(intel_dp);

intel_dp->max_link_lane_count could be used instead as it is set on hotplug and don't change over time.

But I guess this is also wrong, it should not enable the max lane count, it should enable the number of the lanes that the driver decides that is enough to the mode set to save power.

drivers/gpu/drm/i915/intel_dp.c void intel_dp_set_link_params(struct intel_dp *intel_dp, · line 2146

Quoted 11 lines
drivers/gpu/drm/i915/intel_dp.c +3 -0
+	u32 val;
+
+	/* In case of legacy/static DP over Type-C port there is no

muxing

drivers/gpu/drm/i915/intel_dp.c +2 -0
+	 * with other controllers so this is set to max lane count.
+	 * In case of Type_C it is set to the DFLEXDPSP.DPX4TXLATC

value.

drivers/gpu/drm/i915/intel_dp.c +4 -0
+	 */
+	val = I915_READ(PORT_TX_DFLEXDPMLE1);
+	val &= ~DFLEXDPMLE1_DPMLETC_MASK(tc_port);
+	val |= DFLEXDPMLE1_DPMLETC(tc_port, lane_count);

this macro is wrong, each bit set maps to a lane, so to enable all 4 lanes it should 0xf for the first TC.

From spec:

For example, in DP Pin Assignment C, the register DFLEXDPSP1.DPX4TXLATC0 tells Display Driver that all the 4 TX Lane in PHY can be used. However, Display Driver may choose to use only x1, i.e. for ML0. Then Display Driver will program “0001b” to this register. For x2 and x4, Display Driver will program “0011b” and “1111b”, respectively.

Quoted 20 lines
drivers/gpu/drm/i915/intel_dp.c +3 -0
+	I915_WRITE(PORT_TX_DFLEXDPMLE1, val);
+}
+
 static void intel_dp_prepare(struct intel_encoder *encoder,
 			     const struct intel_crtc_state

*pipe_config)
{

drivers/gpu/drm/i915/intel_drv.h +1 -0
index 1ad7c11..d98cdb9 100644
@@ -1676,6 +1676,7 @@ bool intel_dp_init_connector(struct
 intel_digital_port *intel_dig_port,
 void intel_dp_set_link_params(struct intel_dp *intel_dp,
 			      int link_rate, uint8_t lane_count,
 			      bool link_mst);
+void intel_dp_set_fia_lane_count(struct intel_dp *intel_dp);
 int intel_dp_get_link_train_fallback_values(struct intel_dp
 *intel_dp,
Quoted 3 lines

int link_rate, uint8_t
lane_count);
void intel_dp_start_link_train(struct intel_dp *intel_dp);

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw
Quoted 4 lines · Jose
Quoted 1 line · Manasi Navare

In case of Legacy DP connector on TypeC port (C, D, E or F), the

Legacy DP connector(DisplayPort Alternative Mode)

Ok will reword this as DisplayPort Alternative Mode

Quoted 73 lines
Quoted 3 lines

flex IO DPMLE register is set to maximum number of lanes since there is no muxing with other controllers in this case.

Okay there is no muxing but driver could choose to use few lanes do save power.

Quoted 2 lines

While in case of the TypeC connector, it is set to the lane count obained from DFLEXDPSP register.

obtained

Quoted 61 lines

This needs to be programmed before enabling the shared PLLs hence add a pre_pll_enable hook for ICL and add this programming in that hook.

v3:
* Call intel_dp_max_common_lane_count that gets lane count common between sink, source, fia
v2:
* Add pre pll enable hook and move dflexdpmle programming to that hook (Animesh)

Cc Jani Nikula <[email protected]>
Cc Animesh Manna <[email protected]>
Cc Anusha Srivatsa <[email protected]>
Cc Paulo Zanoni <[email protected]>
---
 drivers/gpu/drm/i915/intel_ddi.c | 18 ++++++++++++++++++
 drivers/gpu/drm/i915/intel_dp.c  | 20 ++++++++++++++++++++
 drivers/gpu/drm/i915/intel_drv.h |  1 +
 3 files changed, 39 insertions(+)
drivers/gpu/drm/i915/intel_ddi.c +6 -0
index 0adc043..eb00ac4 100644
@@ -3193,6 +3193,22 @@ static void bxt_ddi_pre_pll_enable(struct
 intel_encoder *encoder,
 	bxt_ddi_phy_set_lane_optim_mask(encoder, mask);
 }
 
+static void icl_ddi_pre_pll_enable(struct intel_encoder *encoder,
+				   const struct intel_crtc_state
 *pipe_config,
+				   const struct drm_connector_state
 *conn_state)
+{
+	struct intel_dp *intel_dp = enc_to_intel_dp(&encoder->base);
+	struct intel_digital_port *intel_dig_port =

dp_to_dig_port(intel_dp);

drivers/gpu/drm/i915/intel_ddi.c +1 -0
+	struct drm_i915_private *dev_priv = to_i915(intel_dig_port-
Quoted 1 line

base.base.dev);

drivers/gpu/drm/i915/intel_ddi.c +2 -0
+	enum tc_port tc_port = intel_port_to_tc(dev_priv,
+						intel_dig_port-
Quoted 1 line

base.port);

drivers/gpu/drm/i915/intel_ddi.c +2 -0
+
+	if (tc_port == PORT_TC_NONE || intel_dig_port->tc_type ==

TC_PORT_TBT)

drivers/gpu/drm/i915/intel_ddi.c +5 -0
+		return;
+
+	intel_dp_set_fia_lane_count(intel_dp);
+}
+
 void intel_ddi_prepare_link_retrain(struct intel_dp *intel_dp)
 {
 	struct intel_digital_port *intel_dig_port =

dp_to_dig_port(intel_dp);

drivers/gpu/drm/i915/intel_ddi.c +0 -0
@@ -3709,6 +3725,8 @@ void intel_ddi_init(struct drm_i915_private
 *dev_priv, enum port port)
 	intel_encoder->enable = intel_enable_ddi;
Quoted 8 lines

drivers/gpu/drm/i915/intel_ddi.c void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port) · line 3729

Quoted 4 lines
drivers/gpu/drm/i915/intel_ddi.c +2 -0
 	if (IS_GEN9_LP(dev_priv))
 		intel_encoder->pre_pll_enable = bxt_ddi_pre_pll_enable;
+	if (IS_ICELAKE(dev_priv))
+		intel_encoder->pre_pll_enable = icl_ddi_pre_pll_enable;

pre_pll_enable is set initialy in intel_crt_init() for most of the gens, maybe those 4 lines should be moved there but that can be done in another patch.

I think the crt_init() only has thecrt specific functions for DDI platforms like hsw_crt_compute_config() hsw_enable_crt() etc, all the other ddi function pointers are assigned in intel_ddi_init()

Quoted 23 lines
Quoted 23 lines
drivers/gpu/drm/i915/intel_ddi.c +0 -0
 	intel_encoder->pre_enable = intel_ddi_pre_enable;
 	intel_encoder->disable = intel_disable_ddi;
drivers/gpu/drm/i915/intel_ddi.c +0 -0
 	intel_encoder->post_disable = intel_ddi_post_disable;
drivers/gpu/drm/i915/intel_dp.c +7 -0
index 49a3149..6683cdc 100644
@@ -2127,6 +2127,26 @@ void intel_dp_set_link_params(struct intel_dp
 *intel_dp,
 	intel_dp->link_mst = link_mst;
 }
 
+void intel_dp_set_fia_lane_count(struct intel_dp *intel_dp)
+{
+	struct drm_device *dev = intel_dp_to_dev(intel_dp);
+	struct drm_i915_private *dev_priv = to_i915(dev);
+	struct intel_digital_port *intel_dig_port =
 dp_to_dig_port(intel_dp);
+	enum tc_port tc_port = intel_port_to_tc(dev_priv,
+						intel_dig_port-
 >base.port);
Quoted 8 lines

drivers/gpu/drm/i915/intel_dp.c void intel_dp_set_link_params(struct intel_dp *intel_dp, · line 2137

Quoted 1 line
drivers/gpu/drm/i915/intel_dp.c +1 -0
+	u8 lane_count = intel_dp_max_common_lane_count(intel_dp);

intel_dp->max_link_lane_count could be used instead as it is set on hotplug and don't change over time.

But I guess this is also wrong, it should not enable the max lane count, it should enable the number of the lanes that the driver decides that is enough to the mode set to save power.

So I should be using crtc_state->lane_count here because thats what is the optimum lane count computed in intel_dp_compute_config() for legacy DP connector.

In case of Type-C connector also, DFLEXDPSP only has the max lane count but the enable sequence says:

"Dynamic - Program the number of lanes as per DFLEXDPSP.DPX4TXLATC*"
Also really the statement in the enable sequence "Program DFLEXDPMLE.DPMLETC* to maximum number of lanes allowed as determined by FIA and panel lane count." This makes it confusing as to whether we should set this to max or just the optimum required for the mode.

Quoted 16 lines

drivers/gpu/drm/i915/intel_dp.c void intel_dp_set_link_params(struct intel_dp *intel_dp, · line 2146

Quoted 12 lines
drivers/gpu/drm/i915/intel_dp.c +3 -0
+	u32 val;
+
+	/* In case of legacy/static DP over Type-C port there is no

muxing

drivers/gpu/drm/i915/intel_dp.c +2 -0
+	 * with other controllers so this is set to max lane count.
+	 * In case of Type_C it is set to the DFLEXDPSP.DPX4TXLATC

value.

drivers/gpu/drm/i915/intel_dp.c +4 -0
+	 */
+	val = I915_READ(PORT_TX_DFLEXDPMLE1);
+	val &= ~DFLEXDPMLE1_DPMLETC_MASK(tc_port);
+	val |= DFLEXDPMLE1_DPMLETC(tc_port, lane_count);

this macro is wrong, each bit set maps to a lane, so to enable all 4 lanes it should 0xf for the first TC.

Quoted 9 lines

From spec:

For example, in DP Pin Assignment C, the register DFLEXDPSP1.DPX4TXLATC0 tells Display Driver that all the 4 TX Lane in PHY can be used. However, Display Driver may choose to use only x1, i.e. for ML0. Then Display Driver will program “0001b” to this register. For x2 and x4, Display Driver will program “0011b” and “1111b”, respectively.

Oh yes I realize now that there is no 1:1 mapping between lane count and the value set in ML register
Lane count 1 - Value = 1
Lane count = 2, value = 3
Lane count = 4, Value = 0xf

I will change that logic.

Manasi

Quoted 16 lines
Quoted 16 lines
drivers/gpu/drm/i915/intel_dp.c +3 -0
+	I915_WRITE(PORT_TX_DFLEXDPMLE1, val);
+}
+
 static void intel_dp_prepare(struct intel_encoder *encoder,
 			     const struct intel_crtc_state

*pipe_config)
{

drivers/gpu/drm/i915/intel_drv.h +0 -0
index 1ad7c11..d98cdb9 100644
@@ -1676,6 +1676,7 @@ bool intel_dp_init_connector(struct
 intel_digital_port *intel_dig_port,
 void intel_dp_set_link_params(struct intel_dp *intel_dp,
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/i915/intel_drv.h +1 -0
 			      int link_rate, uint8_t lane_count,
 			      bool link_mst);
+void intel_dp_set_fia_lane_count(struct intel_dp *intel_dp);
 int intel_dp_get_link_train_fallback_values(struct intel_dp
 *intel_dp,

int link_rate, uint8_t
lane_count);
void intel_dp_start_link_train(struct intel_dp *intel_dp);

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx