dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/7] drm/msm/dpu: add support for independent DSI config
@ 2021-07-17 12:40 Dmitry Baryshkov
  2021-07-17 12:40 ` [PATCH v4 1/7] drm/msm/dsi: rename dual DSI to bonded DSI Dmitry Baryshkov
                   ` (6 more replies)
  0 siblings, 7 replies; 16+ messages in thread
From: Dmitry Baryshkov @ 2021-07-17 12:40 UTC (permalink / raw)
  To: Bjorn Andersson, Rob Clark, Sean Paul, Abhinav Kumar
  Cc: Jonathan Marek, Stephen Boyd, linux-arm-msm, dri-devel,
	David Airlie, freedreno

This patchseries adds support for independent DSI config to DPU1 display
subdriver. Also drop one of msm_kms_funcs callbacks, made unnecessary
now.

Tested on RB5 (dpu, dsi). Previous iteration was tested by Alexey
Minnekhanov.

Changes since v3:
 - Fix missing semicolon in the msm_dsi_is_master_dsi() stub as noted by
   the kernel test robot

Changes since v2:
 - Removed Reviewed-By tags from changed patches (1, 2)
 - Changed more dual DSI mentions in the patch 1
 - Added msm_dsi_is_master_dsi() helper
 - Rewrote dsi encoder setup function again basing on review by Abhinav

Cahanges since v1:
 - Rewrote dsi encoder setup function by separating common code sequence
   and calling it either for the bonded interface or twice for each of
   the DSI hosts.

Changes since RFC:
 - renamed dual DSI to bonded DSI as suggsted by Abhinav
 - added comments to _dpu_kms_initialize_dsi() regarding encoders usage


The following changes since commit e88bbc91849b2bf57683119c339e52916d34433f:

  Revert "drm/msm/mdp5: provide dynamic bandwidth management" (2021-06-23 14:06:20 -0700)

are available in the Git repository at:

  https://git.linaro.org/people/dmitry.baryshkov/kernel.git msm-drm-drop-set-encoder-mode-4

for you to fetch changes up to 75dcb396a3230046f5967bd7363d6b8cab0bf743:

  drm/msm/kms: drop set_encoder_mode callback (2021-07-17 15:36:41 +0300)

----------------------------------------------------------------
Dmitry Baryshkov (7):
      drm/msm/dsi: rename dual DSI to bonded DSI
      drm/msm/dsi: add three helper functions
      drm/msm/dpu: support setting up two independent DSI connectors
      drm/msm/mdp5: move mdp5_encoder_set_intf_mode after msm_dsi_modeset_init
      drm/msm/dp: stop calling set_encoder_mode callback
      drm/msm/dsi: stop calling set_encoder_mode callback
      drm/msm/kms: drop set_encoder_mode callback

 drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c    | 102 ++++++++++++----------
 drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c   |   2 +-
 drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c   |  11 +--
 drivers/gpu/drm/msm/dp/dp_display.c        |  18 ----
 drivers/gpu/drm/msm/dsi/dsi.c              |   9 +-
 drivers/gpu/drm/msm/dsi/dsi.h              |   9 +-
 drivers/gpu/drm/msm/dsi/dsi_cfg.h          |   2 +-
 drivers/gpu/drm/msm/dsi/dsi_host.c         |  34 ++++----
 drivers/gpu/drm/msm/dsi/dsi_manager.c      | 130 +++++++++++++----------------
 drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c |   2 +-
 drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c |   6 +-
 drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c  |   2 +-
 drivers/gpu/drm/msm/msm_drv.h              |  17 +++-
 drivers/gpu/drm/msm/msm_kms.h              |   3 -
 14 files changed, 170 insertions(+), 177 deletions(-)




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

* [PATCH v4 1/7] drm/msm/dsi: rename dual DSI to bonded DSI
  2021-07-17 12:40 [PATCH v4 0/7] drm/msm/dpu: add support for independent DSI config Dmitry Baryshkov
@ 2021-07-17 12:40 ` Dmitry Baryshkov
  2021-07-23  3:07   ` Bjorn Andersson
  2021-07-17 12:40 ` [PATCH v4 2/7] drm/msm/dsi: add three helper functions Dmitry Baryshkov
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 16+ messages in thread
From: Dmitry Baryshkov @ 2021-07-17 12:40 UTC (permalink / raw)
  To: Bjorn Andersson, Rob Clark, Sean Paul, Abhinav Kumar
  Cc: Jonathan Marek, Stephen Boyd, linux-arm-msm, dri-devel,
	David Airlie, freedreno

We are preparing to support two independent DSI hosts in the DSI/DPU
code. To remove possible confusion (as both configurations can be
referenced as dual DSI) let's rename old "dual DSI" (two DSI hosts
driving single device, with clocks being locked) to "bonded DSI".

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org>
---
 drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c   |   2 +-
 drivers/gpu/drm/msm/dsi/dsi.h              |   8 +-
 drivers/gpu/drm/msm/dsi/dsi_cfg.h          |   2 +-
 drivers/gpu/drm/msm/dsi/dsi_host.c         |  34 +++----
 drivers/gpu/drm/msm/dsi/dsi_manager.c      | 101 ++++++++++-----------
 drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c |   2 +-
 drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c |   6 +-
 drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c  |   2 +-
 8 files changed, 78 insertions(+), 79 deletions(-)

diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c
index 81b0c7cf954e..1220f2b20e05 100644
--- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c
+++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c
@@ -737,7 +737,7 @@ struct mdp5_ctl_manager *mdp5_ctlm_init(struct drm_device *dev,
 	}
 
 	/*
-	 * In Dual DSI case, CTL0 and CTL1 are always assigned to two DSI
+	 * In bonded DSI case, CTL0 and CTL1 are always assigned to two DSI
 	 * interfaces to support single FLUSH feature (Flush CTL0 and CTL1 when
 	 * only write into CTL0's FLUSH register) to keep two DSI pipes in sync.
 	 * Single FLUSH is supported from hw rev v3.0.
diff --git a/drivers/gpu/drm/msm/dsi/dsi.h b/drivers/gpu/drm/msm/dsi/dsi.h
index 9b8e9b07eced..856a532850c0 100644
--- a/drivers/gpu/drm/msm/dsi/dsi.h
+++ b/drivers/gpu/drm/msm/dsi/dsi.h
@@ -109,7 +109,7 @@ int msm_dsi_host_enable(struct mipi_dsi_host *host);
 int msm_dsi_host_disable(struct mipi_dsi_host *host);
 int msm_dsi_host_power_on(struct mipi_dsi_host *host,
 			struct msm_dsi_phy_shared_timings *phy_shared_timings,
-			bool is_dual_dsi);
+			bool is_bonded_dsi);
 int msm_dsi_host_power_off(struct mipi_dsi_host *host);
 int msm_dsi_host_set_display_mode(struct mipi_dsi_host *host,
 				  const struct drm_display_mode *mode);
@@ -123,7 +123,7 @@ int msm_dsi_host_set_src_pll(struct mipi_dsi_host *host,
 void msm_dsi_host_reset_phy(struct mipi_dsi_host *host);
 void msm_dsi_host_get_phy_clk_req(struct mipi_dsi_host *host,
 	struct msm_dsi_phy_clk_request *clk_req,
-	bool is_dual_dsi);
+	bool is_bonded_dsi);
 void msm_dsi_host_destroy(struct mipi_dsi_host *host);
 int msm_dsi_host_modeset_init(struct mipi_dsi_host *host,
 					struct drm_device *dev);
@@ -145,8 +145,8 @@ int dsi_dma_base_get_6g(struct msm_dsi_host *msm_host, uint64_t *iova);
 int dsi_dma_base_get_v2(struct msm_dsi_host *msm_host, uint64_t *iova);
 int dsi_clk_init_v2(struct msm_dsi_host *msm_host);
 int dsi_clk_init_6g_v2(struct msm_dsi_host *msm_host);
-int dsi_calc_clk_rate_v2(struct msm_dsi_host *msm_host, bool is_dual_dsi);
-int dsi_calc_clk_rate_6g(struct msm_dsi_host *msm_host, bool is_dual_dsi);
+int dsi_calc_clk_rate_v2(struct msm_dsi_host *msm_host, bool is_bonded_dsi);
+int dsi_calc_clk_rate_6g(struct msm_dsi_host *msm_host, bool is_bonded_dsi);
 void msm_dsi_host_snapshot(struct msm_disp_state *disp_state, struct mipi_dsi_host *host);
 /* dsi phy */
 struct msm_dsi_phy;
diff --git a/drivers/gpu/drm/msm/dsi/dsi_cfg.h b/drivers/gpu/drm/msm/dsi/dsi_cfg.h
index ade9b609c7d9..2bce00d5a9fc 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_cfg.h
+++ b/drivers/gpu/drm/msm/dsi/dsi_cfg.h
@@ -47,7 +47,7 @@ struct msm_dsi_host_cfg_ops {
 	void* (*tx_buf_get)(struct msm_dsi_host *msm_host);
 	void (*tx_buf_put)(struct msm_dsi_host *msm_host);
 	int (*dma_base_get)(struct msm_dsi_host *msm_host, uint64_t *iova);
-	int (*calc_clk_rate)(struct msm_dsi_host *msm_host, bool is_dual_dsi);
+	int (*calc_clk_rate)(struct msm_dsi_host *msm_host, bool is_bonded_dsi);
 };
 
 struct msm_dsi_cfg_handler {
diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
index ed504fe5074f..706634d766ee 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_host.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
@@ -679,7 +679,7 @@ void dsi_link_clk_disable_v2(struct msm_dsi_host *msm_host)
 	clk_disable_unprepare(msm_host->byte_clk);
 }
 
-static u32 dsi_get_pclk_rate(struct msm_dsi_host *msm_host, bool is_dual_dsi)
+static u32 dsi_get_pclk_rate(struct msm_dsi_host *msm_host, bool is_bonded_dsi)
 {
 	struct drm_display_mode *mode = msm_host->mode;
 	u32 pclk_rate;
@@ -687,22 +687,22 @@ static u32 dsi_get_pclk_rate(struct msm_dsi_host *msm_host, bool is_dual_dsi)
 	pclk_rate = mode->clock * 1000;
 
 	/*
-	 * For dual DSI mode, the current DRM mode has the complete width of the
+	 * For bonded DSI mode, the current DRM mode has the complete width of the
 	 * panel. Since, the complete panel is driven by two DSI controllers,
 	 * the clock rates have to be split between the two dsi controllers.
 	 * Adjust the byte and pixel clock rates for each dsi host accordingly.
 	 */
-	if (is_dual_dsi)
+	if (is_bonded_dsi)
 		pclk_rate /= 2;
 
 	return pclk_rate;
 }
 
-static void dsi_calc_pclk(struct msm_dsi_host *msm_host, bool is_dual_dsi)
+static void dsi_calc_pclk(struct msm_dsi_host *msm_host, bool is_bonded_dsi)
 {
 	u8 lanes = msm_host->lanes;
 	u32 bpp = dsi_get_bpp(msm_host->format);
-	u32 pclk_rate = dsi_get_pclk_rate(msm_host, is_dual_dsi);
+	u32 pclk_rate = dsi_get_pclk_rate(msm_host, is_bonded_dsi);
 	u64 pclk_bpp = (u64)pclk_rate * bpp;
 
 	if (lanes == 0) {
@@ -720,28 +720,28 @@ static void dsi_calc_pclk(struct msm_dsi_host *msm_host, bool is_dual_dsi)
 
 }
 
-int dsi_calc_clk_rate_6g(struct msm_dsi_host *msm_host, bool is_dual_dsi)
+int dsi_calc_clk_rate_6g(struct msm_dsi_host *msm_host, bool is_bonded_dsi)
 {
 	if (!msm_host->mode) {
 		pr_err("%s: mode not set\n", __func__);
 		return -EINVAL;
 	}
 
-	dsi_calc_pclk(msm_host, is_dual_dsi);
+	dsi_calc_pclk(msm_host, is_bonded_dsi);
 	msm_host->esc_clk_rate = clk_get_rate(msm_host->esc_clk);
 	return 0;
 }
 
-int dsi_calc_clk_rate_v2(struct msm_dsi_host *msm_host, bool is_dual_dsi)
+int dsi_calc_clk_rate_v2(struct msm_dsi_host *msm_host, bool is_bonded_dsi)
 {
 	u32 bpp = dsi_get_bpp(msm_host->format);
 	u64 pclk_bpp;
 	unsigned int esc_mhz, esc_div;
 	unsigned long byte_mhz;
 
-	dsi_calc_pclk(msm_host, is_dual_dsi);
+	dsi_calc_pclk(msm_host, is_bonded_dsi);
 
-	pclk_bpp = (u64)dsi_get_pclk_rate(msm_host, is_dual_dsi) * bpp;
+	pclk_bpp = (u64)dsi_get_pclk_rate(msm_host, is_bonded_dsi) * bpp;
 	do_div(pclk_bpp, 8);
 	msm_host->src_clk_rate = pclk_bpp;
 
@@ -938,7 +938,7 @@ static void dsi_ctrl_config(struct msm_dsi_host *msm_host, bool enable,
 	dsi_write(msm_host, REG_DSI_CTRL, data);
 }
 
-static void dsi_timing_setup(struct msm_dsi_host *msm_host, bool is_dual_dsi)
+static void dsi_timing_setup(struct msm_dsi_host *msm_host, bool is_bonded_dsi)
 {
 	struct drm_display_mode *mode = msm_host->mode;
 	u32 hs_start = 0, vs_start = 0; /* take sync start as 0 */
@@ -956,13 +956,13 @@ static void dsi_timing_setup(struct msm_dsi_host *msm_host, bool is_dual_dsi)
 	DBG("");
 
 	/*
-	 * For dual DSI mode, the current DRM mode has
+	 * For bonded DSI mode, the current DRM mode has
 	 * the complete width of the panel. Since, the complete
 	 * panel is driven by two DSI controllers, the horizontal
 	 * timings have to be split between the two dsi controllers.
 	 * Adjust the DSI host timing values accordingly.
 	 */
-	if (is_dual_dsi) {
+	if (is_bonded_dsi) {
 		h_total /= 2;
 		hs_end /= 2;
 		ha_start /= 2;
@@ -2285,13 +2285,13 @@ void msm_dsi_host_reset_phy(struct mipi_dsi_host *host)
 
 void msm_dsi_host_get_phy_clk_req(struct mipi_dsi_host *host,
 			struct msm_dsi_phy_clk_request *clk_req,
-			bool is_dual_dsi)
+			bool is_bonded_dsi)
 {
 	struct msm_dsi_host *msm_host = to_msm_dsi_host(host);
 	const struct msm_dsi_cfg_handler *cfg_hnd = msm_host->cfg_hnd;
 	int ret;
 
-	ret = cfg_hnd->ops->calc_clk_rate(msm_host, is_dual_dsi);
+	ret = cfg_hnd->ops->calc_clk_rate(msm_host, is_bonded_dsi);
 	if (ret) {
 		pr_err("%s: unable to calc clk rate, %d\n", __func__, ret);
 		return;
@@ -2354,7 +2354,7 @@ static void msm_dsi_sfpb_config(struct msm_dsi_host *msm_host, bool enable)
 
 int msm_dsi_host_power_on(struct mipi_dsi_host *host,
 			struct msm_dsi_phy_shared_timings *phy_shared_timings,
-			bool is_dual_dsi)
+			bool is_bonded_dsi)
 {
 	struct msm_dsi_host *msm_host = to_msm_dsi_host(host);
 	const struct msm_dsi_cfg_handler *cfg_hnd = msm_host->cfg_hnd;
@@ -2392,7 +2392,7 @@ int msm_dsi_host_power_on(struct mipi_dsi_host *host,
 		goto fail_disable_clk;
 	}
 
-	dsi_timing_setup(msm_host, is_dual_dsi);
+	dsi_timing_setup(msm_host, is_bonded_dsi);
 	dsi_sw_reset(msm_host);
 	dsi_ctrl_config(msm_host, true, phy_shared_timings);
 
diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c
index 4ebfedc4a9ac..b20645ab279b 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_manager.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c
@@ -21,14 +21,14 @@
 struct msm_dsi_manager {
 	struct msm_dsi *dsi[DSI_MAX];
 
-	bool is_dual_dsi;
+	bool is_bonded_dsi;
 	bool is_sync_needed;
 	int master_dsi_link_id;
 };
 
 static struct msm_dsi_manager msm_dsim_glb;
 
-#define IS_DUAL_DSI()		(msm_dsim_glb.is_dual_dsi)
+#define IS_BONDED_DSI()		(msm_dsim_glb.is_bonded_dsi)
 #define IS_SYNC_NEEDED()	(msm_dsim_glb.is_sync_needed)
 #define IS_MASTER_DSI_LINK(id)	(msm_dsim_glb.master_dsi_link_id == id)
 
@@ -42,18 +42,17 @@ static inline struct msm_dsi *dsi_mgr_get_other_dsi(int id)
 	return msm_dsim_glb.dsi[(id + 1) % DSI_MAX];
 }
 
-static int dsi_mgr_parse_dual_dsi(struct device_node *np, int id)
+static int dsi_mgr_parse_of(struct device_node *np, int id)
 {
 	struct msm_dsi_manager *msm_dsim = &msm_dsim_glb;
 
-	/* We assume 2 dsi nodes have the same information of dual-dsi and
-	 * sync-mode, and only one node specifies master in case of dual mode.
+	/* We assume 2 dsi nodes have the same information of bonded dsi and
+	 * sync-mode, and only one node specifies master in case of bonded mode.
 	 */
-	if (!msm_dsim->is_dual_dsi)
-		msm_dsim->is_dual_dsi = of_property_read_bool(
-						np, "qcom,dual-dsi-mode");
+	if (!msm_dsim->is_bonded_dsi)
+		msm_dsim->is_bonded_dsi = of_property_read_bool(np, "qcom,dual-dsi-mode");
 
-	if (msm_dsim->is_dual_dsi) {
+	if (msm_dsim->is_bonded_dsi) {
 		if (of_property_read_bool(np, "qcom,master-dsi"))
 			msm_dsim->master_dsi_link_id = id;
 		if (!msm_dsim->is_sync_needed)
@@ -72,7 +71,7 @@ static int dsi_mgr_setup_components(int id)
 	struct msm_dsi *clk_slave_dsi = dsi_mgr_get_dsi(DSI_CLOCK_SLAVE);
 	int ret;
 
-	if (!IS_DUAL_DSI()) {
+	if (!IS_BONDED_DSI()) {
 		ret = msm_dsi_host_register(msm_dsi->host, true);
 		if (ret)
 			return ret;
@@ -100,7 +99,7 @@ static int dsi_mgr_setup_components(int id)
 		if (ret)
 			return ret;
 
-		/* PLL0 is to drive both 2 DSI link clocks in Dual DSI mode. */
+		/* PLL0 is to drive both 2 DSI link clocks in bonded DSI mode. */
 		msm_dsi_phy_set_usecase(clk_master_dsi->phy,
 					MSM_DSI_PHY_MASTER);
 		msm_dsi_phy_set_usecase(clk_slave_dsi->phy,
@@ -119,9 +118,9 @@ static int enable_phy(struct msm_dsi *msm_dsi,
 {
 	struct msm_dsi_phy_clk_request clk_req;
 	int ret;
-	bool is_dual_dsi = IS_DUAL_DSI();
+	bool is_bonded_dsi = IS_BONDED_DSI();
 
-	msm_dsi_host_get_phy_clk_req(msm_dsi->host, &clk_req, is_dual_dsi);
+	msm_dsi_host_get_phy_clk_req(msm_dsi->host, &clk_req, is_bonded_dsi);
 
 	ret = msm_dsi_phy_enable(msm_dsi->phy, &clk_req);
 	msm_dsi_phy_get_shared_timings(msm_dsi->phy, shared_timings);
@@ -138,12 +137,12 @@ dsi_mgr_phy_enable(int id,
 	struct msm_dsi *sdsi = dsi_mgr_get_dsi(DSI_CLOCK_SLAVE);
 	int ret;
 
-	/* In case of dual DSI, some registers in PHY1 have been programmed
+	/* In case of bonded DSI, some registers in PHY1 have been programmed
 	 * during PLL0 clock's set_rate. The PHY1 reset called by host1 here
 	 * will silently reset those PHY1 registers. Therefore we need to reset
 	 * and enable both PHYs before any PLL clock operation.
 	 */
-	if (IS_DUAL_DSI() && mdsi && sdsi) {
+	if (IS_BONDED_DSI() && mdsi && sdsi) {
 		if (!mdsi->phy_enabled && !sdsi->phy_enabled) {
 			msm_dsi_host_reset_phy(mdsi->host);
 			msm_dsi_host_reset_phy(sdsi->host);
@@ -178,11 +177,11 @@ static void dsi_mgr_phy_disable(int id)
 	struct msm_dsi *sdsi = dsi_mgr_get_dsi(DSI_CLOCK_SLAVE);
 
 	/* disable DSI phy
-	 * In dual-dsi configuration, the phy should be disabled for the
+	 * In bonded dsi configuration, the phy should be disabled for the
 	 * first controller only when the second controller is disabled.
 	 */
 	msm_dsi->phy_enabled = false;
-	if (IS_DUAL_DSI() && mdsi && sdsi) {
+	if (IS_BONDED_DSI() && mdsi && sdsi) {
 		if (!mdsi->phy_enabled && !sdsi->phy_enabled) {
 			msm_dsi_phy_disable(sdsi->phy);
 			msm_dsi_phy_disable(mdsi->phy);
@@ -244,7 +243,7 @@ static int msm_dsi_manager_panel_init(struct drm_connector *conn, u8 id)
 	struct msm_dsi *master_dsi, *slave_dsi;
 	struct drm_panel *panel;
 
-	if (IS_DUAL_DSI() && !IS_MASTER_DSI_LINK(id)) {
+	if (IS_BONDED_DSI() && !IS_MASTER_DSI_LINK(id)) {
 		master_dsi = other_dsi;
 		slave_dsi = msm_dsi;
 	} else {
@@ -253,7 +252,7 @@ static int msm_dsi_manager_panel_init(struct drm_connector *conn, u8 id)
 	}
 
 	/*
-	 * There is only 1 panel in the global panel list for dual DSI mode.
+	 * There is only 1 panel in the global panel list for bonded DSI mode.
 	 * Therefore slave dsi should get the drm_panel instance from master
 	 * dsi.
 	 */
@@ -264,14 +263,14 @@ static int msm_dsi_manager_panel_init(struct drm_connector *conn, u8 id)
 		return PTR_ERR(panel);
 	}
 
-	if (!panel || !IS_DUAL_DSI())
+	if (!panel || !IS_BONDED_DSI())
 		goto out;
 
 	drm_object_attach_property(&conn->base,
 				   conn->dev->mode_config.tile_property, 0);
 
 	/*
-	 * Set split display info to kms once dual DSI panel is connected to
+	 * Set split display info to kms once bonded DSI panel is connected to
 	 * both hosts.
 	 */
 	if (other_dsi && other_dsi->panel && kms->funcs->set_split_display) {
@@ -317,7 +316,7 @@ static int dsi_mgr_connector_get_modes(struct drm_connector *connector)
 		return 0;
 
 	/*
-	 * In dual DSI mode, we have one connector that can be
+	 * In bonded DSI mode, we have one connector that can be
 	 * attached to the drm_panel.
 	 */
 	num = drm_panel_get_modes(panel, connector);
@@ -366,30 +365,30 @@ static void dsi_mgr_bridge_pre_enable(struct drm_bridge *bridge)
 	struct mipi_dsi_host *host = msm_dsi->host;
 	struct drm_panel *panel = msm_dsi->panel;
 	struct msm_dsi_phy_shared_timings phy_shared_timings[DSI_MAX];
-	bool is_dual_dsi = IS_DUAL_DSI();
+	bool is_bonded_dsi = IS_BONDED_DSI();
 	int ret;
 
 	DBG("id=%d", id);
 	if (!msm_dsi_device_connected(msm_dsi))
 		return;
 
-	/* Do nothing with the host if it is slave-DSI in case of dual DSI */
-	if (is_dual_dsi && !IS_MASTER_DSI_LINK(id))
+	/* Do nothing with the host if it is slave-DSI in case of bonded DSI */
+	if (is_bonded_dsi && !IS_MASTER_DSI_LINK(id))
 		return;
 
 	ret = dsi_mgr_phy_enable(id, phy_shared_timings);
 	if (ret)
 		goto phy_en_fail;
 
-	ret = msm_dsi_host_power_on(host, &phy_shared_timings[id], is_dual_dsi);
+	ret = msm_dsi_host_power_on(host, &phy_shared_timings[id], is_bonded_dsi);
 	if (ret) {
 		pr_err("%s: power on host %d failed, %d\n", __func__, id, ret);
 		goto host_on_fail;
 	}
 
-	if (is_dual_dsi && msm_dsi1) {
+	if (is_bonded_dsi && msm_dsi1) {
 		ret = msm_dsi_host_power_on(msm_dsi1->host,
-				&phy_shared_timings[DSI_1], is_dual_dsi);
+				&phy_shared_timings[DSI_1], is_bonded_dsi);
 		if (ret) {
 			pr_err("%s: power on host1 failed, %d\n",
 							__func__, ret);
@@ -415,7 +414,7 @@ static void dsi_mgr_bridge_pre_enable(struct drm_bridge *bridge)
 		goto host_en_fail;
 	}
 
-	if (is_dual_dsi && msm_dsi1) {
+	if (is_bonded_dsi && msm_dsi1) {
 		ret = msm_dsi_host_enable(msm_dsi1->host);
 		if (ret) {
 			pr_err("%s: enable host1 failed, %d\n", __func__, ret);
@@ -431,7 +430,7 @@ static void dsi_mgr_bridge_pre_enable(struct drm_bridge *bridge)
 	if (panel)
 		drm_panel_unprepare(panel);
 panel_prep_fail:
-	if (is_dual_dsi && msm_dsi1)
+	if (is_bonded_dsi && msm_dsi1)
 		msm_dsi_host_power_off(msm_dsi1->host);
 host1_on_fail:
 	msm_dsi_host_power_off(host);
@@ -446,15 +445,15 @@ static void dsi_mgr_bridge_enable(struct drm_bridge *bridge)
 	int id = dsi_mgr_bridge_get_id(bridge);
 	struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id);
 	struct drm_panel *panel = msm_dsi->panel;
-	bool is_dual_dsi = IS_DUAL_DSI();
+	bool is_bonded_dsi = IS_BONDED_DSI();
 	int ret;
 
 	DBG("id=%d", id);
 	if (!msm_dsi_device_connected(msm_dsi))
 		return;
 
-	/* Do nothing with the host if it is slave-DSI in case of dual DSI */
-	if (is_dual_dsi && !IS_MASTER_DSI_LINK(id))
+	/* Do nothing with the host if it is slave-DSI in case of bonded DSI */
+	if (is_bonded_dsi && !IS_MASTER_DSI_LINK(id))
 		return;
 
 	if (panel) {
@@ -471,15 +470,15 @@ static void dsi_mgr_bridge_disable(struct drm_bridge *bridge)
 	int id = dsi_mgr_bridge_get_id(bridge);
 	struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id);
 	struct drm_panel *panel = msm_dsi->panel;
-	bool is_dual_dsi = IS_DUAL_DSI();
+	bool is_bonded_dsi = IS_BONDED_DSI();
 	int ret;
 
 	DBG("id=%d", id);
 	if (!msm_dsi_device_connected(msm_dsi))
 		return;
 
-	/* Do nothing with the host if it is slave-DSI in case of dual DSI */
-	if (is_dual_dsi && !IS_MASTER_DSI_LINK(id))
+	/* Do nothing with the host if it is slave-DSI in case of bonded DSI */
+	if (is_bonded_dsi && !IS_MASTER_DSI_LINK(id))
 		return;
 
 	if (panel) {
@@ -497,7 +496,7 @@ static void dsi_mgr_bridge_post_disable(struct drm_bridge *bridge)
 	struct msm_dsi *msm_dsi1 = dsi_mgr_get_dsi(DSI_1);
 	struct mipi_dsi_host *host = msm_dsi->host;
 	struct drm_panel *panel = msm_dsi->panel;
-	bool is_dual_dsi = IS_DUAL_DSI();
+	bool is_bonded_dsi = IS_BONDED_DSI();
 	int ret;
 
 	DBG("id=%d", id);
@@ -506,18 +505,18 @@ static void dsi_mgr_bridge_post_disable(struct drm_bridge *bridge)
 		return;
 
 	/*
-	 * Do nothing with the host if it is slave-DSI in case of dual DSI.
+	 * Do nothing with the host if it is slave-DSI in case of bonded DSI.
 	 * It is safe to call dsi_mgr_phy_disable() here because a single PHY
 	 * won't be diabled until both PHYs request disable.
 	 */
-	if (is_dual_dsi && !IS_MASTER_DSI_LINK(id))
+	if (is_bonded_dsi && !IS_MASTER_DSI_LINK(id))
 		goto disable_phy;
 
 	ret = msm_dsi_host_disable(host);
 	if (ret)
 		pr_err("%s: host %d disable failed, %d\n", __func__, id, ret);
 
-	if (is_dual_dsi && msm_dsi1) {
+	if (is_bonded_dsi && msm_dsi1) {
 		ret = msm_dsi_host_disable(msm_dsi1->host);
 		if (ret)
 			pr_err("%s: host1 disable failed, %d\n", __func__, ret);
@@ -537,7 +536,7 @@ static void dsi_mgr_bridge_post_disable(struct drm_bridge *bridge)
 	if (ret)
 		pr_err("%s: host %d power off failed,%d\n", __func__, id, ret);
 
-	if (is_dual_dsi && msm_dsi1) {
+	if (is_bonded_dsi && msm_dsi1) {
 		ret = msm_dsi_host_power_off(msm_dsi1->host);
 		if (ret)
 			pr_err("%s: host1 power off failed, %d\n",
@@ -556,15 +555,15 @@ static void dsi_mgr_bridge_mode_set(struct drm_bridge *bridge,
 	struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id);
 	struct msm_dsi *other_dsi = dsi_mgr_get_other_dsi(id);
 	struct mipi_dsi_host *host = msm_dsi->host;
-	bool is_dual_dsi = IS_DUAL_DSI();
+	bool is_bonded_dsi = IS_BONDED_DSI();
 
 	DBG("set mode: " DRM_MODE_FMT, DRM_MODE_ARG(mode));
 
-	if (is_dual_dsi && !IS_MASTER_DSI_LINK(id))
+	if (is_bonded_dsi && !IS_MASTER_DSI_LINK(id))
 		return;
 
 	msm_dsi_host_set_display_mode(host, adjusted_mode);
-	if (is_dual_dsi && other_dsi)
+	if (is_bonded_dsi && other_dsi)
 		msm_dsi_host_set_display_mode(other_dsi->host, adjusted_mode);
 }
 
@@ -640,15 +639,15 @@ struct drm_connector *msm_dsi_manager_connector_init(u8 id)
 
 bool msm_dsi_manager_validate_current_config(u8 id)
 {
-	bool is_dual_dsi = IS_DUAL_DSI();
+	bool is_bonded_dsi = IS_BONDED_DSI();
 
 	/*
-	 * For dual DSI, we only have one drm panel. For this
+	 * For bonded DSI, we only have one drm panel. For this
 	 * use case, we register only one bridge/connector.
 	 * Skip bridge/connector initialisation if it is
-	 * slave-DSI for dual DSI configuration.
+	 * slave-DSI for bonded DSI configuration.
 	 */
-	if (is_dual_dsi && !IS_MASTER_DSI_LINK(id)) {
+	if (is_bonded_dsi && !IS_MASTER_DSI_LINK(id)) {
 		DBG("Skip bridge registration for slave DSI->id: %d\n", id);
 		return false;
 	}
@@ -740,7 +739,7 @@ int msm_dsi_manager_cmd_xfer(int id, const struct mipi_dsi_msg *msg)
 	if (!msg->tx_buf || !msg->tx_len)
 		return 0;
 
-	/* In dual master case, panel requires the same commands sent to
+	/* In bonded master case, panel requires the same commands sent to
 	 * both DSI links. Host issues the command trigger to both links
 	 * when DSI_1 calls the cmd transfer function, no matter it happens
 	 * before or after DSI_0 cmd transfer.
@@ -809,9 +808,9 @@ int msm_dsi_manager_register(struct msm_dsi *msm_dsi)
 
 	msm_dsim->dsi[id] = msm_dsi;
 
-	ret = dsi_mgr_parse_dual_dsi(msm_dsi->pdev->dev.of_node, id);
+	ret = dsi_mgr_parse_of(msm_dsi->pdev->dev.of_node, id);
 	if (ret) {
-		pr_err("%s: failed to parse dual DSI info\n", __func__);
+		pr_err("%s: failed to parse OF DSI info\n", __func__);
 		goto fail;
 	}
 
diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c
index e46b10fc793a..d8128f50b0dd 100644
--- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c
+++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c
@@ -84,7 +84,7 @@ struct dsi_pll_10nm {
 #define to_pll_10nm(x)	container_of(x, struct dsi_pll_10nm, clk_hw)
 
 /*
- * Global list of private DSI PLL struct pointers. We need this for Dual DSI
+ * Global list of private DSI PLL struct pointers. We need this for bonded DSI
  * mode, where the master PLL's clk_ops needs access the slave's private data
  */
 static struct dsi_pll_10nm *pll_10nm_list[DSI_MAX];
diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c
index a34cf151c517..e7f857ad02a3 100644
--- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c
+++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c
@@ -86,7 +86,7 @@ struct dsi_pll_14nm {
 /*
  * Private struct for N1/N2 post-divider clocks. These clocks are similar to
  * the generic clk_divider class of clocks. The only difference is that it
- * also sets the slave DSI PLL's post-dividers if in Dual DSI mode
+ * also sets the slave DSI PLL's post-dividers if in bonded DSI mode
  */
 struct dsi_pll_14nm_postdiv {
 	struct clk_hw hw;
@@ -102,7 +102,7 @@ struct dsi_pll_14nm_postdiv {
 #define to_pll_14nm_postdiv(_hw) container_of(_hw, struct dsi_pll_14nm_postdiv, hw)
 
 /*
- * Global list of private DSI PLL struct pointers. We need this for Dual DSI
+ * Global list of private DSI PLL struct pointers. We need this for bonded DSI
  * mode, where the master PLL's clk_ops needs access the slave's private data
  */
 static struct dsi_pll_14nm *pll_14nm_list[DSI_MAX];
@@ -658,7 +658,7 @@ static int dsi_pll_14nm_postdiv_set_rate(struct clk_hw *hw, unsigned long rate,
 	val |= value << shift;
 	dsi_phy_write(base + REG_DSI_14nm_PHY_CMN_CLK_CFG0, val);
 
-	/* If we're master in dual DSI mode, then the slave PLL's post-dividers
+	/* If we're master in bonded DSI mode, then the slave PLL's post-dividers
 	 * follow the master's post dividers
 	 */
 	if (pll_14nm->phy->usecase == MSM_DSI_PHY_MASTER) {
diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c
index 7c23d4c47338..ab26b530fbcf 100644
--- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c
+++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c
@@ -83,7 +83,7 @@ struct dsi_pll_7nm {
 #define to_pll_7nm(x)	container_of(x, struct dsi_pll_7nm, clk_hw)
 
 /*
- * Global list of private DSI PLL struct pointers. We need this for Dual DSI
+ * Global list of private DSI PLL struct pointers. We need this for bonded DSI
  * mode, where the master PLL's clk_ops needs access the slave's private data
  */
 static struct dsi_pll_7nm *pll_7nm_list[DSI_MAX];
-- 
2.30.2


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

* [PATCH v4 2/7] drm/msm/dsi: add three helper functions
  2021-07-17 12:40 [PATCH v4 0/7] drm/msm/dpu: add support for independent DSI config Dmitry Baryshkov
  2021-07-17 12:40 ` [PATCH v4 1/7] drm/msm/dsi: rename dual DSI to bonded DSI Dmitry Baryshkov
@ 2021-07-17 12:40 ` Dmitry Baryshkov
  2021-07-19 10:31   ` kernel test robot
  2021-07-25  4:05   ` Bjorn Andersson
  2021-07-17 12:40 ` [PATCH v4 3/7] drm/msm/dpu: support setting up two independent DSI connectors Dmitry Baryshkov
                   ` (4 subsequent siblings)
  6 siblings, 2 replies; 16+ messages in thread
From: Dmitry Baryshkov @ 2021-07-17 12:40 UTC (permalink / raw)
  To: Bjorn Andersson, Rob Clark, Sean Paul, Abhinav Kumar
  Cc: Jonathan Marek, Stephen Boyd, linux-arm-msm, dri-devel,
	David Airlie, freedreno

Add three helper functions to be used by display drivers for setting up
encoders.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org>
---
 drivers/gpu/drm/msm/dsi/dsi.c         |  7 +++++++
 drivers/gpu/drm/msm/dsi/dsi_manager.c | 19 +++++++++++--------
 drivers/gpu/drm/msm/msm_drv.h         | 17 +++++++++++++++--
 3 files changed, 33 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/msm/dsi/dsi.c b/drivers/gpu/drm/msm/dsi/dsi.c
index 75afc12a7b25..5201d7eb0490 100644
--- a/drivers/gpu/drm/msm/dsi/dsi.c
+++ b/drivers/gpu/drm/msm/dsi/dsi.c
@@ -13,6 +13,13 @@ struct drm_encoder *msm_dsi_get_encoder(struct msm_dsi *msm_dsi)
 	return msm_dsi->encoder;
 }
 
+bool msm_dsi_is_cmd_mode(struct msm_dsi *msm_dsi)
+{
+	unsigned long host_flags = msm_dsi_host_get_mode_flags(msm_dsi->host);
+
+	return !(host_flags & MIPI_DSI_MODE_VIDEO);
+}
+
 static int dsi_get_phy(struct msm_dsi *msm_dsi)
 {
 	struct platform_device *pdev = msm_dsi->pdev;
diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c
index b20645ab279b..27d3b9ebf831 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_manager.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c
@@ -216,12 +216,6 @@ static int dsi_mgr_bridge_get_id(struct drm_bridge *bridge)
 	return dsi_bridge->id;
 }
 
-static bool dsi_mgr_is_cmd_mode(struct msm_dsi *msm_dsi)
-{
-	unsigned long host_flags = msm_dsi_host_get_mode_flags(msm_dsi->host);
-	return !(host_flags & MIPI_DSI_MODE_VIDEO);
-}
-
 void msm_dsi_manager_setup_encoder(int id)
 {
 	struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id);
@@ -231,7 +225,7 @@ void msm_dsi_manager_setup_encoder(int id)
 
 	if (encoder && kms->funcs->set_encoder_mode)
 		kms->funcs->set_encoder_mode(kms, encoder,
-					     dsi_mgr_is_cmd_mode(msm_dsi));
+					     msm_dsi_is_cmd_mode(msm_dsi));
 }
 
 static int msm_dsi_manager_panel_init(struct drm_connector *conn, u8 id)
@@ -276,7 +270,7 @@ static int msm_dsi_manager_panel_init(struct drm_connector *conn, u8 id)
 	if (other_dsi && other_dsi->panel && kms->funcs->set_split_display) {
 		kms->funcs->set_split_display(kms, master_dsi->encoder,
 					      slave_dsi->encoder,
-					      dsi_mgr_is_cmd_mode(msm_dsi));
+					      msm_dsi_is_cmd_mode(msm_dsi));
 	}
 
 out:
@@ -839,3 +833,12 @@ void msm_dsi_manager_unregister(struct msm_dsi *msm_dsi)
 		msm_dsim->dsi[msm_dsi->id] = NULL;
 }
 
+bool msm_dsi_is_bonded_dsi(struct msm_dsi *msm_dsi)
+{
+	return IS_BONDED_DSI();
+}
+
+bool msm_dsi_is_master_dsi(struct msm_dsi *msm_dsi)
+{
+	return IS_MASTER_DSI_LINK(msm_dsi->id);
+}
diff --git a/drivers/gpu/drm/msm/msm_drv.h b/drivers/gpu/drm/msm/msm_drv.h
index 1a48a709ffb3..9bfd37855969 100644
--- a/drivers/gpu/drm/msm/msm_drv.h
+++ b/drivers/gpu/drm/msm/msm_drv.h
@@ -350,7 +350,9 @@ void __exit msm_dsi_unregister(void);
 int msm_dsi_modeset_init(struct msm_dsi *msm_dsi, struct drm_device *dev,
 			 struct drm_encoder *encoder);
 void msm_dsi_snapshot(struct msm_disp_state *disp_state, struct msm_dsi *msm_dsi);
-
+bool msm_dsi_is_cmd_mode(struct msm_dsi *msm_dsi);
+bool msm_dsi_is_bonded_dsi(struct msm_dsi *msm_dsi);
+bool msm_dsi_is_master_dsi(struct msm_dsi *msm_dsi);
 #else
 static inline void __init msm_dsi_register(void)
 {
@@ -367,7 +369,18 @@ static inline int msm_dsi_modeset_init(struct msm_dsi *msm_dsi,
 static inline void msm_dsi_snapshot(struct msm_disp_state *disp_state, struct msm_dsi *msm_dsi)
 {
 }
-
+static inline bool msm_dsi_is_cmd_mode(struct msm_dsi *msm_dsi)
+{
+	return false;
+}
+static bool msm_dsi_is_bonded_dsi(struct msm_dsi *msm_dsi)
+{
+	return false;
+}
+bool msm_dsi_is_master_dsi(struct msm_dsi *msm_dsi)
+{
+	return false;
+}
 #endif
 
 #ifdef CONFIG_DRM_MSM_DP
-- 
2.30.2


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

* [PATCH v4 3/7] drm/msm/dpu: support setting up two independent DSI connectors
  2021-07-17 12:40 [PATCH v4 0/7] drm/msm/dpu: add support for independent DSI config Dmitry Baryshkov
  2021-07-17 12:40 ` [PATCH v4 1/7] drm/msm/dsi: rename dual DSI to bonded DSI Dmitry Baryshkov
  2021-07-17 12:40 ` [PATCH v4 2/7] drm/msm/dsi: add three helper functions Dmitry Baryshkov
@ 2021-07-17 12:40 ` Dmitry Baryshkov
  2021-07-25  4:06   ` Bjorn Andersson
  2021-07-17 12:40 ` [PATCH v4 4/7] drm/msm/mdp5: move mdp5_encoder_set_intf_mode after msm_dsi_modeset_init Dmitry Baryshkov
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 16+ messages in thread
From: Dmitry Baryshkov @ 2021-07-17 12:40 UTC (permalink / raw)
  To: Bjorn Andersson, Rob Clark, Sean Paul, Abhinav Kumar
  Cc: Jonathan Marek, Stephen Boyd, linux-arm-msm, dri-devel,
	David Airlie, freedreno

Move setting up encoders from set_encoder_mode to
_dpu_kms_initialize_dsi() / _dpu_kms_initialize_displayport(). This
allows us to support not only "single DSI" and "bonded DSI" but also "two
independent DSI" configurations. In future this would also help adding
support for multiple DP connectors.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 102 +++++++++++++-----------
 1 file changed, 57 insertions(+), 45 deletions(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
index 1d3a4f395e74..3cd2011e18d4 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
@@ -471,30 +471,68 @@ static int _dpu_kms_initialize_dsi(struct drm_device *dev,
 				    struct dpu_kms *dpu_kms)
 {
 	struct drm_encoder *encoder = NULL;
+	struct msm_display_info info;
 	int i, rc = 0;
 
 	if (!(priv->dsi[0] || priv->dsi[1]))
 		return rc;
 
-	/*TODO: Support two independent DSI connectors */
-	encoder = dpu_encoder_init(dev, DRM_MODE_ENCODER_DSI);
-	if (IS_ERR(encoder)) {
-		DPU_ERROR("encoder init failed for dsi display\n");
-		return PTR_ERR(encoder);
-	}
-
-	priv->encoders[priv->num_encoders++] = encoder;
-
+	/*
+	 * We support following confiurations:
+	 * - Single DSI host (dsi0 or dsi1)
+	 * - Two independent DSI hosts
+	 * - Bonded DSI0 and DSI1 hosts
+	 *
+	 * TODO: Support swapping DSI0 and DSI1 in the bonded setup.
+	 */
 	for (i = 0; i < ARRAY_SIZE(priv->dsi); i++) {
+		int other = (i + 1) % 2;
+
 		if (!priv->dsi[i])
 			continue;
 
+		if (msm_dsi_is_bonded_dsi(priv->dsi[i]) &&
+		    !msm_dsi_is_master_dsi(priv->dsi[i]))
+			continue;
+
+		encoder = dpu_encoder_init(dev, DRM_MODE_ENCODER_DSI);
+		if (IS_ERR(encoder)) {
+			DPU_ERROR("encoder init failed for dsi display\n");
+			return PTR_ERR(encoder);
+		}
+
+		priv->encoders[priv->num_encoders++] = encoder;
+
+		memset(&info, 0, sizeof(info));
+		info.intf_type = encoder->encoder_type;
+
 		rc = msm_dsi_modeset_init(priv->dsi[i], dev, encoder);
 		if (rc) {
 			DPU_ERROR("modeset_init failed for dsi[%d], rc = %d\n",
 				i, rc);
 			break;
 		}
+
+		info.h_tile_instance[info.num_of_h_tiles++] = i;
+		info.capabilities = msm_dsi_is_cmd_mode(priv->dsi[i]) ?
+			MSM_DISPLAY_CAP_CMD_MODE :
+			MSM_DISPLAY_CAP_VID_MODE;
+
+		if (msm_dsi_is_bonded_dsi(priv->dsi[i]) && priv->dsi[other]) {
+			rc = msm_dsi_modeset_init(priv->dsi[other], dev, encoder);
+			if (rc) {
+				DPU_ERROR("modeset_init failed for dsi[%d], rc = %d\n",
+					other, rc);
+				break;
+			}
+
+			info.h_tile_instance[info.num_of_h_tiles++] = other;
+		}
+
+		rc = dpu_encoder_setup(dev, encoder, &info);
+		if (rc)
+			DPU_ERROR("failed to setup DPU encoder %d: rc:%d\n",
+				  encoder->base.id, rc);
 	}
 
 	return rc;
@@ -505,6 +543,7 @@ static int _dpu_kms_initialize_displayport(struct drm_device *dev,
 					    struct dpu_kms *dpu_kms)
 {
 	struct drm_encoder *encoder = NULL;
+	struct msm_display_info info;
 	int rc = 0;
 
 	if (!priv->dp)
@@ -516,6 +555,7 @@ static int _dpu_kms_initialize_displayport(struct drm_device *dev,
 		return PTR_ERR(encoder);
 	}
 
+	memset(&info, 0, sizeof(info));
 	rc = msm_dp_modeset_init(priv->dp, dev, encoder);
 	if (rc) {
 		DPU_ERROR("modeset_init failed for DP, rc = %d\n", rc);
@@ -524,6 +564,14 @@ static int _dpu_kms_initialize_displayport(struct drm_device *dev,
 	}
 
 	priv->encoders[priv->num_encoders++] = encoder;
+
+	info.num_of_h_tiles = 1;
+	info.capabilities = MSM_DISPLAY_CAP_VID_MODE;
+	info.intf_type = encoder->encoder_type;
+	rc = dpu_encoder_setup(dev, encoder, &info);
+	if (rc)
+		DPU_ERROR("failed to setup DPU encoder %d: rc:%d\n",
+			  encoder->base.id, rc);
 	return rc;
 }
 
@@ -726,41 +774,6 @@ static void dpu_kms_destroy(struct msm_kms *kms)
 	msm_kms_destroy(&dpu_kms->base);
 }
 
-static void _dpu_kms_set_encoder_mode(struct msm_kms *kms,
-				 struct drm_encoder *encoder,
-				 bool cmd_mode)
-{
-	struct msm_display_info info;
-	struct msm_drm_private *priv = encoder->dev->dev_private;
-	int i, rc = 0;
-
-	memset(&info, 0, sizeof(info));
-
-	info.intf_type = encoder->encoder_type;
-	info.capabilities = cmd_mode ? MSM_DISPLAY_CAP_CMD_MODE :
-			MSM_DISPLAY_CAP_VID_MODE;
-
-	switch (info.intf_type) {
-	case DRM_MODE_ENCODER_DSI:
-		/* TODO: No support for DSI swap */
-		for (i = 0; i < ARRAY_SIZE(priv->dsi); i++) {
-			if (priv->dsi[i]) {
-				info.h_tile_instance[info.num_of_h_tiles] = i;
-				info.num_of_h_tiles++;
-			}
-		}
-		break;
-	case DRM_MODE_ENCODER_TMDS:
-		info.num_of_h_tiles = 1;
-		break;
-	}
-
-	rc = dpu_encoder_setup(encoder->dev, encoder, &info);
-	if (rc)
-		DPU_ERROR("failed to setup DPU encoder %d: rc:%d\n",
-			encoder->base.id, rc);
-}
-
 static irqreturn_t dpu_irq(struct msm_kms *kms)
 {
 	struct dpu_kms *dpu_kms = to_dpu_kms(kms);
@@ -863,7 +876,6 @@ static const struct msm_kms_funcs kms_funcs = {
 	.get_format      = dpu_get_msm_format,
 	.round_pixclk    = dpu_kms_round_pixclk,
 	.destroy         = dpu_kms_destroy,
-	.set_encoder_mode = _dpu_kms_set_encoder_mode,
 	.snapshot        = dpu_kms_mdp_snapshot,
 #ifdef CONFIG_DEBUG_FS
 	.debugfs_init    = dpu_kms_debugfs_init,
-- 
2.30.2


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

* [PATCH v4 4/7] drm/msm/mdp5: move mdp5_encoder_set_intf_mode after msm_dsi_modeset_init
  2021-07-17 12:40 [PATCH v4 0/7] drm/msm/dpu: add support for independent DSI config Dmitry Baryshkov
                   ` (2 preceding siblings ...)
  2021-07-17 12:40 ` [PATCH v4 3/7] drm/msm/dpu: support setting up two independent DSI connectors Dmitry Baryshkov
@ 2021-07-17 12:40 ` Dmitry Baryshkov
  2021-07-25  4:07   ` Bjorn Andersson
  2021-07-17 12:40 ` [PATCH v4 5/7] drm/msm/dp: stop calling set_encoder_mode callback Dmitry Baryshkov
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 16+ messages in thread
From: Dmitry Baryshkov @ 2021-07-17 12:40 UTC (permalink / raw)
  To: Bjorn Andersson, Rob Clark, Sean Paul, Abhinav Kumar
  Cc: Jonathan Marek, Stephen Boyd, linux-arm-msm, dri-devel,
	David Airlie, freedreno

Move a call to mdp5_encoder_set_intf_mode() after
msm_dsi_modeset_init(), removing set_encoder_mode callback.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org>
---
 drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c
index 15aed45022bc..b3b42672b2d4 100644
--- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c
+++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c
@@ -209,13 +209,6 @@ static int mdp5_set_split_display(struct msm_kms *kms,
 							  slave_encoder);
 }
 
-static void mdp5_set_encoder_mode(struct msm_kms *kms,
-				  struct drm_encoder *encoder,
-				  bool cmd_mode)
-{
-	mdp5_encoder_set_intf_mode(encoder, cmd_mode);
-}
-
 static void mdp5_kms_destroy(struct msm_kms *kms)
 {
 	struct mdp5_kms *mdp5_kms = to_mdp5_kms(to_mdp_kms(kms));
@@ -287,7 +280,6 @@ static const struct mdp_kms_funcs kms_funcs = {
 		.get_format      = mdp_get_format,
 		.round_pixclk    = mdp5_round_pixclk,
 		.set_split_display = mdp5_set_split_display,
-		.set_encoder_mode = mdp5_set_encoder_mode,
 		.destroy         = mdp5_kms_destroy,
 #ifdef CONFIG_DEBUG_FS
 		.debugfs_init    = mdp5_kms_debugfs_init,
@@ -448,6 +440,9 @@ static int modeset_init_intf(struct mdp5_kms *mdp5_kms,
 		}
 
 		ret = msm_dsi_modeset_init(priv->dsi[dsi_id], dev, encoder);
+		if (!ret)
+			mdp5_encoder_set_intf_mode(encoder, msm_dsi_is_cmd_mode(priv->dsi[dsi_id]));
+
 		break;
 	}
 	default:
-- 
2.30.2


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

* [PATCH v4 5/7] drm/msm/dp: stop calling set_encoder_mode callback
  2021-07-17 12:40 [PATCH v4 0/7] drm/msm/dpu: add support for independent DSI config Dmitry Baryshkov
                   ` (3 preceding siblings ...)
  2021-07-17 12:40 ` [PATCH v4 4/7] drm/msm/mdp5: move mdp5_encoder_set_intf_mode after msm_dsi_modeset_init Dmitry Baryshkov
@ 2021-07-17 12:40 ` Dmitry Baryshkov
  2021-07-25  4:08   ` Bjorn Andersson
  2021-07-17 12:40 ` [PATCH v4 6/7] drm/msm/dsi: " Dmitry Baryshkov
  2021-07-17 12:40 ` [PATCH v4 7/7] drm/msm/kms: drop " Dmitry Baryshkov
  6 siblings, 1 reply; 16+ messages in thread
From: Dmitry Baryshkov @ 2021-07-17 12:40 UTC (permalink / raw)
  To: Bjorn Andersson, Rob Clark, Sean Paul, Abhinav Kumar
  Cc: Jonathan Marek, Stephen Boyd, linux-arm-msm, dri-devel,
	David Airlie, freedreno

None of the display drivers now implement set_encoder_mode callback.
Stop calling it from the modeset init code.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org>
---
 drivers/gpu/drm/msm/dp/dp_display.c | 18 ------------------
 1 file changed, 18 deletions(-)

diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c
index 051c1be1de7e..70b319a8fe83 100644
--- a/drivers/gpu/drm/msm/dp/dp_display.c
+++ b/drivers/gpu/drm/msm/dp/dp_display.c
@@ -102,8 +102,6 @@ struct dp_display_private {
 	struct dp_display_mode dp_mode;
 	struct msm_dp dp_display;
 
-	bool encoder_mode_set;
-
 	/* wait for audio signaling */
 	struct completion audio_comp;
 
@@ -283,20 +281,6 @@ static void dp_display_send_hpd_event(struct msm_dp *dp_display)
 }
 
 
-static void dp_display_set_encoder_mode(struct dp_display_private *dp)
-{
-	struct msm_drm_private *priv = dp->dp_display.drm_dev->dev_private;
-	struct msm_kms *kms = priv->kms;
-
-	if (!dp->encoder_mode_set && dp->dp_display.encoder &&
-				kms->funcs->set_encoder_mode) {
-		kms->funcs->set_encoder_mode(kms,
-				dp->dp_display.encoder, false);
-
-		dp->encoder_mode_set = true;
-	}
-}
-
 static int dp_display_send_hpd_notification(struct dp_display_private *dp,
 					    bool hpd)
 {
@@ -369,8 +353,6 @@ static void dp_display_host_init(struct dp_display_private *dp, int reset)
 	if (dp->usbpd->orientation == ORIENTATION_CC2)
 		flip = true;
 
-	dp_display_set_encoder_mode(dp);
-
 	dp_power_init(dp->power, flip);
 	dp_ctrl_host_init(dp->ctrl, flip, reset);
 	dp_aux_init(dp->aux);
-- 
2.30.2


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

* [PATCH v4 6/7] drm/msm/dsi: stop calling set_encoder_mode callback
  2021-07-17 12:40 [PATCH v4 0/7] drm/msm/dpu: add support for independent DSI config Dmitry Baryshkov
                   ` (4 preceding siblings ...)
  2021-07-17 12:40 ` [PATCH v4 5/7] drm/msm/dp: stop calling set_encoder_mode callback Dmitry Baryshkov
@ 2021-07-17 12:40 ` Dmitry Baryshkov
  2021-07-25  4:08   ` Bjorn Andersson
  2021-07-17 12:40 ` [PATCH v4 7/7] drm/msm/kms: drop " Dmitry Baryshkov
  6 siblings, 1 reply; 16+ messages in thread
From: Dmitry Baryshkov @ 2021-07-17 12:40 UTC (permalink / raw)
  To: Bjorn Andersson, Rob Clark, Sean Paul, Abhinav Kumar
  Cc: Jonathan Marek, Stephen Boyd, linux-arm-msm, dri-devel,
	David Airlie, freedreno

None of the display drivers now implement set_encoder_mode callback.
Stop calling it from the modeset init code.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org>
---
 drivers/gpu/drm/msm/dsi/dsi.c         |  2 --
 drivers/gpu/drm/msm/dsi/dsi.h         |  1 -
 drivers/gpu/drm/msm/dsi/dsi_manager.c | 12 ------------
 3 files changed, 15 deletions(-)

diff --git a/drivers/gpu/drm/msm/dsi/dsi.c b/drivers/gpu/drm/msm/dsi/dsi.c
index 5201d7eb0490..77c8dba297d8 100644
--- a/drivers/gpu/drm/msm/dsi/dsi.c
+++ b/drivers/gpu/drm/msm/dsi/dsi.c
@@ -251,8 +251,6 @@ int msm_dsi_modeset_init(struct msm_dsi *msm_dsi, struct drm_device *dev,
 		goto fail;
 	}
 
-	msm_dsi_manager_setup_encoder(msm_dsi->id);
-
 	priv->bridges[priv->num_bridges++]       = msm_dsi->bridge;
 	priv->connectors[priv->num_connectors++] = msm_dsi->connector;
 
diff --git a/drivers/gpu/drm/msm/dsi/dsi.h b/drivers/gpu/drm/msm/dsi/dsi.h
index 856a532850c0..e0c3c4409377 100644
--- a/drivers/gpu/drm/msm/dsi/dsi.h
+++ b/drivers/gpu/drm/msm/dsi/dsi.h
@@ -80,7 +80,6 @@ struct drm_connector *msm_dsi_manager_connector_init(u8 id);
 struct drm_connector *msm_dsi_manager_ext_bridge_init(u8 id);
 int msm_dsi_manager_cmd_xfer(int id, const struct mipi_dsi_msg *msg);
 bool msm_dsi_manager_cmd_xfer_trigger(int id, u32 dma_base, u32 len);
-void msm_dsi_manager_setup_encoder(int id);
 int msm_dsi_manager_register(struct msm_dsi *msm_dsi);
 void msm_dsi_manager_unregister(struct msm_dsi *msm_dsi);
 bool msm_dsi_manager_validate_current_config(u8 id);
diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c
index 27d3b9ebf831..693078e68fd4 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_manager.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c
@@ -216,18 +216,6 @@ static int dsi_mgr_bridge_get_id(struct drm_bridge *bridge)
 	return dsi_bridge->id;
 }
 
-void msm_dsi_manager_setup_encoder(int id)
-{
-	struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id);
-	struct msm_drm_private *priv = msm_dsi->dev->dev_private;
-	struct msm_kms *kms = priv->kms;
-	struct drm_encoder *encoder = msm_dsi_get_encoder(msm_dsi);
-
-	if (encoder && kms->funcs->set_encoder_mode)
-		kms->funcs->set_encoder_mode(kms, encoder,
-					     msm_dsi_is_cmd_mode(msm_dsi));
-}
-
 static int msm_dsi_manager_panel_init(struct drm_connector *conn, u8 id)
 {
 	struct msm_drm_private *priv = conn->dev->dev_private;
-- 
2.30.2


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

* [PATCH v4 7/7] drm/msm/kms: drop set_encoder_mode callback
  2021-07-17 12:40 [PATCH v4 0/7] drm/msm/dpu: add support for independent DSI config Dmitry Baryshkov
                   ` (5 preceding siblings ...)
  2021-07-17 12:40 ` [PATCH v4 6/7] drm/msm/dsi: " Dmitry Baryshkov
@ 2021-07-17 12:40 ` Dmitry Baryshkov
  2021-07-25  4:09   ` Bjorn Andersson
  6 siblings, 1 reply; 16+ messages in thread
From: Dmitry Baryshkov @ 2021-07-17 12:40 UTC (permalink / raw)
  To: Bjorn Andersson, Rob Clark, Sean Paul, Abhinav Kumar
  Cc: Jonathan Marek, Stephen Boyd, linux-arm-msm, dri-devel,
	David Airlie, freedreno

set_encoder_mode callback is completely unused now. Drop it from
msm_kms_func().

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org>
---
 drivers/gpu/drm/msm/msm_kms.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/msm/msm_kms.h b/drivers/gpu/drm/msm/msm_kms.h
index 086a2d59b8c8..9484e8b62630 100644
--- a/drivers/gpu/drm/msm/msm_kms.h
+++ b/drivers/gpu/drm/msm/msm_kms.h
@@ -117,9 +117,6 @@ struct msm_kms_funcs {
 			struct drm_encoder *encoder,
 			struct drm_encoder *slave_encoder,
 			bool is_cmd_mode);
-	void (*set_encoder_mode)(struct msm_kms *kms,
-				 struct drm_encoder *encoder,
-				 bool cmd_mode);
 	/* cleanup: */
 	void (*destroy)(struct msm_kms *kms);
 
-- 
2.30.2


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

* Re: [PATCH v4 2/7] drm/msm/dsi: add three helper functions
  2021-07-17 12:40 ` [PATCH v4 2/7] drm/msm/dsi: add three helper functions Dmitry Baryshkov
@ 2021-07-19 10:31   ` kernel test robot
  2021-07-25  4:05   ` Bjorn Andersson
  1 sibling, 0 replies; 16+ messages in thread
From: kernel test robot @ 2021-07-19 10:31 UTC (permalink / raw)
  To: Dmitry Baryshkov, Bjorn Andersson, Rob Clark, Sean Paul, Abhinav Kumar
  Cc: kbuild-all, Jonathan Marek, Stephen Boyd, linux-arm-msm,
	dri-devel, David Airlie, freedreno

[-- Attachment #1: Type: text/plain, Size: 16976 bytes --]

Hi Dmitry,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.14-rc2 next-20210716]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Dmitry-Baryshkov/drm-msm-dpu-add-support-for-independent-DSI-config/20210718-094538
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git d936eb23874433caa3e3d841cfa16f5434b85dcf
config: arm64-randconfig-p002-20210719 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 10.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/ea28949dc5d332496016a7d53a45015fda469e23
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Dmitry-Baryshkov/drm-msm-dpu-add-support-for-independent-DSI-config/20210718-094538
        git checkout ea28949dc5d332496016a7d53a45015fda469e23
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross O=build_dir ARCH=arm64 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>):

   In file included from drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.h:12,
                    from drivers/gpu/drm/msm/disp/mdp4/mdp4_plane.c:11:
>> drivers/gpu/drm/msm/msm_drv.h:380:6: warning: no previous prototype for 'msm_dsi_is_master_dsi' [-Wmissing-prototypes]
     380 | bool msm_dsi_is_master_dsi(struct msm_dsi *msm_dsi)
         |      ^~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/msm/msm_drv.h:376:13: warning: 'msm_dsi_is_bonded_dsi' defined but not used [-Wunused-function]
     376 | static bool msm_dsi_is_bonded_dsi(struct msm_dsi *msm_dsi)
         |             ^~~~~~~~~~~~~~~~~~~~~
--
   In file included from drivers/gpu/drm/msm/msm_fence.c:9:
>> drivers/gpu/drm/msm/msm_drv.h:380:6: warning: no previous prototype for 'msm_dsi_is_master_dsi' [-Wmissing-prototypes]
     380 | bool msm_dsi_is_master_dsi(struct msm_dsi *msm_dsi)
         |      ^~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/msm/msm_drv.h:376:13: warning: 'msm_dsi_is_bonded_dsi' defined but not used [-Wunused-function]
     376 | static bool msm_dsi_is_bonded_dsi(struct msm_dsi *msm_dsi)
         |             ^~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/msm/msm_fence.c: In function 'msm_fence_context_alloc':
   drivers/gpu/drm/msm/msm_fence.c:23:2: warning: 'strncpy' specified bound 32 equals destination size [-Wstringop-truncation]
      23 |  strncpy(fctx->name, name, sizeof(fctx->name));
         |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
   aarch64-linux-ld: drivers/gpu/drm/msm/adreno/adreno_gpu.o: in function `msm_dsi_is_master_dsi':
>> adreno_gpu.c:(.text+0x440): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/adreno/a2xx_gpu.o: in function `msm_dsi_is_master_dsi':
   a2xx_gpu.c:(.text+0xe40): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/adreno/a3xx_gpu.o: in function `msm_dsi_is_master_dsi':
   a3xx_gpu.c:(.text+0x1240): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/adreno/a4xx_gpu.o: in function `msm_dsi_is_master_dsi':
   a4xx_gpu.c:(.text+0x1300): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/adreno/a5xx_gpu.o: in function `msm_dsi_is_master_dsi':
   a5xx_gpu.c:(.text+0x1380): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/adreno/a5xx_power.o: in function `msm_dsi_is_master_dsi':
   a5xx_power.c:(.text+0x740): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/adreno/a5xx_preempt.o: in function `msm_dsi_is_master_dsi':
   a5xx_preempt.c:(.text+0x400): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/adreno/a6xx_gpu.o: in function `msm_dsi_is_master_dsi':
   a6xx_gpu.c:(.text+0x2ac0): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/adreno/a6xx_gmu.o: in function `msm_dsi_is_master_dsi':
   a6xx_gmu.c:(.text+0x19c0): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/adreno/a6xx_hfi.o: in function `msm_dsi_is_master_dsi':
   a6xx_hfi.c:(.text+0xf40): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/hdmi/hdmi.o: in function `msm_dsi_is_master_dsi':
   hdmi.c:(.text+0xbc0): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/hdmi/hdmi_audio.o: in function `msm_dsi_is_master_dsi':
   hdmi_audio.c:(.text+0x0): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/hdmi/hdmi_bridge.o: in function `msm_dsi_is_master_dsi':
   hdmi_bridge.c:(.text+0x840): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/hdmi/hdmi_connector.o: in function `msm_dsi_is_master_dsi':
   hdmi_connector.c:(.text+0x800): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/hdmi/hdmi_i2c.o: in function `msm_dsi_is_master_dsi':
   hdmi_i2c.c:(.text+0x640): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/hdmi/hdmi_phy.o: in function `msm_dsi_is_master_dsi':
   hdmi_phy.c:(.text+0x200): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/hdmi/hdmi_phy_8960.o: in function `msm_dsi_is_master_dsi':
   hdmi_phy_8960.c:(.text+0x180): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/hdmi/hdmi_phy_8x60.o: in function `msm_dsi_is_master_dsi':
   hdmi_phy_8x60.c:(.text+0x240): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/hdmi/hdmi_phy_8x74.o: in function `msm_dsi_is_master_dsi':
   hdmi_phy_8x74.c:(.text+0x100): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/edp/edp.o: in function `msm_dsi_is_master_dsi':
   edp.c:(.text+0x2c0): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/edp/edp_aux.o: in function `msm_dsi_is_master_dsi':
   edp_aux.c:(.text+0x0): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/edp/edp_bridge.o: in function `msm_dsi_is_master_dsi':
   edp_bridge.c:(.text+0x2c0): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/edp/edp_connector.o: in function `msm_dsi_is_master_dsi':
   edp_connector.c:(.text+0x280): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/edp/edp_ctrl.o: in function `msm_dsi_is_master_dsi':
   edp_ctrl.c:(.text+0xe40): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/edp/edp_phy.o: in function `msm_dsi_is_master_dsi':
   edp_phy.c:(.text+0x0): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/disp/mdp_format.o: in function `msm_dsi_is_master_dsi':
   mdp_format.c:(.text+0x0): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/disp/mdp_kms.o: in function `msm_dsi_is_master_dsi':
   mdp_kms.c:(.text+0x300): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.o: in function `msm_dsi_is_master_dsi':
   mdp4_crtc.c:(.text+0x1640): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/disp/mdp4/mdp4_dtv_encoder.o: in function `msm_dsi_is_master_dsi':
   mdp4_dtv_encoder.c:(.text+0x540): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/disp/mdp4/mdp4_lcdc_encoder.o: in function `msm_dsi_is_master_dsi':
   mdp4_lcdc_encoder.c:(.text+0x880): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/disp/mdp4/mdp4_lvds_connector.o: in function `msm_dsi_is_master_dsi':
   mdp4_lvds_connector.c:(.text+0x180): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/disp/mdp4/mdp4_irq.o: in function `msm_dsi_is_master_dsi':
   mdp4_irq.c:(.text+0x100): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.o: in function `msm_dsi_is_master_dsi':
   mdp4_kms.c:(.text+0x900): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/disp/mdp4/mdp4_plane.o: in function `msm_dsi_is_master_dsi':
   mdp4_plane.c:(.text+0xac0): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.o: in function `msm_dsi_is_master_dsi':
   mdp5_cfg.c:(.text+0x0): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.o: in function `msm_dsi_is_master_dsi':
   mdp5_ctl.c:(.text+0x980): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.o: in function `msm_dsi_is_master_dsi':
   mdp5_crtc.c:(.text+0x44c0): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/disp/mdp5/mdp5_encoder.o: in function `msm_dsi_is_master_dsi':
   mdp5_encoder.c:(.text+0x1b40): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/disp/mdp5/mdp5_irq.o: in function `msm_dsi_is_master_dsi':
   mdp5_irq.c:(.text+0x100): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/disp/mdp5/mdp5_mdss.o: in function `msm_dsi_is_master_dsi':
   mdp5_mdss.c:(.text+0x440): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.o: in function `msm_dsi_is_master_dsi':
   mdp5_kms.c:(.text+0x1dc0): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/disp/mdp5/mdp5_pipe.o: in function `msm_dsi_is_master_dsi':
   mdp5_pipe.c:(.text+0x0): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/disp/mdp5/mdp5_mixer.o: in function `msm_dsi_is_master_dsi':
   mdp5_mixer.c:(.text+0x0): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.o: in function `msm_dsi_is_master_dsi':
   mdp5_plane.c:(.text+0x7ac0): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.o: in function `msm_dsi_is_master_dsi':
   mdp5_smp.c:(.text+0xa80): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.o: in function `msm_dsi_is_master_dsi':
   dpu_core_irq.c:(.text+0x240): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.o: in function `msm_dsi_is_master_dsi':
   dpu_core_perf.c:(.text+0x440): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.o: in function `msm_dsi_is_master_dsi':
   dpu_crtc.c:(.text+0x2ec0): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.o: in function `msm_dsi_is_master_dsi':
   dpu_encoder.c:(.text+0x3080): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.o: in function `msm_dsi_is_master_dsi':
   dpu_encoder_phys_cmd.c:(.text+0x1c00): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here
   aarch64-linux-ld: drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.o: in function `msm_dsi_is_master_dsi':
   dpu_encoder_phys_vid.c:(.text+0x18c0): multiple definition of `msm_dsi_is_master_dsi'; drivers/gpu/drm/msm/adreno/adreno_device.o:adreno_device.c:(.text+0x3c0): first defined here

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 30211 bytes --]

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

* Re: [PATCH v4 1/7] drm/msm/dsi: rename dual DSI to bonded DSI
  2021-07-17 12:40 ` [PATCH v4 1/7] drm/msm/dsi: rename dual DSI to bonded DSI Dmitry Baryshkov
@ 2021-07-23  3:07   ` Bjorn Andersson
  0 siblings, 0 replies; 16+ messages in thread
From: Bjorn Andersson @ 2021-07-23  3:07 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: freedreno, Jonathan Marek, Stephen Boyd, linux-arm-msm,
	Abhinav Kumar, David Airlie, dri-devel, Sean Paul

On Sat 17 Jul 05:40 PDT 2021, Dmitry Baryshkov wrote:

> We are preparing to support two independent DSI hosts in the DSI/DPU
> code. To remove possible confusion (as both configurations can be
> referenced as dual DSI) let's rename old "dual DSI" (two DSI hosts
> driving single device, with clocks being locked) to "bonded DSI".
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org>

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Regards,
Bjorn

> ---
>  drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c   |   2 +-
>  drivers/gpu/drm/msm/dsi/dsi.h              |   8 +-
>  drivers/gpu/drm/msm/dsi/dsi_cfg.h          |   2 +-
>  drivers/gpu/drm/msm/dsi/dsi_host.c         |  34 +++----
>  drivers/gpu/drm/msm/dsi/dsi_manager.c      | 101 ++++++++++-----------
>  drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c |   2 +-
>  drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c |   6 +-
>  drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c  |   2 +-
>  8 files changed, 78 insertions(+), 79 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c
> index 81b0c7cf954e..1220f2b20e05 100644
> --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c
> +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c
> @@ -737,7 +737,7 @@ struct mdp5_ctl_manager *mdp5_ctlm_init(struct drm_device *dev,
>  	}
>  
>  	/*
> -	 * In Dual DSI case, CTL0 and CTL1 are always assigned to two DSI
> +	 * In bonded DSI case, CTL0 and CTL1 are always assigned to two DSI
>  	 * interfaces to support single FLUSH feature (Flush CTL0 and CTL1 when
>  	 * only write into CTL0's FLUSH register) to keep two DSI pipes in sync.
>  	 * Single FLUSH is supported from hw rev v3.0.
> diff --git a/drivers/gpu/drm/msm/dsi/dsi.h b/drivers/gpu/drm/msm/dsi/dsi.h
> index 9b8e9b07eced..856a532850c0 100644
> --- a/drivers/gpu/drm/msm/dsi/dsi.h
> +++ b/drivers/gpu/drm/msm/dsi/dsi.h
> @@ -109,7 +109,7 @@ int msm_dsi_host_enable(struct mipi_dsi_host *host);
>  int msm_dsi_host_disable(struct mipi_dsi_host *host);
>  int msm_dsi_host_power_on(struct mipi_dsi_host *host,
>  			struct msm_dsi_phy_shared_timings *phy_shared_timings,
> -			bool is_dual_dsi);
> +			bool is_bonded_dsi);
>  int msm_dsi_host_power_off(struct mipi_dsi_host *host);
>  int msm_dsi_host_set_display_mode(struct mipi_dsi_host *host,
>  				  const struct drm_display_mode *mode);
> @@ -123,7 +123,7 @@ int msm_dsi_host_set_src_pll(struct mipi_dsi_host *host,
>  void msm_dsi_host_reset_phy(struct mipi_dsi_host *host);
>  void msm_dsi_host_get_phy_clk_req(struct mipi_dsi_host *host,
>  	struct msm_dsi_phy_clk_request *clk_req,
> -	bool is_dual_dsi);
> +	bool is_bonded_dsi);
>  void msm_dsi_host_destroy(struct mipi_dsi_host *host);
>  int msm_dsi_host_modeset_init(struct mipi_dsi_host *host,
>  					struct drm_device *dev);
> @@ -145,8 +145,8 @@ int dsi_dma_base_get_6g(struct msm_dsi_host *msm_host, uint64_t *iova);
>  int dsi_dma_base_get_v2(struct msm_dsi_host *msm_host, uint64_t *iova);
>  int dsi_clk_init_v2(struct msm_dsi_host *msm_host);
>  int dsi_clk_init_6g_v2(struct msm_dsi_host *msm_host);
> -int dsi_calc_clk_rate_v2(struct msm_dsi_host *msm_host, bool is_dual_dsi);
> -int dsi_calc_clk_rate_6g(struct msm_dsi_host *msm_host, bool is_dual_dsi);
> +int dsi_calc_clk_rate_v2(struct msm_dsi_host *msm_host, bool is_bonded_dsi);
> +int dsi_calc_clk_rate_6g(struct msm_dsi_host *msm_host, bool is_bonded_dsi);
>  void msm_dsi_host_snapshot(struct msm_disp_state *disp_state, struct mipi_dsi_host *host);
>  /* dsi phy */
>  struct msm_dsi_phy;
> diff --git a/drivers/gpu/drm/msm/dsi/dsi_cfg.h b/drivers/gpu/drm/msm/dsi/dsi_cfg.h
> index ade9b609c7d9..2bce00d5a9fc 100644
> --- a/drivers/gpu/drm/msm/dsi/dsi_cfg.h
> +++ b/drivers/gpu/drm/msm/dsi/dsi_cfg.h
> @@ -47,7 +47,7 @@ struct msm_dsi_host_cfg_ops {
>  	void* (*tx_buf_get)(struct msm_dsi_host *msm_host);
>  	void (*tx_buf_put)(struct msm_dsi_host *msm_host);
>  	int (*dma_base_get)(struct msm_dsi_host *msm_host, uint64_t *iova);
> -	int (*calc_clk_rate)(struct msm_dsi_host *msm_host, bool is_dual_dsi);
> +	int (*calc_clk_rate)(struct msm_dsi_host *msm_host, bool is_bonded_dsi);
>  };
>  
>  struct msm_dsi_cfg_handler {
> diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
> index ed504fe5074f..706634d766ee 100644
> --- a/drivers/gpu/drm/msm/dsi/dsi_host.c
> +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
> @@ -679,7 +679,7 @@ void dsi_link_clk_disable_v2(struct msm_dsi_host *msm_host)
>  	clk_disable_unprepare(msm_host->byte_clk);
>  }
>  
> -static u32 dsi_get_pclk_rate(struct msm_dsi_host *msm_host, bool is_dual_dsi)
> +static u32 dsi_get_pclk_rate(struct msm_dsi_host *msm_host, bool is_bonded_dsi)
>  {
>  	struct drm_display_mode *mode = msm_host->mode;
>  	u32 pclk_rate;
> @@ -687,22 +687,22 @@ static u32 dsi_get_pclk_rate(struct msm_dsi_host *msm_host, bool is_dual_dsi)
>  	pclk_rate = mode->clock * 1000;
>  
>  	/*
> -	 * For dual DSI mode, the current DRM mode has the complete width of the
> +	 * For bonded DSI mode, the current DRM mode has the complete width of the
>  	 * panel. Since, the complete panel is driven by two DSI controllers,
>  	 * the clock rates have to be split between the two dsi controllers.
>  	 * Adjust the byte and pixel clock rates for each dsi host accordingly.
>  	 */
> -	if (is_dual_dsi)
> +	if (is_bonded_dsi)
>  		pclk_rate /= 2;
>  
>  	return pclk_rate;
>  }
>  
> -static void dsi_calc_pclk(struct msm_dsi_host *msm_host, bool is_dual_dsi)
> +static void dsi_calc_pclk(struct msm_dsi_host *msm_host, bool is_bonded_dsi)
>  {
>  	u8 lanes = msm_host->lanes;
>  	u32 bpp = dsi_get_bpp(msm_host->format);
> -	u32 pclk_rate = dsi_get_pclk_rate(msm_host, is_dual_dsi);
> +	u32 pclk_rate = dsi_get_pclk_rate(msm_host, is_bonded_dsi);
>  	u64 pclk_bpp = (u64)pclk_rate * bpp;
>  
>  	if (lanes == 0) {
> @@ -720,28 +720,28 @@ static void dsi_calc_pclk(struct msm_dsi_host *msm_host, bool is_dual_dsi)
>  
>  }
>  
> -int dsi_calc_clk_rate_6g(struct msm_dsi_host *msm_host, bool is_dual_dsi)
> +int dsi_calc_clk_rate_6g(struct msm_dsi_host *msm_host, bool is_bonded_dsi)
>  {
>  	if (!msm_host->mode) {
>  		pr_err("%s: mode not set\n", __func__);
>  		return -EINVAL;
>  	}
>  
> -	dsi_calc_pclk(msm_host, is_dual_dsi);
> +	dsi_calc_pclk(msm_host, is_bonded_dsi);
>  	msm_host->esc_clk_rate = clk_get_rate(msm_host->esc_clk);
>  	return 0;
>  }
>  
> -int dsi_calc_clk_rate_v2(struct msm_dsi_host *msm_host, bool is_dual_dsi)
> +int dsi_calc_clk_rate_v2(struct msm_dsi_host *msm_host, bool is_bonded_dsi)
>  {
>  	u32 bpp = dsi_get_bpp(msm_host->format);
>  	u64 pclk_bpp;
>  	unsigned int esc_mhz, esc_div;
>  	unsigned long byte_mhz;
>  
> -	dsi_calc_pclk(msm_host, is_dual_dsi);
> +	dsi_calc_pclk(msm_host, is_bonded_dsi);
>  
> -	pclk_bpp = (u64)dsi_get_pclk_rate(msm_host, is_dual_dsi) * bpp;
> +	pclk_bpp = (u64)dsi_get_pclk_rate(msm_host, is_bonded_dsi) * bpp;
>  	do_div(pclk_bpp, 8);
>  	msm_host->src_clk_rate = pclk_bpp;
>  
> @@ -938,7 +938,7 @@ static void dsi_ctrl_config(struct msm_dsi_host *msm_host, bool enable,
>  	dsi_write(msm_host, REG_DSI_CTRL, data);
>  }
>  
> -static void dsi_timing_setup(struct msm_dsi_host *msm_host, bool is_dual_dsi)
> +static void dsi_timing_setup(struct msm_dsi_host *msm_host, bool is_bonded_dsi)
>  {
>  	struct drm_display_mode *mode = msm_host->mode;
>  	u32 hs_start = 0, vs_start = 0; /* take sync start as 0 */
> @@ -956,13 +956,13 @@ static void dsi_timing_setup(struct msm_dsi_host *msm_host, bool is_dual_dsi)
>  	DBG("");
>  
>  	/*
> -	 * For dual DSI mode, the current DRM mode has
> +	 * For bonded DSI mode, the current DRM mode has
>  	 * the complete width of the panel. Since, the complete
>  	 * panel is driven by two DSI controllers, the horizontal
>  	 * timings have to be split between the two dsi controllers.
>  	 * Adjust the DSI host timing values accordingly.
>  	 */
> -	if (is_dual_dsi) {
> +	if (is_bonded_dsi) {
>  		h_total /= 2;
>  		hs_end /= 2;
>  		ha_start /= 2;
> @@ -2285,13 +2285,13 @@ void msm_dsi_host_reset_phy(struct mipi_dsi_host *host)
>  
>  void msm_dsi_host_get_phy_clk_req(struct mipi_dsi_host *host,
>  			struct msm_dsi_phy_clk_request *clk_req,
> -			bool is_dual_dsi)
> +			bool is_bonded_dsi)
>  {
>  	struct msm_dsi_host *msm_host = to_msm_dsi_host(host);
>  	const struct msm_dsi_cfg_handler *cfg_hnd = msm_host->cfg_hnd;
>  	int ret;
>  
> -	ret = cfg_hnd->ops->calc_clk_rate(msm_host, is_dual_dsi);
> +	ret = cfg_hnd->ops->calc_clk_rate(msm_host, is_bonded_dsi);
>  	if (ret) {
>  		pr_err("%s: unable to calc clk rate, %d\n", __func__, ret);
>  		return;
> @@ -2354,7 +2354,7 @@ static void msm_dsi_sfpb_config(struct msm_dsi_host *msm_host, bool enable)
>  
>  int msm_dsi_host_power_on(struct mipi_dsi_host *host,
>  			struct msm_dsi_phy_shared_timings *phy_shared_timings,
> -			bool is_dual_dsi)
> +			bool is_bonded_dsi)
>  {
>  	struct msm_dsi_host *msm_host = to_msm_dsi_host(host);
>  	const struct msm_dsi_cfg_handler *cfg_hnd = msm_host->cfg_hnd;
> @@ -2392,7 +2392,7 @@ int msm_dsi_host_power_on(struct mipi_dsi_host *host,
>  		goto fail_disable_clk;
>  	}
>  
> -	dsi_timing_setup(msm_host, is_dual_dsi);
> +	dsi_timing_setup(msm_host, is_bonded_dsi);
>  	dsi_sw_reset(msm_host);
>  	dsi_ctrl_config(msm_host, true, phy_shared_timings);
>  
> diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c
> index 4ebfedc4a9ac..b20645ab279b 100644
> --- a/drivers/gpu/drm/msm/dsi/dsi_manager.c
> +++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c
> @@ -21,14 +21,14 @@
>  struct msm_dsi_manager {
>  	struct msm_dsi *dsi[DSI_MAX];
>  
> -	bool is_dual_dsi;
> +	bool is_bonded_dsi;
>  	bool is_sync_needed;
>  	int master_dsi_link_id;
>  };
>  
>  static struct msm_dsi_manager msm_dsim_glb;
>  
> -#define IS_DUAL_DSI()		(msm_dsim_glb.is_dual_dsi)
> +#define IS_BONDED_DSI()		(msm_dsim_glb.is_bonded_dsi)
>  #define IS_SYNC_NEEDED()	(msm_dsim_glb.is_sync_needed)
>  #define IS_MASTER_DSI_LINK(id)	(msm_dsim_glb.master_dsi_link_id == id)
>  
> @@ -42,18 +42,17 @@ static inline struct msm_dsi *dsi_mgr_get_other_dsi(int id)
>  	return msm_dsim_glb.dsi[(id + 1) % DSI_MAX];
>  }
>  
> -static int dsi_mgr_parse_dual_dsi(struct device_node *np, int id)
> +static int dsi_mgr_parse_of(struct device_node *np, int id)
>  {
>  	struct msm_dsi_manager *msm_dsim = &msm_dsim_glb;
>  
> -	/* We assume 2 dsi nodes have the same information of dual-dsi and
> -	 * sync-mode, and only one node specifies master in case of dual mode.
> +	/* We assume 2 dsi nodes have the same information of bonded dsi and
> +	 * sync-mode, and only one node specifies master in case of bonded mode.
>  	 */
> -	if (!msm_dsim->is_dual_dsi)
> -		msm_dsim->is_dual_dsi = of_property_read_bool(
> -						np, "qcom,dual-dsi-mode");
> +	if (!msm_dsim->is_bonded_dsi)
> +		msm_dsim->is_bonded_dsi = of_property_read_bool(np, "qcom,dual-dsi-mode");
>  
> -	if (msm_dsim->is_dual_dsi) {
> +	if (msm_dsim->is_bonded_dsi) {
>  		if (of_property_read_bool(np, "qcom,master-dsi"))
>  			msm_dsim->master_dsi_link_id = id;
>  		if (!msm_dsim->is_sync_needed)
> @@ -72,7 +71,7 @@ static int dsi_mgr_setup_components(int id)
>  	struct msm_dsi *clk_slave_dsi = dsi_mgr_get_dsi(DSI_CLOCK_SLAVE);
>  	int ret;
>  
> -	if (!IS_DUAL_DSI()) {
> +	if (!IS_BONDED_DSI()) {
>  		ret = msm_dsi_host_register(msm_dsi->host, true);
>  		if (ret)
>  			return ret;
> @@ -100,7 +99,7 @@ static int dsi_mgr_setup_components(int id)
>  		if (ret)
>  			return ret;
>  
> -		/* PLL0 is to drive both 2 DSI link clocks in Dual DSI mode. */
> +		/* PLL0 is to drive both 2 DSI link clocks in bonded DSI mode. */
>  		msm_dsi_phy_set_usecase(clk_master_dsi->phy,
>  					MSM_DSI_PHY_MASTER);
>  		msm_dsi_phy_set_usecase(clk_slave_dsi->phy,
> @@ -119,9 +118,9 @@ static int enable_phy(struct msm_dsi *msm_dsi,
>  {
>  	struct msm_dsi_phy_clk_request clk_req;
>  	int ret;
> -	bool is_dual_dsi = IS_DUAL_DSI();
> +	bool is_bonded_dsi = IS_BONDED_DSI();
>  
> -	msm_dsi_host_get_phy_clk_req(msm_dsi->host, &clk_req, is_dual_dsi);
> +	msm_dsi_host_get_phy_clk_req(msm_dsi->host, &clk_req, is_bonded_dsi);
>  
>  	ret = msm_dsi_phy_enable(msm_dsi->phy, &clk_req);
>  	msm_dsi_phy_get_shared_timings(msm_dsi->phy, shared_timings);
> @@ -138,12 +137,12 @@ dsi_mgr_phy_enable(int id,
>  	struct msm_dsi *sdsi = dsi_mgr_get_dsi(DSI_CLOCK_SLAVE);
>  	int ret;
>  
> -	/* In case of dual DSI, some registers in PHY1 have been programmed
> +	/* In case of bonded DSI, some registers in PHY1 have been programmed
>  	 * during PLL0 clock's set_rate. The PHY1 reset called by host1 here
>  	 * will silently reset those PHY1 registers. Therefore we need to reset
>  	 * and enable both PHYs before any PLL clock operation.
>  	 */
> -	if (IS_DUAL_DSI() && mdsi && sdsi) {
> +	if (IS_BONDED_DSI() && mdsi && sdsi) {
>  		if (!mdsi->phy_enabled && !sdsi->phy_enabled) {
>  			msm_dsi_host_reset_phy(mdsi->host);
>  			msm_dsi_host_reset_phy(sdsi->host);
> @@ -178,11 +177,11 @@ static void dsi_mgr_phy_disable(int id)
>  	struct msm_dsi *sdsi = dsi_mgr_get_dsi(DSI_CLOCK_SLAVE);
>  
>  	/* disable DSI phy
> -	 * In dual-dsi configuration, the phy should be disabled for the
> +	 * In bonded dsi configuration, the phy should be disabled for the
>  	 * first controller only when the second controller is disabled.
>  	 */
>  	msm_dsi->phy_enabled = false;
> -	if (IS_DUAL_DSI() && mdsi && sdsi) {
> +	if (IS_BONDED_DSI() && mdsi && sdsi) {
>  		if (!mdsi->phy_enabled && !sdsi->phy_enabled) {
>  			msm_dsi_phy_disable(sdsi->phy);
>  			msm_dsi_phy_disable(mdsi->phy);
> @@ -244,7 +243,7 @@ static int msm_dsi_manager_panel_init(struct drm_connector *conn, u8 id)
>  	struct msm_dsi *master_dsi, *slave_dsi;
>  	struct drm_panel *panel;
>  
> -	if (IS_DUAL_DSI() && !IS_MASTER_DSI_LINK(id)) {
> +	if (IS_BONDED_DSI() && !IS_MASTER_DSI_LINK(id)) {
>  		master_dsi = other_dsi;
>  		slave_dsi = msm_dsi;
>  	} else {
> @@ -253,7 +252,7 @@ static int msm_dsi_manager_panel_init(struct drm_connector *conn, u8 id)
>  	}
>  
>  	/*
> -	 * There is only 1 panel in the global panel list for dual DSI mode.
> +	 * There is only 1 panel in the global panel list for bonded DSI mode.
>  	 * Therefore slave dsi should get the drm_panel instance from master
>  	 * dsi.
>  	 */
> @@ -264,14 +263,14 @@ static int msm_dsi_manager_panel_init(struct drm_connector *conn, u8 id)
>  		return PTR_ERR(panel);
>  	}
>  
> -	if (!panel || !IS_DUAL_DSI())
> +	if (!panel || !IS_BONDED_DSI())
>  		goto out;
>  
>  	drm_object_attach_property(&conn->base,
>  				   conn->dev->mode_config.tile_property, 0);
>  
>  	/*
> -	 * Set split display info to kms once dual DSI panel is connected to
> +	 * Set split display info to kms once bonded DSI panel is connected to
>  	 * both hosts.
>  	 */
>  	if (other_dsi && other_dsi->panel && kms->funcs->set_split_display) {
> @@ -317,7 +316,7 @@ static int dsi_mgr_connector_get_modes(struct drm_connector *connector)
>  		return 0;
>  
>  	/*
> -	 * In dual DSI mode, we have one connector that can be
> +	 * In bonded DSI mode, we have one connector that can be
>  	 * attached to the drm_panel.
>  	 */
>  	num = drm_panel_get_modes(panel, connector);
> @@ -366,30 +365,30 @@ static void dsi_mgr_bridge_pre_enable(struct drm_bridge *bridge)
>  	struct mipi_dsi_host *host = msm_dsi->host;
>  	struct drm_panel *panel = msm_dsi->panel;
>  	struct msm_dsi_phy_shared_timings phy_shared_timings[DSI_MAX];
> -	bool is_dual_dsi = IS_DUAL_DSI();
> +	bool is_bonded_dsi = IS_BONDED_DSI();
>  	int ret;
>  
>  	DBG("id=%d", id);
>  	if (!msm_dsi_device_connected(msm_dsi))
>  		return;
>  
> -	/* Do nothing with the host if it is slave-DSI in case of dual DSI */
> -	if (is_dual_dsi && !IS_MASTER_DSI_LINK(id))
> +	/* Do nothing with the host if it is slave-DSI in case of bonded DSI */
> +	if (is_bonded_dsi && !IS_MASTER_DSI_LINK(id))
>  		return;
>  
>  	ret = dsi_mgr_phy_enable(id, phy_shared_timings);
>  	if (ret)
>  		goto phy_en_fail;
>  
> -	ret = msm_dsi_host_power_on(host, &phy_shared_timings[id], is_dual_dsi);
> +	ret = msm_dsi_host_power_on(host, &phy_shared_timings[id], is_bonded_dsi);
>  	if (ret) {
>  		pr_err("%s: power on host %d failed, %d\n", __func__, id, ret);
>  		goto host_on_fail;
>  	}
>  
> -	if (is_dual_dsi && msm_dsi1) {
> +	if (is_bonded_dsi && msm_dsi1) {
>  		ret = msm_dsi_host_power_on(msm_dsi1->host,
> -				&phy_shared_timings[DSI_1], is_dual_dsi);
> +				&phy_shared_timings[DSI_1], is_bonded_dsi);
>  		if (ret) {
>  			pr_err("%s: power on host1 failed, %d\n",
>  							__func__, ret);
> @@ -415,7 +414,7 @@ static void dsi_mgr_bridge_pre_enable(struct drm_bridge *bridge)
>  		goto host_en_fail;
>  	}
>  
> -	if (is_dual_dsi && msm_dsi1) {
> +	if (is_bonded_dsi && msm_dsi1) {
>  		ret = msm_dsi_host_enable(msm_dsi1->host);
>  		if (ret) {
>  			pr_err("%s: enable host1 failed, %d\n", __func__, ret);
> @@ -431,7 +430,7 @@ static void dsi_mgr_bridge_pre_enable(struct drm_bridge *bridge)
>  	if (panel)
>  		drm_panel_unprepare(panel);
>  panel_prep_fail:
> -	if (is_dual_dsi && msm_dsi1)
> +	if (is_bonded_dsi && msm_dsi1)
>  		msm_dsi_host_power_off(msm_dsi1->host);
>  host1_on_fail:
>  	msm_dsi_host_power_off(host);
> @@ -446,15 +445,15 @@ static void dsi_mgr_bridge_enable(struct drm_bridge *bridge)
>  	int id = dsi_mgr_bridge_get_id(bridge);
>  	struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id);
>  	struct drm_panel *panel = msm_dsi->panel;
> -	bool is_dual_dsi = IS_DUAL_DSI();
> +	bool is_bonded_dsi = IS_BONDED_DSI();
>  	int ret;
>  
>  	DBG("id=%d", id);
>  	if (!msm_dsi_device_connected(msm_dsi))
>  		return;
>  
> -	/* Do nothing with the host if it is slave-DSI in case of dual DSI */
> -	if (is_dual_dsi && !IS_MASTER_DSI_LINK(id))
> +	/* Do nothing with the host if it is slave-DSI in case of bonded DSI */
> +	if (is_bonded_dsi && !IS_MASTER_DSI_LINK(id))
>  		return;
>  
>  	if (panel) {
> @@ -471,15 +470,15 @@ static void dsi_mgr_bridge_disable(struct drm_bridge *bridge)
>  	int id = dsi_mgr_bridge_get_id(bridge);
>  	struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id);
>  	struct drm_panel *panel = msm_dsi->panel;
> -	bool is_dual_dsi = IS_DUAL_DSI();
> +	bool is_bonded_dsi = IS_BONDED_DSI();
>  	int ret;
>  
>  	DBG("id=%d", id);
>  	if (!msm_dsi_device_connected(msm_dsi))
>  		return;
>  
> -	/* Do nothing with the host if it is slave-DSI in case of dual DSI */
> -	if (is_dual_dsi && !IS_MASTER_DSI_LINK(id))
> +	/* Do nothing with the host if it is slave-DSI in case of bonded DSI */
> +	if (is_bonded_dsi && !IS_MASTER_DSI_LINK(id))
>  		return;
>  
>  	if (panel) {
> @@ -497,7 +496,7 @@ static void dsi_mgr_bridge_post_disable(struct drm_bridge *bridge)
>  	struct msm_dsi *msm_dsi1 = dsi_mgr_get_dsi(DSI_1);
>  	struct mipi_dsi_host *host = msm_dsi->host;
>  	struct drm_panel *panel = msm_dsi->panel;
> -	bool is_dual_dsi = IS_DUAL_DSI();
> +	bool is_bonded_dsi = IS_BONDED_DSI();
>  	int ret;
>  
>  	DBG("id=%d", id);
> @@ -506,18 +505,18 @@ static void dsi_mgr_bridge_post_disable(struct drm_bridge *bridge)
>  		return;
>  
>  	/*
> -	 * Do nothing with the host if it is slave-DSI in case of dual DSI.
> +	 * Do nothing with the host if it is slave-DSI in case of bonded DSI.
>  	 * It is safe to call dsi_mgr_phy_disable() here because a single PHY
>  	 * won't be diabled until both PHYs request disable.
>  	 */
> -	if (is_dual_dsi && !IS_MASTER_DSI_LINK(id))
> +	if (is_bonded_dsi && !IS_MASTER_DSI_LINK(id))
>  		goto disable_phy;
>  
>  	ret = msm_dsi_host_disable(host);
>  	if (ret)
>  		pr_err("%s: host %d disable failed, %d\n", __func__, id, ret);
>  
> -	if (is_dual_dsi && msm_dsi1) {
> +	if (is_bonded_dsi && msm_dsi1) {
>  		ret = msm_dsi_host_disable(msm_dsi1->host);
>  		if (ret)
>  			pr_err("%s: host1 disable failed, %d\n", __func__, ret);
> @@ -537,7 +536,7 @@ static void dsi_mgr_bridge_post_disable(struct drm_bridge *bridge)
>  	if (ret)
>  		pr_err("%s: host %d power off failed,%d\n", __func__, id, ret);
>  
> -	if (is_dual_dsi && msm_dsi1) {
> +	if (is_bonded_dsi && msm_dsi1) {
>  		ret = msm_dsi_host_power_off(msm_dsi1->host);
>  		if (ret)
>  			pr_err("%s: host1 power off failed, %d\n",
> @@ -556,15 +555,15 @@ static void dsi_mgr_bridge_mode_set(struct drm_bridge *bridge,
>  	struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id);
>  	struct msm_dsi *other_dsi = dsi_mgr_get_other_dsi(id);
>  	struct mipi_dsi_host *host = msm_dsi->host;
> -	bool is_dual_dsi = IS_DUAL_DSI();
> +	bool is_bonded_dsi = IS_BONDED_DSI();
>  
>  	DBG("set mode: " DRM_MODE_FMT, DRM_MODE_ARG(mode));
>  
> -	if (is_dual_dsi && !IS_MASTER_DSI_LINK(id))
> +	if (is_bonded_dsi && !IS_MASTER_DSI_LINK(id))
>  		return;
>  
>  	msm_dsi_host_set_display_mode(host, adjusted_mode);
> -	if (is_dual_dsi && other_dsi)
> +	if (is_bonded_dsi && other_dsi)
>  		msm_dsi_host_set_display_mode(other_dsi->host, adjusted_mode);
>  }
>  
> @@ -640,15 +639,15 @@ struct drm_connector *msm_dsi_manager_connector_init(u8 id)
>  
>  bool msm_dsi_manager_validate_current_config(u8 id)
>  {
> -	bool is_dual_dsi = IS_DUAL_DSI();
> +	bool is_bonded_dsi = IS_BONDED_DSI();
>  
>  	/*
> -	 * For dual DSI, we only have one drm panel. For this
> +	 * For bonded DSI, we only have one drm panel. For this
>  	 * use case, we register only one bridge/connector.
>  	 * Skip bridge/connector initialisation if it is
> -	 * slave-DSI for dual DSI configuration.
> +	 * slave-DSI for bonded DSI configuration.
>  	 */
> -	if (is_dual_dsi && !IS_MASTER_DSI_LINK(id)) {
> +	if (is_bonded_dsi && !IS_MASTER_DSI_LINK(id)) {
>  		DBG("Skip bridge registration for slave DSI->id: %d\n", id);
>  		return false;
>  	}
> @@ -740,7 +739,7 @@ int msm_dsi_manager_cmd_xfer(int id, const struct mipi_dsi_msg *msg)
>  	if (!msg->tx_buf || !msg->tx_len)
>  		return 0;
>  
> -	/* In dual master case, panel requires the same commands sent to
> +	/* In bonded master case, panel requires the same commands sent to
>  	 * both DSI links. Host issues the command trigger to both links
>  	 * when DSI_1 calls the cmd transfer function, no matter it happens
>  	 * before or after DSI_0 cmd transfer.
> @@ -809,9 +808,9 @@ int msm_dsi_manager_register(struct msm_dsi *msm_dsi)
>  
>  	msm_dsim->dsi[id] = msm_dsi;
>  
> -	ret = dsi_mgr_parse_dual_dsi(msm_dsi->pdev->dev.of_node, id);
> +	ret = dsi_mgr_parse_of(msm_dsi->pdev->dev.of_node, id);
>  	if (ret) {
> -		pr_err("%s: failed to parse dual DSI info\n", __func__);
> +		pr_err("%s: failed to parse OF DSI info\n", __func__);
>  		goto fail;
>  	}
>  
> diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c
> index e46b10fc793a..d8128f50b0dd 100644
> --- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c
> +++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c
> @@ -84,7 +84,7 @@ struct dsi_pll_10nm {
>  #define to_pll_10nm(x)	container_of(x, struct dsi_pll_10nm, clk_hw)
>  
>  /*
> - * Global list of private DSI PLL struct pointers. We need this for Dual DSI
> + * Global list of private DSI PLL struct pointers. We need this for bonded DSI
>   * mode, where the master PLL's clk_ops needs access the slave's private data
>   */
>  static struct dsi_pll_10nm *pll_10nm_list[DSI_MAX];
> diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c
> index a34cf151c517..e7f857ad02a3 100644
> --- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c
> +++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c
> @@ -86,7 +86,7 @@ struct dsi_pll_14nm {
>  /*
>   * Private struct for N1/N2 post-divider clocks. These clocks are similar to
>   * the generic clk_divider class of clocks. The only difference is that it
> - * also sets the slave DSI PLL's post-dividers if in Dual DSI mode
> + * also sets the slave DSI PLL's post-dividers if in bonded DSI mode
>   */
>  struct dsi_pll_14nm_postdiv {
>  	struct clk_hw hw;
> @@ -102,7 +102,7 @@ struct dsi_pll_14nm_postdiv {
>  #define to_pll_14nm_postdiv(_hw) container_of(_hw, struct dsi_pll_14nm_postdiv, hw)
>  
>  /*
> - * Global list of private DSI PLL struct pointers. We need this for Dual DSI
> + * Global list of private DSI PLL struct pointers. We need this for bonded DSI
>   * mode, where the master PLL's clk_ops needs access the slave's private data
>   */
>  static struct dsi_pll_14nm *pll_14nm_list[DSI_MAX];
> @@ -658,7 +658,7 @@ static int dsi_pll_14nm_postdiv_set_rate(struct clk_hw *hw, unsigned long rate,
>  	val |= value << shift;
>  	dsi_phy_write(base + REG_DSI_14nm_PHY_CMN_CLK_CFG0, val);
>  
> -	/* If we're master in dual DSI mode, then the slave PLL's post-dividers
> +	/* If we're master in bonded DSI mode, then the slave PLL's post-dividers
>  	 * follow the master's post dividers
>  	 */
>  	if (pll_14nm->phy->usecase == MSM_DSI_PHY_MASTER) {
> diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c
> index 7c23d4c47338..ab26b530fbcf 100644
> --- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c
> +++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c
> @@ -83,7 +83,7 @@ struct dsi_pll_7nm {
>  #define to_pll_7nm(x)	container_of(x, struct dsi_pll_7nm, clk_hw)
>  
>  /*
> - * Global list of private DSI PLL struct pointers. We need this for Dual DSI
> + * Global list of private DSI PLL struct pointers. We need this for bonded DSI
>   * mode, where the master PLL's clk_ops needs access the slave's private data
>   */
>  static struct dsi_pll_7nm *pll_7nm_list[DSI_MAX];
> -- 
> 2.30.2
> 

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

* Re: [PATCH v4 2/7] drm/msm/dsi: add three helper functions
  2021-07-17 12:40 ` [PATCH v4 2/7] drm/msm/dsi: add three helper functions Dmitry Baryshkov
  2021-07-19 10:31   ` kernel test robot
@ 2021-07-25  4:05   ` Bjorn Andersson
  1 sibling, 0 replies; 16+ messages in thread
From: Bjorn Andersson @ 2021-07-25  4:05 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: freedreno, Jonathan Marek, Stephen Boyd, linux-arm-msm,
	Abhinav Kumar, David Airlie, dri-devel, Sean Paul

On Sat 17 Jul 07:40 CDT 2021, Dmitry Baryshkov wrote:

> Add three helper functions to be used by display drivers for setting up
> encoders.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org>
> ---
>  drivers/gpu/drm/msm/dsi/dsi.c         |  7 +++++++
>  drivers/gpu/drm/msm/dsi/dsi_manager.c | 19 +++++++++++--------
>  drivers/gpu/drm/msm/msm_drv.h         | 17 +++++++++++++++--
>  3 files changed, 33 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/dsi/dsi.c b/drivers/gpu/drm/msm/dsi/dsi.c
> index 75afc12a7b25..5201d7eb0490 100644
> --- a/drivers/gpu/drm/msm/dsi/dsi.c
> +++ b/drivers/gpu/drm/msm/dsi/dsi.c
> @@ -13,6 +13,13 @@ struct drm_encoder *msm_dsi_get_encoder(struct msm_dsi *msm_dsi)
>  	return msm_dsi->encoder;
>  }
>  
> +bool msm_dsi_is_cmd_mode(struct msm_dsi *msm_dsi)
> +{
> +	unsigned long host_flags = msm_dsi_host_get_mode_flags(msm_dsi->host);
> +
> +	return !(host_flags & MIPI_DSI_MODE_VIDEO);
> +}
> +
>  static int dsi_get_phy(struct msm_dsi *msm_dsi)
>  {
>  	struct platform_device *pdev = msm_dsi->pdev;
> diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c
> index b20645ab279b..27d3b9ebf831 100644
> --- a/drivers/gpu/drm/msm/dsi/dsi_manager.c
> +++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c
> @@ -216,12 +216,6 @@ static int dsi_mgr_bridge_get_id(struct drm_bridge *bridge)
>  	return dsi_bridge->id;
>  }
>  
> -static bool dsi_mgr_is_cmd_mode(struct msm_dsi *msm_dsi)
> -{
> -	unsigned long host_flags = msm_dsi_host_get_mode_flags(msm_dsi->host);
> -	return !(host_flags & MIPI_DSI_MODE_VIDEO);
> -}
> -
>  void msm_dsi_manager_setup_encoder(int id)
>  {
>  	struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id);
> @@ -231,7 +225,7 @@ void msm_dsi_manager_setup_encoder(int id)
>  
>  	if (encoder && kms->funcs->set_encoder_mode)
>  		kms->funcs->set_encoder_mode(kms, encoder,
> -					     dsi_mgr_is_cmd_mode(msm_dsi));
> +					     msm_dsi_is_cmd_mode(msm_dsi));
>  }
>  
>  static int msm_dsi_manager_panel_init(struct drm_connector *conn, u8 id)
> @@ -276,7 +270,7 @@ static int msm_dsi_manager_panel_init(struct drm_connector *conn, u8 id)
>  	if (other_dsi && other_dsi->panel && kms->funcs->set_split_display) {
>  		kms->funcs->set_split_display(kms, master_dsi->encoder,
>  					      slave_dsi->encoder,
> -					      dsi_mgr_is_cmd_mode(msm_dsi));
> +					      msm_dsi_is_cmd_mode(msm_dsi));
>  	}
>  
>  out:
> @@ -839,3 +833,12 @@ void msm_dsi_manager_unregister(struct msm_dsi *msm_dsi)
>  		msm_dsim->dsi[msm_dsi->id] = NULL;
>  }
>  
> +bool msm_dsi_is_bonded_dsi(struct msm_dsi *msm_dsi)
> +{
> +	return IS_BONDED_DSI();
> +}
> +
> +bool msm_dsi_is_master_dsi(struct msm_dsi *msm_dsi)
> +{
> +	return IS_MASTER_DSI_LINK(msm_dsi->id);
> +}
> diff --git a/drivers/gpu/drm/msm/msm_drv.h b/drivers/gpu/drm/msm/msm_drv.h
> index 1a48a709ffb3..9bfd37855969 100644
> --- a/drivers/gpu/drm/msm/msm_drv.h
> +++ b/drivers/gpu/drm/msm/msm_drv.h
> @@ -350,7 +350,9 @@ void __exit msm_dsi_unregister(void);
>  int msm_dsi_modeset_init(struct msm_dsi *msm_dsi, struct drm_device *dev,
>  			 struct drm_encoder *encoder);
>  void msm_dsi_snapshot(struct msm_disp_state *disp_state, struct msm_dsi *msm_dsi);
> -
> +bool msm_dsi_is_cmd_mode(struct msm_dsi *msm_dsi);
> +bool msm_dsi_is_bonded_dsi(struct msm_dsi *msm_dsi);
> +bool msm_dsi_is_master_dsi(struct msm_dsi *msm_dsi);
>  #else
>  static inline void __init msm_dsi_register(void)
>  {
> @@ -367,7 +369,18 @@ static inline int msm_dsi_modeset_init(struct msm_dsi *msm_dsi,
>  static inline void msm_dsi_snapshot(struct msm_disp_state *disp_state, struct msm_dsi *msm_dsi)
>  {
>  }
> -
> +static inline bool msm_dsi_is_cmd_mode(struct msm_dsi *msm_dsi)
> +{
> +	return false;
> +}
> +static bool msm_dsi_is_bonded_dsi(struct msm_dsi *msm_dsi)

Missing "inline"

> +{
> +	return false;
> +}
> +bool msm_dsi_is_master_dsi(struct msm_dsi *msm_dsi)

Same.

Looks good otherwise!

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Regards,
Bjorn

> +{
> +	return false;
> +}
>  #endif
>  
>  #ifdef CONFIG_DRM_MSM_DP
> -- 
> 2.30.2
> 

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

* Re: [PATCH v4 3/7] drm/msm/dpu: support setting up two independent DSI connectors
  2021-07-17 12:40 ` [PATCH v4 3/7] drm/msm/dpu: support setting up two independent DSI connectors Dmitry Baryshkov
@ 2021-07-25  4:06   ` Bjorn Andersson
  0 siblings, 0 replies; 16+ messages in thread
From: Bjorn Andersson @ 2021-07-25  4:06 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: freedreno, Jonathan Marek, Stephen Boyd, linux-arm-msm,
	Abhinav Kumar, David Airlie, dri-devel, Sean Paul

On Sat 17 Jul 07:40 CDT 2021, Dmitry Baryshkov wrote:

> Move setting up encoders from set_encoder_mode to
> _dpu_kms_initialize_dsi() / _dpu_kms_initialize_displayport(). This
> allows us to support not only "single DSI" and "bonded DSI" but also "two
> independent DSI" configurations. In future this would also help adding
> support for multiple DP connectors.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org>

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Regards,
Bjorn

> ---
>  drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 102 +++++++++++++-----------
>  1 file changed, 57 insertions(+), 45 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
> index 1d3a4f395e74..3cd2011e18d4 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
> @@ -471,30 +471,68 @@ static int _dpu_kms_initialize_dsi(struct drm_device *dev,
>  				    struct dpu_kms *dpu_kms)
>  {
>  	struct drm_encoder *encoder = NULL;
> +	struct msm_display_info info;
>  	int i, rc = 0;
>  
>  	if (!(priv->dsi[0] || priv->dsi[1]))
>  		return rc;
>  
> -	/*TODO: Support two independent DSI connectors */
> -	encoder = dpu_encoder_init(dev, DRM_MODE_ENCODER_DSI);
> -	if (IS_ERR(encoder)) {
> -		DPU_ERROR("encoder init failed for dsi display\n");
> -		return PTR_ERR(encoder);
> -	}
> -
> -	priv->encoders[priv->num_encoders++] = encoder;
> -
> +	/*
> +	 * We support following confiurations:
> +	 * - Single DSI host (dsi0 or dsi1)
> +	 * - Two independent DSI hosts
> +	 * - Bonded DSI0 and DSI1 hosts
> +	 *
> +	 * TODO: Support swapping DSI0 and DSI1 in the bonded setup.
> +	 */
>  	for (i = 0; i < ARRAY_SIZE(priv->dsi); i++) {
> +		int other = (i + 1) % 2;
> +
>  		if (!priv->dsi[i])
>  			continue;
>  
> +		if (msm_dsi_is_bonded_dsi(priv->dsi[i]) &&
> +		    !msm_dsi_is_master_dsi(priv->dsi[i]))
> +			continue;
> +
> +		encoder = dpu_encoder_init(dev, DRM_MODE_ENCODER_DSI);
> +		if (IS_ERR(encoder)) {
> +			DPU_ERROR("encoder init failed for dsi display\n");
> +			return PTR_ERR(encoder);
> +		}
> +
> +		priv->encoders[priv->num_encoders++] = encoder;
> +
> +		memset(&info, 0, sizeof(info));
> +		info.intf_type = encoder->encoder_type;
> +
>  		rc = msm_dsi_modeset_init(priv->dsi[i], dev, encoder);
>  		if (rc) {
>  			DPU_ERROR("modeset_init failed for dsi[%d], rc = %d\n",
>  				i, rc);
>  			break;
>  		}
> +
> +		info.h_tile_instance[info.num_of_h_tiles++] = i;
> +		info.capabilities = msm_dsi_is_cmd_mode(priv->dsi[i]) ?
> +			MSM_DISPLAY_CAP_CMD_MODE :
> +			MSM_DISPLAY_CAP_VID_MODE;
> +
> +		if (msm_dsi_is_bonded_dsi(priv->dsi[i]) && priv->dsi[other]) {
> +			rc = msm_dsi_modeset_init(priv->dsi[other], dev, encoder);
> +			if (rc) {
> +				DPU_ERROR("modeset_init failed for dsi[%d], rc = %d\n",
> +					other, rc);
> +				break;
> +			}
> +
> +			info.h_tile_instance[info.num_of_h_tiles++] = other;
> +		}
> +
> +		rc = dpu_encoder_setup(dev, encoder, &info);
> +		if (rc)
> +			DPU_ERROR("failed to setup DPU encoder %d: rc:%d\n",
> +				  encoder->base.id, rc);
>  	}
>  
>  	return rc;
> @@ -505,6 +543,7 @@ static int _dpu_kms_initialize_displayport(struct drm_device *dev,
>  					    struct dpu_kms *dpu_kms)
>  {
>  	struct drm_encoder *encoder = NULL;
> +	struct msm_display_info info;
>  	int rc = 0;
>  
>  	if (!priv->dp)
> @@ -516,6 +555,7 @@ static int _dpu_kms_initialize_displayport(struct drm_device *dev,
>  		return PTR_ERR(encoder);
>  	}
>  
> +	memset(&info, 0, sizeof(info));
>  	rc = msm_dp_modeset_init(priv->dp, dev, encoder);
>  	if (rc) {
>  		DPU_ERROR("modeset_init failed for DP, rc = %d\n", rc);
> @@ -524,6 +564,14 @@ static int _dpu_kms_initialize_displayport(struct drm_device *dev,
>  	}
>  
>  	priv->encoders[priv->num_encoders++] = encoder;
> +
> +	info.num_of_h_tiles = 1;
> +	info.capabilities = MSM_DISPLAY_CAP_VID_MODE;
> +	info.intf_type = encoder->encoder_type;
> +	rc = dpu_encoder_setup(dev, encoder, &info);
> +	if (rc)
> +		DPU_ERROR("failed to setup DPU encoder %d: rc:%d\n",
> +			  encoder->base.id, rc);
>  	return rc;
>  }
>  
> @@ -726,41 +774,6 @@ static void dpu_kms_destroy(struct msm_kms *kms)
>  	msm_kms_destroy(&dpu_kms->base);
>  }
>  
> -static void _dpu_kms_set_encoder_mode(struct msm_kms *kms,
> -				 struct drm_encoder *encoder,
> -				 bool cmd_mode)
> -{
> -	struct msm_display_info info;
> -	struct msm_drm_private *priv = encoder->dev->dev_private;
> -	int i, rc = 0;
> -
> -	memset(&info, 0, sizeof(info));
> -
> -	info.intf_type = encoder->encoder_type;
> -	info.capabilities = cmd_mode ? MSM_DISPLAY_CAP_CMD_MODE :
> -			MSM_DISPLAY_CAP_VID_MODE;
> -
> -	switch (info.intf_type) {
> -	case DRM_MODE_ENCODER_DSI:
> -		/* TODO: No support for DSI swap */
> -		for (i = 0; i < ARRAY_SIZE(priv->dsi); i++) {
> -			if (priv->dsi[i]) {
> -				info.h_tile_instance[info.num_of_h_tiles] = i;
> -				info.num_of_h_tiles++;
> -			}
> -		}
> -		break;
> -	case DRM_MODE_ENCODER_TMDS:
> -		info.num_of_h_tiles = 1;
> -		break;
> -	}
> -
> -	rc = dpu_encoder_setup(encoder->dev, encoder, &info);
> -	if (rc)
> -		DPU_ERROR("failed to setup DPU encoder %d: rc:%d\n",
> -			encoder->base.id, rc);
> -}
> -
>  static irqreturn_t dpu_irq(struct msm_kms *kms)
>  {
>  	struct dpu_kms *dpu_kms = to_dpu_kms(kms);
> @@ -863,7 +876,6 @@ static const struct msm_kms_funcs kms_funcs = {
>  	.get_format      = dpu_get_msm_format,
>  	.round_pixclk    = dpu_kms_round_pixclk,
>  	.destroy         = dpu_kms_destroy,
> -	.set_encoder_mode = _dpu_kms_set_encoder_mode,
>  	.snapshot        = dpu_kms_mdp_snapshot,
>  #ifdef CONFIG_DEBUG_FS
>  	.debugfs_init    = dpu_kms_debugfs_init,
> -- 
> 2.30.2
> 

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

* Re: [PATCH v4 4/7] drm/msm/mdp5: move mdp5_encoder_set_intf_mode after msm_dsi_modeset_init
  2021-07-17 12:40 ` [PATCH v4 4/7] drm/msm/mdp5: move mdp5_encoder_set_intf_mode after msm_dsi_modeset_init Dmitry Baryshkov
@ 2021-07-25  4:07   ` Bjorn Andersson
  0 siblings, 0 replies; 16+ messages in thread
From: Bjorn Andersson @ 2021-07-25  4:07 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: freedreno, Jonathan Marek, Stephen Boyd, linux-arm-msm,
	Abhinav Kumar, David Airlie, dri-devel, Sean Paul

On Sat 17 Jul 07:40 CDT 2021, Dmitry Baryshkov wrote:

> Move a call to mdp5_encoder_set_intf_mode() after
> msm_dsi_modeset_init(), removing set_encoder_mode callback.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org>

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Regards,
Bjorn

> ---
>  drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 11 +++--------
>  1 file changed, 3 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c
> index 15aed45022bc..b3b42672b2d4 100644
> --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c
> +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c
> @@ -209,13 +209,6 @@ static int mdp5_set_split_display(struct msm_kms *kms,
>  							  slave_encoder);
>  }
>  
> -static void mdp5_set_encoder_mode(struct msm_kms *kms,
> -				  struct drm_encoder *encoder,
> -				  bool cmd_mode)
> -{
> -	mdp5_encoder_set_intf_mode(encoder, cmd_mode);
> -}
> -
>  static void mdp5_kms_destroy(struct msm_kms *kms)
>  {
>  	struct mdp5_kms *mdp5_kms = to_mdp5_kms(to_mdp_kms(kms));
> @@ -287,7 +280,6 @@ static const struct mdp_kms_funcs kms_funcs = {
>  		.get_format      = mdp_get_format,
>  		.round_pixclk    = mdp5_round_pixclk,
>  		.set_split_display = mdp5_set_split_display,
> -		.set_encoder_mode = mdp5_set_encoder_mode,
>  		.destroy         = mdp5_kms_destroy,
>  #ifdef CONFIG_DEBUG_FS
>  		.debugfs_init    = mdp5_kms_debugfs_init,
> @@ -448,6 +440,9 @@ static int modeset_init_intf(struct mdp5_kms *mdp5_kms,
>  		}
>  
>  		ret = msm_dsi_modeset_init(priv->dsi[dsi_id], dev, encoder);
> +		if (!ret)
> +			mdp5_encoder_set_intf_mode(encoder, msm_dsi_is_cmd_mode(priv->dsi[dsi_id]));
> +
>  		break;
>  	}
>  	default:
> -- 
> 2.30.2
> 

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

* Re: [PATCH v4 5/7] drm/msm/dp: stop calling set_encoder_mode callback
  2021-07-17 12:40 ` [PATCH v4 5/7] drm/msm/dp: stop calling set_encoder_mode callback Dmitry Baryshkov
@ 2021-07-25  4:08   ` Bjorn Andersson
  0 siblings, 0 replies; 16+ messages in thread
From: Bjorn Andersson @ 2021-07-25  4:08 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: freedreno, Jonathan Marek, Stephen Boyd, linux-arm-msm,
	Abhinav Kumar, David Airlie, dri-devel, Sean Paul

On Sat 17 Jul 07:40 CDT 2021, Dmitry Baryshkov wrote:

> None of the display drivers now implement set_encoder_mode callback.
> Stop calling it from the modeset init code.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org>

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Regards,
Bjorn

> ---
>  drivers/gpu/drm/msm/dp/dp_display.c | 18 ------------------
>  1 file changed, 18 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c
> index 051c1be1de7e..70b319a8fe83 100644
> --- a/drivers/gpu/drm/msm/dp/dp_display.c
> +++ b/drivers/gpu/drm/msm/dp/dp_display.c
> @@ -102,8 +102,6 @@ struct dp_display_private {
>  	struct dp_display_mode dp_mode;
>  	struct msm_dp dp_display;
>  
> -	bool encoder_mode_set;
> -
>  	/* wait for audio signaling */
>  	struct completion audio_comp;
>  
> @@ -283,20 +281,6 @@ static void dp_display_send_hpd_event(struct msm_dp *dp_display)
>  }
>  
>  
> -static void dp_display_set_encoder_mode(struct dp_display_private *dp)
> -{
> -	struct msm_drm_private *priv = dp->dp_display.drm_dev->dev_private;
> -	struct msm_kms *kms = priv->kms;
> -
> -	if (!dp->encoder_mode_set && dp->dp_display.encoder &&
> -				kms->funcs->set_encoder_mode) {
> -		kms->funcs->set_encoder_mode(kms,
> -				dp->dp_display.encoder, false);
> -
> -		dp->encoder_mode_set = true;
> -	}
> -}
> -
>  static int dp_display_send_hpd_notification(struct dp_display_private *dp,
>  					    bool hpd)
>  {
> @@ -369,8 +353,6 @@ static void dp_display_host_init(struct dp_display_private *dp, int reset)
>  	if (dp->usbpd->orientation == ORIENTATION_CC2)
>  		flip = true;
>  
> -	dp_display_set_encoder_mode(dp);
> -
>  	dp_power_init(dp->power, flip);
>  	dp_ctrl_host_init(dp->ctrl, flip, reset);
>  	dp_aux_init(dp->aux);
> -- 
> 2.30.2
> 

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

* Re: [PATCH v4 6/7] drm/msm/dsi: stop calling set_encoder_mode callback
  2021-07-17 12:40 ` [PATCH v4 6/7] drm/msm/dsi: " Dmitry Baryshkov
@ 2021-07-25  4:08   ` Bjorn Andersson
  0 siblings, 0 replies; 16+ messages in thread
From: Bjorn Andersson @ 2021-07-25  4:08 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: freedreno, Jonathan Marek, Stephen Boyd, linux-arm-msm,
	Abhinav Kumar, David Airlie, dri-devel, Sean Paul

On Sat 17 Jul 07:40 CDT 2021, Dmitry Baryshkov wrote:

> None of the display drivers now implement set_encoder_mode callback.
> Stop calling it from the modeset init code.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org>

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Regards,
Bjorn

> ---
>  drivers/gpu/drm/msm/dsi/dsi.c         |  2 --
>  drivers/gpu/drm/msm/dsi/dsi.h         |  1 -
>  drivers/gpu/drm/msm/dsi/dsi_manager.c | 12 ------------
>  3 files changed, 15 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/dsi/dsi.c b/drivers/gpu/drm/msm/dsi/dsi.c
> index 5201d7eb0490..77c8dba297d8 100644
> --- a/drivers/gpu/drm/msm/dsi/dsi.c
> +++ b/drivers/gpu/drm/msm/dsi/dsi.c
> @@ -251,8 +251,6 @@ int msm_dsi_modeset_init(struct msm_dsi *msm_dsi, struct drm_device *dev,
>  		goto fail;
>  	}
>  
> -	msm_dsi_manager_setup_encoder(msm_dsi->id);
> -
>  	priv->bridges[priv->num_bridges++]       = msm_dsi->bridge;
>  	priv->connectors[priv->num_connectors++] = msm_dsi->connector;
>  
> diff --git a/drivers/gpu/drm/msm/dsi/dsi.h b/drivers/gpu/drm/msm/dsi/dsi.h
> index 856a532850c0..e0c3c4409377 100644
> --- a/drivers/gpu/drm/msm/dsi/dsi.h
> +++ b/drivers/gpu/drm/msm/dsi/dsi.h
> @@ -80,7 +80,6 @@ struct drm_connector *msm_dsi_manager_connector_init(u8 id);
>  struct drm_connector *msm_dsi_manager_ext_bridge_init(u8 id);
>  int msm_dsi_manager_cmd_xfer(int id, const struct mipi_dsi_msg *msg);
>  bool msm_dsi_manager_cmd_xfer_trigger(int id, u32 dma_base, u32 len);
> -void msm_dsi_manager_setup_encoder(int id);
>  int msm_dsi_manager_register(struct msm_dsi *msm_dsi);
>  void msm_dsi_manager_unregister(struct msm_dsi *msm_dsi);
>  bool msm_dsi_manager_validate_current_config(u8 id);
> diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c
> index 27d3b9ebf831..693078e68fd4 100644
> --- a/drivers/gpu/drm/msm/dsi/dsi_manager.c
> +++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c
> @@ -216,18 +216,6 @@ static int dsi_mgr_bridge_get_id(struct drm_bridge *bridge)
>  	return dsi_bridge->id;
>  }
>  
> -void msm_dsi_manager_setup_encoder(int id)
> -{
> -	struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id);
> -	struct msm_drm_private *priv = msm_dsi->dev->dev_private;
> -	struct msm_kms *kms = priv->kms;
> -	struct drm_encoder *encoder = msm_dsi_get_encoder(msm_dsi);
> -
> -	if (encoder && kms->funcs->set_encoder_mode)
> -		kms->funcs->set_encoder_mode(kms, encoder,
> -					     msm_dsi_is_cmd_mode(msm_dsi));
> -}
> -
>  static int msm_dsi_manager_panel_init(struct drm_connector *conn, u8 id)
>  {
>  	struct msm_drm_private *priv = conn->dev->dev_private;
> -- 
> 2.30.2
> 

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

* Re: [PATCH v4 7/7] drm/msm/kms: drop set_encoder_mode callback
  2021-07-17 12:40 ` [PATCH v4 7/7] drm/msm/kms: drop " Dmitry Baryshkov
@ 2021-07-25  4:09   ` Bjorn Andersson
  0 siblings, 0 replies; 16+ messages in thread
From: Bjorn Andersson @ 2021-07-25  4:09 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: freedreno, Jonathan Marek, Stephen Boyd, linux-arm-msm,
	Abhinav Kumar, David Airlie, dri-devel, Sean Paul

On Sat 17 Jul 07:40 CDT 2021, Dmitry Baryshkov wrote:

> set_encoder_mode callback is completely unused now. Drop it from
> msm_kms_func().
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org>

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Regards,
Bjorn

> ---
>  drivers/gpu/drm/msm/msm_kms.h | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/msm_kms.h b/drivers/gpu/drm/msm/msm_kms.h
> index 086a2d59b8c8..9484e8b62630 100644
> --- a/drivers/gpu/drm/msm/msm_kms.h
> +++ b/drivers/gpu/drm/msm/msm_kms.h
> @@ -117,9 +117,6 @@ struct msm_kms_funcs {
>  			struct drm_encoder *encoder,
>  			struct drm_encoder *slave_encoder,
>  			bool is_cmd_mode);
> -	void (*set_encoder_mode)(struct msm_kms *kms,
> -				 struct drm_encoder *encoder,
> -				 bool cmd_mode);
>  	/* cleanup: */
>  	void (*destroy)(struct msm_kms *kms);
>  
> -- 
> 2.30.2
> 

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

end of thread, other threads:[~2021-07-25  4:09 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-17 12:40 [PATCH v4 0/7] drm/msm/dpu: add support for independent DSI config Dmitry Baryshkov
2021-07-17 12:40 ` [PATCH v4 1/7] drm/msm/dsi: rename dual DSI to bonded DSI Dmitry Baryshkov
2021-07-23  3:07   ` Bjorn Andersson
2021-07-17 12:40 ` [PATCH v4 2/7] drm/msm/dsi: add three helper functions Dmitry Baryshkov
2021-07-19 10:31   ` kernel test robot
2021-07-25  4:05   ` Bjorn Andersson
2021-07-17 12:40 ` [PATCH v4 3/7] drm/msm/dpu: support setting up two independent DSI connectors Dmitry Baryshkov
2021-07-25  4:06   ` Bjorn Andersson
2021-07-17 12:40 ` [PATCH v4 4/7] drm/msm/mdp5: move mdp5_encoder_set_intf_mode after msm_dsi_modeset_init Dmitry Baryshkov
2021-07-25  4:07   ` Bjorn Andersson
2021-07-17 12:40 ` [PATCH v4 5/7] drm/msm/dp: stop calling set_encoder_mode callback Dmitry Baryshkov
2021-07-25  4:08   ` Bjorn Andersson
2021-07-17 12:40 ` [PATCH v4 6/7] drm/msm/dsi: " Dmitry Baryshkov
2021-07-25  4:08   ` Bjorn Andersson
2021-07-17 12:40 ` [PATCH v4 7/7] drm/msm/kms: drop " Dmitry Baryshkov
2021-07-25  4:09   ` Bjorn Andersson

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).