LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH v3 0/6] Add support for eDP controller on SC7280
@ 2021-10-28  1:54 Sankeerth Billakanti
  2021-10-28  1:54 ` [PATCH v3 1/6] dt-bindings: msm/dp: Add DP compatible strings for sc7280 Sankeerth Billakanti
                   ` (5 more replies)
  0 siblings, 6 replies; 14+ messages in thread
From: Sankeerth Billakanti @ 2021-10-28  1:54 UTC (permalink / raw)
  To: dri-devel, linux-arm-msm, freedreno, linux-kernel
  Cc: Sankeerth Billakanti, robdclark, seanpaul, swboyd, kalyan_t,
	abhinavk, dianders, khsieh, mkrishn, sbillaka

	This series will add eDP controller support for Qualcomm SC7280
platform. These patches are baseline changes with which we can enable
eDP display on sc7280. The sc7280 eDP controller driver can also support
additional features such as no_hpd detection, PSR, etc. which will be
enabled in subsequent patch series.

	This is based on Bjorn's changes in the below mentioned series
to support both eDP and DP programming through the same driver:
https://patchwork.kernel.org/project/linux-arm-msm/list/?series=564841

Sankeerth Billakanti (6):
  dt-bindings: msm/dp: Add DP compatible strings for sc7280
  drm/msm/dp: Add DP controllers for sc7280
  drm/dp: Add macro to check max_downspread capability
  drm/msm/dp: Enable downspread for supported DP sinks
  drm/msm/dp: Enable ASSR for supported DP sinks
  drm/msm/dp: Remove the hpd init delay for eDP

 .../bindings/display/msm/dp-controller.yaml        |  2 ++
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c     |  4 ++--
 drivers/gpu/drm/msm/dp/dp_ctrl.c                   | 23 +++++++++++++++++++---
 drivers/gpu/drm/msm/dp/dp_display.c                | 20 ++++++++++++++++++-
 include/drm/drm_dp_helper.h                        |  6 ++++++
 5 files changed, 49 insertions(+), 6 deletions(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH v3 1/6] dt-bindings: msm/dp: Add DP compatible strings for sc7280
  2021-10-28  1:54 [PATCH v3 0/6] Add support for eDP controller on SC7280 Sankeerth Billakanti
@ 2021-10-28  1:54 ` Sankeerth Billakanti
  2021-10-28  6:20   ` Stephen Boyd
  2021-10-28  1:54 ` [PATCH v3 2/6] drm/msm/dp: Add DP controllers " Sankeerth Billakanti
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 14+ messages in thread
From: Sankeerth Billakanti @ 2021-10-28  1:54 UTC (permalink / raw)
  To: dri-devel, linux-arm-msm, freedreno, linux-kernel
  Cc: Sankeerth Billakanti, robdclark, seanpaul, swboyd, kalyan_t,
	abhinavk, dianders, khsieh, mkrishn, Sankeerth Billakanti

From: Sankeerth Billakanti <sbillaka@codeaurora.org>

The Qualcomm SC7280 platform supports one eDP controller
and a DP controller. This change will add the compatible
string for both eDP and DP to msm dp-controller binding.

Signed-off-by: Sankeerth Billakanti <quic_sbillaka@quicinc.com>

changes in v3:
    - Modify the subject (Doug Anderson)
    - Add sc7280-dp also to the list (Stephen Boyd)

changes in v2:
    - Sort alphabetically (Stephen Boyd)
    - Cleanup residual stale changes in the patch (Matthias Kaehlcke)
    - Modify the subject (Doug Anderson)
---
 Documentation/devicetree/bindings/display/msm/dp-controller.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/display/msm/dp-controller.yaml b/Documentation/devicetree/bindings/display/msm/dp-controller.yaml
index 63e585f..5457612 100644
--- a/Documentation/devicetree/bindings/display/msm/dp-controller.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dp-controller.yaml
@@ -17,6 +17,8 @@ properties:
   compatible:
     enum:
       - qcom,sc7180-dp
+      - qcom,sc7280-dp
+      - qcom,sc7280-edp
       - qcom,sc8180x-dp
       - qcom,sc8180x-edp
 
-- 
2.7.4


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH v3 2/6] drm/msm/dp: Add DP controllers for sc7280
  2021-10-28  1:54 [PATCH v3 0/6] Add support for eDP controller on SC7280 Sankeerth Billakanti
  2021-10-28  1:54 ` [PATCH v3 1/6] dt-bindings: msm/dp: Add DP compatible strings for sc7280 Sankeerth Billakanti
@ 2021-10-28  1:54 ` Sankeerth Billakanti
  2021-10-28  6:21   ` Stephen Boyd
  2021-10-28  1:54 ` [PATCH v3 3/6] drm/dp: Add macro to check max_downspread capability Sankeerth Billakanti
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 14+ messages in thread
From: Sankeerth Billakanti @ 2021-10-28  1:54 UTC (permalink / raw)
  To: dri-devel, linux-arm-msm, freedreno, linux-kernel
  Cc: Sankeerth Billakanti, robdclark, seanpaul, swboyd, kalyan_t,
	abhinavk, dianders, khsieh, mkrishn, sbillaka

The eDP controller on SC7280 is similar to the eDP/DP controllers
supported by the current driver implementation.

SC7280 supports one EDP and one DP controller which can operate
concurrently.

This change adds the support for eDP and DP controller on sc7280.

Signed-off-by: Sankeerth Billakanti <quic_sbillaka@quicinc.com>

changes in v3:
    - Split into patches according to function (Dmitry Baryshkov)
    - Use DP_CONTROLLER_1 for eDP controller intf (Dmitry Baryshkov)
    - Use DP_CONTROLLER_0 for sc7280-dp (Dmitry Baryshkov)
    - Add macro in drm_helper.h for checking ssc capability (Stephen Boyd)
    - Use existing macro to check assr capability (Stephen Boyd)
    - Add comment for HPD_INIT_SETUP delay (Stephen Boyd)

changes in v2:
    - Don't initialize variables to 0 (Stephen Boyd)
    - Use const for read-only dpcd (Stephen Boyd)
    - Remove zero pixel clock check (Stephen Boyd)
    - Sort compatible strings alphabetically (Stephen Boyd)
    - Use pwm_bl.c for backlight instead of gpio (Stephen Boyd)
    - Change return type for functions returning always 0 (Matthias Kaehlcke)
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 4 ++--
 drivers/gpu/drm/msm/dp/dp_display.c            | 9 +++++++++
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
index ce6f32a..2b4dc9d 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
@@ -856,9 +856,9 @@ static const struct dpu_intf_cfg sm8150_intf[] = {
 };
 
 static const struct dpu_intf_cfg sc7280_intf[] = {
-	INTF_BLK("intf_0", INTF_0, 0x34000, INTF_DP, 0, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 24, 25),
+	INTF_BLK("intf_0", INTF_0, 0x34000, INTF_DP, MSM_DP_CONTROLLER_0, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 24, 25),
 	INTF_BLK("intf_1", INTF_1, 0x35000, INTF_DSI, 0, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 26, 27),
-	INTF_BLK("intf_5", INTF_5, 0x39000, INTF_EDP, 0, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 22, 23),
+	INTF_BLK("intf_5", INTF_5, 0x39000, INTF_DP, MSM_DP_CONTROLLER_1, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 22, 23),
 };
 
 /*************************************************************
diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c
index aba8aa4..61385d6 100644
--- a/drivers/gpu/drm/msm/dp/dp_display.c
+++ b/drivers/gpu/drm/msm/dp/dp_display.c
@@ -135,8 +135,17 @@ static const struct msm_dp_config sc7180_dp_cfg = {
 	.num_descs = 1,
 };
 
+static const struct msm_dp_config sc7280_dp_cfg = {
+	.descs = (const struct msm_dp_desc[]) {
+		[MSM_DP_CONTROLLER_0] =	{ .io_start = 0x0ae90000, .connector_type = DRM_MODE_CONNECTOR_DisplayPort },
+		[MSM_DP_CONTROLLER_1] =	{ .io_start = 0x0aea0000, .connector_type = DRM_MODE_CONNECTOR_eDP },
+	},
+	.num_descs = 2,
+};
+
 static const struct of_device_id dp_dt_match[] = {
 	{ .compatible = "qcom,sc7180-dp", .data = &sc7180_dp_cfg },
+	{ .compatible = "qcom,sc7280-edp", .data = &sc7280_dp_cfg },
 	{}
 };
 
-- 
2.7.4


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH v3 3/6] drm/dp: Add macro to check max_downspread capability
  2021-10-28  1:54 [PATCH v3 0/6] Add support for eDP controller on SC7280 Sankeerth Billakanti
  2021-10-28  1:54 ` [PATCH v3 1/6] dt-bindings: msm/dp: Add DP compatible strings for sc7280 Sankeerth Billakanti
  2021-10-28  1:54 ` [PATCH v3 2/6] drm/msm/dp: Add DP controllers " Sankeerth Billakanti
@ 2021-10-28  1:54 ` Sankeerth Billakanti
  2021-10-28  6:31   ` Stephen Boyd
  2021-10-28  1:54 ` [PATCH v3 4/6] drm/msm/dp: Enable downspread for supported DP sinks Sankeerth Billakanti
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 14+ messages in thread
From: Sankeerth Billakanti @ 2021-10-28  1:54 UTC (permalink / raw)
  To: dri-devel, linux-arm-msm, freedreno, linux-kernel
  Cc: Sankeerth Billakanti, robdclark, seanpaul, swboyd, kalyan_t,
	abhinavk, dianders, khsieh, mkrishn, sbillaka

Add a macro to check for the max_downspread capability in
drm_dp_helper.

Signed-off-by: Sankeerth Billakanti <quic_sbillaka@quicinc.com>
---
 include/drm/drm_dp_helper.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
index afdf7f4..b39e7a0 100644
--- a/include/drm/drm_dp_helper.h
+++ b/include/drm/drm_dp_helper.h
@@ -1784,6 +1784,12 @@ drm_dp_tps3_supported(const u8 dpcd[DP_RECEIVER_CAP_SIZE])
 }
 
 static inline bool
+drm_dp_max_downspread(const u8 dpcd[DP_RECEIVER_CAP_SIZE])
+{
+	return dpcd[DP_MAX_DOWNSPREAD] & DP_MAX_DOWNSPREAD_0_5;
+}
+
+static inline bool
 drm_dp_tps4_supported(const u8 dpcd[DP_RECEIVER_CAP_SIZE])
 {
 	return dpcd[DP_DPCD_REV] >= 0x14 &&
-- 
2.7.4


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH v3 4/6] drm/msm/dp: Enable downspread for supported DP sinks
  2021-10-28  1:54 [PATCH v3 0/6] Add support for eDP controller on SC7280 Sankeerth Billakanti
                   ` (2 preceding siblings ...)
  2021-10-28  1:54 ` [PATCH v3 3/6] drm/dp: Add macro to check max_downspread capability Sankeerth Billakanti
@ 2021-10-28  1:54 ` Sankeerth Billakanti
  2021-10-28  6:33   ` Stephen Boyd
  2021-10-28  1:54 ` [PATCH v3 5/6] drm/msm/dp: Enable ASSR " Sankeerth Billakanti
  2021-10-28  1:54 ` [PATCH v3 6/6] drm/msm/dp: Remove the hpd init delay for eDP Sankeerth Billakanti
  5 siblings, 1 reply; 14+ messages in thread
From: Sankeerth Billakanti @ 2021-10-28  1:54 UTC (permalink / raw)
  To: dri-devel, linux-arm-msm, freedreno, linux-kernel
  Cc: Sankeerth Billakanti, robdclark, seanpaul, swboyd, kalyan_t,
	abhinavk, dianders, khsieh, mkrishn, sbillaka

The sc7280 eDP sink that supports downspread will fail link training
if source does not enable SSC / downspread. This change will set the
downspread bit in the DP sink if supported and indicate SSC support
to the DP PHY driver.

Signed-off-by: Sankeerth Billakanti <quic_sbillaka@quicinc.com>
---
 drivers/gpu/drm/msm/dp/dp_ctrl.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/dp/dp_ctrl.c b/drivers/gpu/drm/msm/dp/dp_ctrl.c
index 62e75dc..a40e798 100644
--- a/drivers/gpu/drm/msm/dp/dp_ctrl.c
+++ b/drivers/gpu/drm/msm/dp/dp_ctrl.c
@@ -1228,7 +1228,9 @@ static int dp_ctrl_link_train(struct dp_ctrl_private *ctrl,
 			int *training_step)
 {
 	int ret = 0;
+	const u8 *dpcd = ctrl->panel->dpcd;
 	u8 encoding = DP_SET_ANSI_8B10B;
+	u8 ssc;
 	struct dp_link_info link_info = {0};
 
 	dp_ctrl_config_ctrl(ctrl);
@@ -1238,6 +1240,12 @@ static int dp_ctrl_link_train(struct dp_ctrl_private *ctrl,
 	link_info.capabilities = DP_LINK_CAP_ENHANCED_FRAMING;
 
 	dp_aux_link_configure(ctrl->aux, &link_info);
+
+	if (drm_dp_max_downspread(dpcd)) {
+		ssc = DP_SPREAD_AMP_0_5;
+		drm_dp_dpcd_write(ctrl->aux, DP_DOWNSPREAD_CTRL, &ssc, 1);
+	}
+
 	drm_dp_dpcd_write(ctrl->aux, DP_MAIN_LINK_CHANNEL_CODING_SET,
 				&encoding, 1);
 
@@ -1312,9 +1320,11 @@ static int dp_ctrl_enable_mainlink_clocks(struct dp_ctrl_private *ctrl)
 	struct dp_io *dp_io = &ctrl->parser->io;
 	struct phy *phy = dp_io->phy;
 	struct phy_configure_opts_dp *opts_dp = &dp_io->phy_opts.dp;
+	const u8 *dpcd = ctrl->panel->dpcd;
 
 	opts_dp->lanes = ctrl->link->link_params.num_lanes;
 	opts_dp->link_rate = ctrl->link->link_params.rate / 100;
+	opts_dp->ssc = drm_dp_max_downspread(dpcd);
 	dp_ctrl_set_clock_rate(ctrl, DP_CTRL_PM, "ctrl_link",
 					ctrl->link->link_params.rate * 1000);
 
@@ -1406,7 +1416,7 @@ void dp_ctrl_host_deinit(struct dp_ctrl *dp_ctrl)
 
 static bool dp_ctrl_use_fixed_nvid(struct dp_ctrl_private *ctrl)
 {
-	u8 *dpcd = ctrl->panel->dpcd;
+	const u8 *dpcd = ctrl->panel->dpcd;
 
 	/*
 	 * For better interop experience, used a fixed NVID=0x8000
-- 
2.7.4


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH v3 5/6] drm/msm/dp: Enable ASSR for supported DP sinks
  2021-10-28  1:54 [PATCH v3 0/6] Add support for eDP controller on SC7280 Sankeerth Billakanti
                   ` (3 preceding siblings ...)
  2021-10-28  1:54 ` [PATCH v3 4/6] drm/msm/dp: Enable downspread for supported DP sinks Sankeerth Billakanti
@ 2021-10-28  1:54 ` Sankeerth Billakanti
  2021-10-28  6:34   ` Stephen Boyd
  2021-10-28  1:54 ` [PATCH v3 6/6] drm/msm/dp: Remove the hpd init delay for eDP Sankeerth Billakanti
  5 siblings, 1 reply; 14+ messages in thread
From: Sankeerth Billakanti @ 2021-10-28  1:54 UTC (permalink / raw)
  To: dri-devel, linux-arm-msm, freedreno, linux-kernel
  Cc: Sankeerth Billakanti, robdclark, seanpaul, swboyd, kalyan_t,
	abhinavk, dianders, khsieh, mkrishn, sbillaka

The eDP sink on sc7280 supports ASSR and dp driver will
enable ASSR in the source hardware. The driver needs to
enable the ASSR field in the DPCD configuration register
to avoid screen corruption. This change will enable ASSR
if supported in the sink device.

Signed-off-by: Sankeerth Billakanti <quic_sbillaka@quicinc.com>
---
 drivers/gpu/drm/msm/dp/dp_ctrl.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/msm/dp/dp_ctrl.c b/drivers/gpu/drm/msm/dp/dp_ctrl.c
index a40e798..c724cb0 100644
--- a/drivers/gpu/drm/msm/dp/dp_ctrl.c
+++ b/drivers/gpu/drm/msm/dp/dp_ctrl.c
@@ -119,13 +119,13 @@ void dp_ctrl_push_idle(struct dp_ctrl *dp_ctrl)
 static void dp_ctrl_config_ctrl(struct dp_ctrl_private *ctrl)
 {
 	u32 config = 0, tbd;
-	u8 *dpcd = ctrl->panel->dpcd;
+	const u8 *dpcd = ctrl->panel->dpcd;
 
 	/* Default-> LSCLK DIV: 1/4 LCLK  */
 	config |= (2 << DP_CONFIGURATION_CTRL_LSCLK_DIV_SHIFT);
 
 	/* Scrambler reset enable */
-	if (dpcd[DP_EDP_CONFIGURATION_CAP] & DP_ALTERNATE_SCRAMBLER_RESET_CAP)
+	if (drm_dp_alternate_scrambler_reset_cap(dpcd))
 		config |= DP_CONFIGURATION_CTRL_ASSR;
 
 	tbd = dp_link_get_test_bits_depth(ctrl->link,
@@ -1231,6 +1231,7 @@ static int dp_ctrl_link_train(struct dp_ctrl_private *ctrl,
 	const u8 *dpcd = ctrl->panel->dpcd;
 	u8 encoding = DP_SET_ANSI_8B10B;
 	u8 ssc;
+	u8 assr;
 	struct dp_link_info link_info = {0};
 
 	dp_ctrl_config_ctrl(ctrl);
@@ -1249,6 +1250,12 @@ static int dp_ctrl_link_train(struct dp_ctrl_private *ctrl,
 	drm_dp_dpcd_write(ctrl->aux, DP_MAIN_LINK_CHANNEL_CODING_SET,
 				&encoding, 1);
 
+	if (drm_dp_alternate_scrambler_reset_cap(dpcd)) {
+		assr = DP_ALTERNATE_SCRAMBLER_RESET_ENABLE;
+		drm_dp_dpcd_write(ctrl->aux, DP_EDP_CONFIGURATION_SET,
+				&assr, 1);
+	}
+
 	ret = dp_ctrl_link_train_1(ctrl, training_step);
 	if (ret) {
 		DRM_ERROR("link training #1 failed. ret=%d\n", ret);
-- 
2.7.4


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH v3 6/6] drm/msm/dp: Remove the hpd init delay for eDP
  2021-10-28  1:54 [PATCH v3 0/6] Add support for eDP controller on SC7280 Sankeerth Billakanti
                   ` (4 preceding siblings ...)
  2021-10-28  1:54 ` [PATCH v3 5/6] drm/msm/dp: Enable ASSR " Sankeerth Billakanti
@ 2021-10-28  1:54 ` Sankeerth Billakanti
  2021-10-28  6:38   ` Stephen Boyd
  5 siblings, 1 reply; 14+ messages in thread
From: Sankeerth Billakanti @ 2021-10-28  1:54 UTC (permalink / raw)
  To: dri-devel, linux-arm-msm, freedreno, linux-kernel
  Cc: Sankeerth Billakanti, robdclark, seanpaul, swboyd, kalyan_t,
	abhinavk, dianders, khsieh, mkrishn, sbillaka

DP driver needs a 10 second delay before phy_init so that
the usb combo phy initializes and sets up the necessary
clocks for usb devices such as keyboard and mouse.

eDP controller uses a standalone phy and need not wait for
phy initialization from any other component. This change
will remove the delay for eDP controller.

Signed-off-by: Sankeerth Billakanti <quic_sbillaka@quicinc.com>
---
 drivers/gpu/drm/msm/dp/dp_display.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c
index 61385d6..de6a1fd 100644
--- a/drivers/gpu/drm/msm/dp/dp_display.c
+++ b/drivers/gpu/drm/msm/dp/dp_display.c
@@ -1430,6 +1430,7 @@ void __exit msm_dp_unregister(void)
 void msm_dp_irq_postinstall(struct msm_dp *dp_display)
 {
 	struct dp_display_private *dp;
+	u8 delay;
 
 	if (!dp_display)
 		return;
@@ -1438,7 +1439,15 @@ void msm_dp_irq_postinstall(struct msm_dp *dp_display)
 
 	dp_hpd_event_setup(dp);
 
-	dp_add_event(dp, EV_HPD_INIT_SETUP, 0, 100);
+	if (dp->dp_display.connector_type == DRM_MODE_CONNECTOR_eDP) {
+		/* eDP does not need any delay before phy init */
+		delay = 0;
+	} else {
+		/* DP needs 10 second delay to let usb combo phy initialize */
+		delay = 100;
+	}
+
+	dp_add_event(dp, EV_HPD_INIT_SETUP, 0, delay);
 }
 
 void msm_dp_debugfs_init(struct msm_dp *dp_display, struct drm_minor *minor)
-- 
2.7.4


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v3 1/6] dt-bindings: msm/dp: Add DP compatible strings for sc7280
  2021-10-28  1:54 ` [PATCH v3 1/6] dt-bindings: msm/dp: Add DP compatible strings for sc7280 Sankeerth Billakanti
@ 2021-10-28  6:20   ` Stephen Boyd
  0 siblings, 0 replies; 14+ messages in thread
From: Stephen Boyd @ 2021-10-28  6:20 UTC (permalink / raw)
  To: Sankeerth Billakanti, dri-devel, freedreno, linux-arm-msm, linux-kernel
  Cc: Sankeerth Billakanti, robdclark, seanpaul, kalyan_t, abhinavk,
	dianders, khsieh, mkrishn

Quoting Sankeerth Billakanti (2021-10-27 18:54:43)
> From: Sankeerth Billakanti <sbillaka@codeaurora.org>
>
> The Qualcomm SC7280 platform supports one eDP controller
> and a DP controller. This change will add the compatible
> string for both eDP and DP to msm dp-controller binding.
>
> Signed-off-by: Sankeerth Billakanti <quic_sbillaka@quicinc.com>
>
> changes in v3:
>     - Modify the subject (Doug Anderson)
>     - Add sc7280-dp also to the list (Stephen Boyd)
>
> changes in v2:
>     - Sort alphabetically (Stephen Boyd)
>     - Cleanup residual stale changes in the patch (Matthias Kaehlcke)
>     - Modify the subject (Doug Anderson)
> ---

Reviewed-by: Stephen Boyd <swboyd@chromium.org>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v3 2/6] drm/msm/dp: Add DP controllers for sc7280
  2021-10-28  1:54 ` [PATCH v3 2/6] drm/msm/dp: Add DP controllers " Sankeerth Billakanti
@ 2021-10-28  6:21   ` Stephen Boyd
  0 siblings, 0 replies; 14+ messages in thread
From: Stephen Boyd @ 2021-10-28  6:21 UTC (permalink / raw)
  To: Sankeerth Billakanti, dri-devel, freedreno, linux-arm-msm, linux-kernel
  Cc: robdclark, seanpaul, kalyan_t, abhinavk, dianders, khsieh,
	mkrishn, sbillaka

Quoting Sankeerth Billakanti (2021-10-27 18:54:44)
> The eDP controller on SC7280 is similar to the eDP/DP controllers
> supported by the current driver implementation.
>
> SC7280 supports one EDP and one DP controller which can operate
> concurrently.
>
> This change adds the support for eDP and DP controller on sc7280.
>
> Signed-off-by: Sankeerth Billakanti <quic_sbillaka@quicinc.com>
>
> changes in v3:
>     - Split into patches according to function (Dmitry Baryshkov)
>     - Use DP_CONTROLLER_1 for eDP controller intf (Dmitry Baryshkov)
>     - Use DP_CONTROLLER_0 for sc7280-dp (Dmitry Baryshkov)
>     - Add macro in drm_helper.h for checking ssc capability (Stephen Boyd)
>     - Use existing macro to check assr capability (Stephen Boyd)
>     - Add comment for HPD_INIT_SETUP delay (Stephen Boyd)
>
> changes in v2:
>     - Don't initialize variables to 0 (Stephen Boyd)
>     - Use const for read-only dpcd (Stephen Boyd)
>     - Remove zero pixel clock check (Stephen Boyd)
>     - Sort compatible strings alphabetically (Stephen Boyd)
>     - Use pwm_bl.c for backlight instead of gpio (Stephen Boyd)
>     - Change return type for functions returning always 0 (Matthias Kaehlcke)
> ---

Reviewed-by: Stephen Boyd <swboyd@chromium.org>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v3 3/6] drm/dp: Add macro to check max_downspread capability
  2021-10-28  1:54 ` [PATCH v3 3/6] drm/dp: Add macro to check max_downspread capability Sankeerth Billakanti
@ 2021-10-28  6:31   ` Stephen Boyd
  0 siblings, 0 replies; 14+ messages in thread
From: Stephen Boyd @ 2021-10-28  6:31 UTC (permalink / raw)
  To: Sankeerth Billakanti, dri-devel, freedreno, linux-arm-msm, linux-kernel
  Cc: robdclark, seanpaul, kalyan_t, abhinavk, dianders, khsieh,
	mkrishn, sbillaka

Quoting Sankeerth Billakanti (2021-10-27 18:54:45)
> Add a macro to check for the max_downspread capability in
> drm_dp_helper.
>
> Signed-off-by: Sankeerth Billakanti <quic_sbillaka@quicinc.com>
> ---

Looks OK to me. One question below

Reviewed-by: Stephen Boyd <swboyd@chromium.org>

>  include/drm/drm_dp_helper.h | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
> index afdf7f4..b39e7a0 100644
> --- a/include/drm/drm_dp_helper.h
> +++ b/include/drm/drm_dp_helper.h
> @@ -1784,6 +1784,12 @@ drm_dp_tps3_supported(const u8 dpcd[DP_RECEIVER_CAP_SIZE])
>  }
>
>  static inline bool
> +drm_dp_max_downspread(const u8 dpcd[DP_RECEIVER_CAP_SIZE])
> +{
> +       return dpcd[DP_MAX_DOWNSPREAD] & DP_MAX_DOWNSPREAD_0_5;

Does it need a dpcd[DP_DPCD_REV] >= 0x11 check? Reading the spec I think
the answer may be that we check for 1.1 and always return 1 if so just
to make sure devices don't break the spec and put a 0 here when they're
rev is >= v1.1?

> +}
> +
> +static inline bool
>  drm_dp_tps4_supported(const u8 dpcd[DP_RECEIVER_CAP_SIZE])
>  {
>         return dpcd[DP_DPCD_REV] >= 0x14 &&

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v3 4/6] drm/msm/dp: Enable downspread for supported DP sinks
  2021-10-28  1:54 ` [PATCH v3 4/6] drm/msm/dp: Enable downspread for supported DP sinks Sankeerth Billakanti
@ 2021-10-28  6:33   ` Stephen Boyd
  0 siblings, 0 replies; 14+ messages in thread
From: Stephen Boyd @ 2021-10-28  6:33 UTC (permalink / raw)
  To: Sankeerth Billakanti, dri-devel, freedreno, linux-arm-msm, linux-kernel
  Cc: robdclark, seanpaul, kalyan_t, abhinavk, dianders, khsieh,
	mkrishn, sbillaka

Quoting Sankeerth Billakanti (2021-10-27 18:54:46)
> The sc7280 eDP sink that supports downspread will fail link training
> if source does not enable SSC / downspread. This change will set the
> downspread bit in the DP sink if supported and indicate SSC support
> to the DP PHY driver.
>
> Signed-off-by: Sankeerth Billakanti <quic_sbillaka@quicinc.com>
> ---

Reviewed-by: Stephen Boyd <swboyd@chromium.org>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v3 5/6] drm/msm/dp: Enable ASSR for supported DP sinks
  2021-10-28  1:54 ` [PATCH v3 5/6] drm/msm/dp: Enable ASSR " Sankeerth Billakanti
@ 2021-10-28  6:34   ` Stephen Boyd
  0 siblings, 0 replies; 14+ messages in thread
From: Stephen Boyd @ 2021-10-28  6:34 UTC (permalink / raw)
  To: Sankeerth Billakanti, dri-devel, freedreno, linux-arm-msm, linux-kernel
  Cc: robdclark, seanpaul, kalyan_t, abhinavk, dianders, khsieh,
	mkrishn, sbillaka

Quoting Sankeerth Billakanti (2021-10-27 18:54:47)
> The eDP sink on sc7280 supports ASSR and dp driver will
> enable ASSR in the source hardware. The driver needs to
> enable the ASSR field in the DPCD configuration register
> to avoid screen corruption. This change will enable ASSR
> if supported in the sink device.
>
> Signed-off-by: Sankeerth Billakanti <quic_sbillaka@quicinc.com>
> ---

Reviewed-by: Stephen Boyd <swboyd@chromium.org>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v3 6/6] drm/msm/dp: Remove the hpd init delay for eDP
  2021-10-28  1:54 ` [PATCH v3 6/6] drm/msm/dp: Remove the hpd init delay for eDP Sankeerth Billakanti
@ 2021-10-28  6:38   ` Stephen Boyd
  2021-10-29 17:20     ` khsieh
  0 siblings, 1 reply; 14+ messages in thread
From: Stephen Boyd @ 2021-10-28  6:38 UTC (permalink / raw)
  To: Sankeerth Billakanti, dri-devel, freedreno, linux-arm-msm, linux-kernel
  Cc: robdclark, seanpaul, kalyan_t, abhinavk, dianders, khsieh,
	mkrishn, sbillaka

Quoting Sankeerth Billakanti (2021-10-27 18:54:48)
> DP driver needs a 10 second delay before phy_init so that
> the usb combo phy initializes and sets up the necessary
> clocks for usb devices such as keyboard and mouse.
>
> eDP controller uses a standalone phy and need not wait for
> phy initialization from any other component. This change
> will remove the delay for eDP controller.
>
> Signed-off-by: Sankeerth Billakanti <quic_sbillaka@quicinc.com>
> ---
>  drivers/gpu/drm/msm/dp/dp_display.c | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c
> index 61385d6..de6a1fd 100644
> --- a/drivers/gpu/drm/msm/dp/dp_display.c
> +++ b/drivers/gpu/drm/msm/dp/dp_display.c
> @@ -1438,7 +1439,15 @@ void msm_dp_irq_postinstall(struct msm_dp *dp_display)
>
>         dp_hpd_event_setup(dp);
>
> -       dp_add_event(dp, EV_HPD_INIT_SETUP, 0, 100);
> +       if (dp->dp_display.connector_type == DRM_MODE_CONNECTOR_eDP) {
> +               /* eDP does not need any delay before phy init */
> +               delay = 0;
> +       } else {
> +               /* DP needs 10 second delay to let usb combo phy initialize */

This seems to be a different approach to the patch Kuogee sent a week or
two ago. Can we figure out what's wrong with the DP phy starting before
the USB phy? I suppose this patch is OK as a temporary hack to keep
moving with eDP, but we really need to figure out what's wrong with DP
so this delay can be removed entirely. Has any progress been made on
that?

> +               delay = 100;
> +       }
> +
> +       dp_add_event(dp, EV_HPD_INIT_SETUP, 0, delay);

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v3 6/6] drm/msm/dp: Remove the hpd init delay for eDP
  2021-10-28  6:38   ` Stephen Boyd
@ 2021-10-29 17:20     ` khsieh
  0 siblings, 0 replies; 14+ messages in thread
From: khsieh @ 2021-10-29 17:20 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Sankeerth Billakanti, dri-devel, freedreno, linux-arm-msm,
	linux-kernel, robdclark, seanpaul, kalyan_t, abhinavk, dianders,
	mkrishn, sbillaka

On 2021-10-27 23:38, Stephen Boyd wrote:
> Quoting Sankeerth Billakanti (2021-10-27 18:54:48)
>> DP driver needs a 10 second delay before phy_init so that
>> the usb combo phy initializes and sets up the necessary
>> clocks for usb devices such as keyboard and mouse.
>> 
>> eDP controller uses a standalone phy and need not wait for
>> phy initialization from any other component. This change
>> will remove the delay for eDP controller.
>> 
>> Signed-off-by: Sankeerth Billakanti <quic_sbillaka@quicinc.com>
>> ---
>>  drivers/gpu/drm/msm/dp/dp_display.c | 11 ++++++++++-
>>  1 file changed, 10 insertions(+), 1 deletion(-)
>> 
>> diff --git a/drivers/gpu/drm/msm/dp/dp_display.c 
>> b/drivers/gpu/drm/msm/dp/dp_display.c
>> index 61385d6..de6a1fd 100644
>> --- a/drivers/gpu/drm/msm/dp/dp_display.c
>> +++ b/drivers/gpu/drm/msm/dp/dp_display.c
>> @@ -1438,7 +1439,15 @@ void msm_dp_irq_postinstall(struct msm_dp 
>> *dp_display)
>> 
>>         dp_hpd_event_setup(dp);
>> 
>> -       dp_add_event(dp, EV_HPD_INIT_SETUP, 0, 100);
>> +       if (dp->dp_display.connector_type == DRM_MODE_CONNECTOR_eDP) {
>> +               /* eDP does not need any delay before phy init */
>> +               delay = 0;
>> +       } else {
>> +               /* DP needs 10 second delay to let usb combo phy 
>> initialize */
> 
> This seems to be a different approach to the patch Kuogee sent a week 
> or
> two ago. Can we figure out what's wrong with the DP phy starting before
> the USB phy? I suppose this patch is OK as a temporary hack to keep
> moving with eDP, but we really need to figure out what's wrong with DP
> so this delay can be removed entirely. Has any progress been made on
> that?
> 
Sankeerth,
Can you drop this patch for now.
Let's discuss more.

>> +               delay = 100;
>> +       }
>> +
>> +       dp_add_event(dp, EV_HPD_INIT_SETUP, 0, delay);

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-10-29 17:20 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-28  1:54 [PATCH v3 0/6] Add support for eDP controller on SC7280 Sankeerth Billakanti
2021-10-28  1:54 ` [PATCH v3 1/6] dt-bindings: msm/dp: Add DP compatible strings for sc7280 Sankeerth Billakanti
2021-10-28  6:20   ` Stephen Boyd
2021-10-28  1:54 ` [PATCH v3 2/6] drm/msm/dp: Add DP controllers " Sankeerth Billakanti
2021-10-28  6:21   ` Stephen Boyd
2021-10-28  1:54 ` [PATCH v3 3/6] drm/dp: Add macro to check max_downspread capability Sankeerth Billakanti
2021-10-28  6:31   ` Stephen Boyd
2021-10-28  1:54 ` [PATCH v3 4/6] drm/msm/dp: Enable downspread for supported DP sinks Sankeerth Billakanti
2021-10-28  6:33   ` Stephen Boyd
2021-10-28  1:54 ` [PATCH v3 5/6] drm/msm/dp: Enable ASSR " Sankeerth Billakanti
2021-10-28  6:34   ` Stephen Boyd
2021-10-28  1:54 ` [PATCH v3 6/6] drm/msm/dp: Remove the hpd init delay for eDP Sankeerth Billakanti
2021-10-28  6:38   ` Stephen Boyd
2021-10-29 17:20     ` khsieh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).