Skip to contentSkip to conversation

video: dw_mipi_dsi: missing device to log debug

PATCH New Patrick Delaunay 3 participants 8 messages Mar 4, 2021 – Mar 12, 2021 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 video: dw_mipi_dsi: missing device to log debug

From: Yannick Fertre <[email protected]>

Missing udevice to struct dw_mipi_dsi to log trace.

---

 drivers/video/dw_mipi_dsi.c | 1 +
 1 file changed, 1 insertion(+)
drivers/video/dw_mipi_dsi.c +1 -0
index 4dde648814..a5beed3514 100644
@@ -797,6 +797,7 @@ static int dw_mipi_dsi_init(struct udevice *dev,
 	dsi->phy_ops = phy_ops;
 	dsi->max_data_lanes = max_data_lanes;
 	dsi->device = device;
+	dsi->dsi_host.dev = (struct device *)dev;
 	dsi->dsi_host.ops = &dw_mipi_dsi_host_ops;
 	device->host = &dsi->dsi_host;
 
Signature · 1 line
2.17.1
#1 lore raw

PATCH 2/2 video: dw_mipi_dsi: update log of dphy_enable

From: Yannick Fertre <[email protected]>

The DSI phy can be turned on from the DSI digital interface in the dphy_enable() function or from a dedicated DSI phy "wrapper" in phy_ops->init() function. If the STM32MP1 case, the wrapper is used then the dphy_enable() "warning" traces are not relevant.

This patch moves these "warning" traces to "debug" traces so they are still available for DSI phy based on the digital interface in debug logging mode, but not there in normal mode for both cases.
Note: The related Linux kernel driver uses a "debug" message too.

---

 drivers/video/dw_mipi_dsi.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/video/dw_mipi_dsi.c +4 -4
index a5beed3514..9ae09eec12 100644
@@ -721,15 +721,15 @@ static void dw_mipi_dsi_dphy_enable(struct dw_mipi_dsi *dsi)
 	ret = readl_poll_timeout(dsi->base + DSI_PHY_STATUS, val,
 				 val & PHY_LOCK, PHY_STATUS_TIMEOUT_US);
 	if (ret)
-		dev_warn(dsi->dsi_host.dev,
-			 "failed to wait phy lock state\n");
+		dev_dbg(dsi->dsi_host.dev,
+			"failed to wait phy lock state\n");
 
 	ret = readl_poll_timeout(dsi->base + DSI_PHY_STATUS,
 				 val, val & PHY_STOP_STATE_CLK_LANE,
 				 PHY_STATUS_TIMEOUT_US);
 	if (ret)
-		dev_warn(dsi->dsi_host.dev,
-			 "failed to wait phy clk lane stop state\n");
+		dev_dbg(dsi->dsi_host.dev,
+			"failed to wait phy clk lane stop state\n");
 }
 
 static void dw_mipi_dsi_clear_err(struct dw_mipi_dsi *dsi)
Signature · 1 line
2.17.1
#2 lore raw

PATCH 2/2 video: dw_mipi_dsi: update log of dphy_enable

Quoted 46 lines · Patrick Delaunay

From: Yannick Fertre <[email protected]>

The DSI phy can be turned on from the DSI digital interface in the dphy_enable() function or from a dedicated DSI phy "wrapper" in phy_ops->init() function. If the STM32MP1 case, the wrapper is used then the dphy_enable() "warning" traces are not relevant.

This patch moves these "warning" traces to "debug" traces so they are still available for DSI phy based on the digital interface in debug logging mode, but not there in normal mode for both cases.
Note: The related Linux kernel driver uses a "debug" message too.

---

  drivers/video/dw_mipi_dsi.c | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
drivers/video/dw_mipi_dsi.c +4 -4
index a5beed3514..9ae09eec12 100644
@@ -721,15 +721,15 @@ static void dw_mipi_dsi_dphy_enable(struct dw_mipi_dsi *dsi)
  	ret = readl_poll_timeout(dsi->base + DSI_PHY_STATUS, val,
  				 val & PHY_LOCK, PHY_STATUS_TIMEOUT_US);
  	if (ret)
-		dev_warn(dsi->dsi_host.dev,
-			 "failed to wait phy lock state\n");
+		dev_dbg(dsi->dsi_host.dev,
+			"failed to wait phy lock state\n");
 
  	ret = readl_poll_timeout(dsi->base + DSI_PHY_STATUS,
  				 val, val & PHY_STOP_STATE_CLK_LANE,
  				 PHY_STATUS_TIMEOUT_US);
  	if (ret)
-		dev_warn(dsi->dsi_host.dev,
-			 "failed to wait phy clk lane stop state\n");
+		dev_dbg(dsi->dsi_host.dev,
+			"failed to wait phy clk lane stop state\n");
  }
 
  static void dw_mipi_dsi_clear_err(struct dw_mipi_dsi *dsi)
#3 lore raw

PATCH 2/2 video: dw_mipi_dsi: update log of dphy_enable

Hi

Quoted 40 lines · yannick Fertre
Quoted 36 lines · Patrick Delaunay

From: Yannick Fertre <[email protected]>

The DSI phy can be turned on from the DSI digital interface in the dphy_enable() function or from a dedicated DSI phy "wrapper" in phy_ops->init() function. If the STM32MP1 case, the wrapper is used then the dphy_enable() "warning" traces are not relevant.

This patch moves these "warning" traces to "debug" traces so they are still available for DSI phy based on the digital interface in debug logging mode, but not there in normal mode for both cases.
Note: The related Linux kernel driver uses a "debug" message too.

---

? drivers/video/dw_mipi_dsi.c | 8 ++++----
? 1 file changed, 4 insertions(+), 4 deletions(-)

drivers/video/dw_mipi_dsi.c +2 -2
index a5beed3514..9ae09eec12 100644
@@ -721,15 +721,15 @@ static void dw_mipi_dsi_dphy_enable(struct dw_mipi_dsi *dsi)
 ????? ret = readl_poll_timeout(dsi->base + DSI_PHY_STATUS, val,
 ?????????????????? val & PHY_LOCK, PHY_STATUS_TIMEOUT_US);
 ????? if (ret)
-??????? dev_warn(dsi->dsi_host.dev,
-???????????? "failed to wait phy lock state\n");
+??????? dev_dbg(dsi->dsi_host.dev,
+??????????? "failed to wait phy lock state\n");
 ? ????? ret = readl_poll_timeout(dsi->base + DSI_PHY_STATUS,
 ?????????????????? val, val & PHY_STOP_STATE_CLK_LANE,
 ?????????????????? PHY_STATUS_TIMEOUT_US);
Quoted 8 lines

drivers/video/dw_mipi_dsi.c static void dw_mipi_dsi_dphy_enable(struct dw_mipi_dsi *dsi) · line 734

Quoted 8 lines
drivers/video/dw_mipi_dsi.c +2 -2
 ????? if (ret)
-??????? dev_warn(dsi->dsi_host.dev,
-???????????? "failed to wait phy clk lane stop state\n");
+??????? dev_dbg(dsi->dsi_host.dev,
+??????????? "failed to wait phy clk lane stop state\n");
 ? }
 ? ? static void dw_mipi_dsi_clear_err(struct dw_mipi_dsi *dsi)
 

Applied to u-boot-stm/next

Thanks

Patrice

#4 lore raw

PATCH 2/2 video: dw_mipi_dsi: update log of dphy_enable

In reply to Patrick Delaunay

HI Patrick

Quoted 36 lines · Patrick Delaunay

From: Yannick Fertre <[email protected]>

The DSI phy can be turned on from the DSI digital interface in the dphy_enable() function or from a dedicated DSI phy "wrapper" in phy_ops->init() function. If the STM32MP1 case, the wrapper is used then the dphy_enable() "warning" traces are not relevant.

This patch moves these "warning" traces to "debug" traces so they are still available for DSI phy based on the digital interface in debug logging mode, but not there in normal mode for both cases.
Note: The related Linux kernel driver uses a "debug" message too.

---

 drivers/video/dw_mipi_dsi.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/video/dw_mipi_dsi.c +2 -2
index a5beed3514..9ae09eec12 100644
@@ -721,15 +721,15 @@ static void dw_mipi_dsi_dphy_enable(struct dw_mipi_dsi *dsi)
 	ret = readl_poll_timeout(dsi->base + DSI_PHY_STATUS, val,
 				 val & PHY_LOCK, PHY_STATUS_TIMEOUT_US);
 	if (ret)
-		dev_warn(dsi->dsi_host.dev,
-			 "failed to wait phy lock state\n");
+		dev_dbg(dsi->dsi_host.dev,
+			"failed to wait phy lock state\n");
 
 	ret = readl_poll_timeout(dsi->base + DSI_PHY_STATUS,

drivers/video/dw_mipi_dsi.c static void dw_mipi_dsi_dphy_enable(struct dw_mipi_dsi *dsi) · line 735

Quoted 10 lines
drivers/video/dw_mipi_dsi.c +2 -2
 				 val, val & PHY_STOP_STATE_CLK_LANE,
 				 PHY_STATUS_TIMEOUT_US);
 	if (ret)
-		dev_warn(dsi->dsi_host.dev,
-			 "failed to wait phy clk lane stop state\n");
+		dev_dbg(dsi->dsi_host.dev,
+			"failed to wait phy clk lane stop state\n");
 }
 
 static void dw_mipi_dsi_clear_err(struct dw_mipi_dsi *dsi)

Thanks
Patrice

#5 lore raw

PATCH 1/2 video: dw_mipi_dsi: missing device to log debug

In reply to Patrick Delaunay
Quoted 24 lines · Patrick Delaunay

From: Yannick Fertre <[email protected]>

Missing udevice to struct dw_mipi_dsi to log trace.

---

  drivers/video/dw_mipi_dsi.c | 1 +
  1 file changed, 1 insertion(+)
drivers/video/dw_mipi_dsi.c +1 -0
index 4dde648814..a5beed3514 100644
@@ -797,6 +797,7 @@ static int dw_mipi_dsi_init(struct udevice *dev,
  	dsi->phy_ops = phy_ops;
  	dsi->max_data_lanes = max_data_lanes;
  	dsi->device = device;
+	dsi->dsi_host.dev = (struct device *)dev;
  	dsi->dsi_host.ops = &dw_mipi_dsi_host_ops;
  	device->host = &dsi->dsi_host;
 
#6 lore raw

PATCH 1/2 video: dw_mipi_dsi: missing device to log debug

Hi

Quoted 15 lines · yannick Fertre
Quoted 11 lines · Patrick Delaunay

From: Yannick Fertre <[email protected]>

Missing udevice to struct dw_mipi_dsi to log trace.

---

? drivers/video/dw_mipi_dsi.c | 1 +
? 1 file changed, 1 insertion(+)

Quoted 12 lines
Quoted 11 lines
drivers/video/dw_mipi_dsi.c +1 -0
index 4dde648814..a5beed3514 100644
@@ -797,6 +797,7 @@ static int dw_mipi_dsi_init(struct udevice *dev,
 ????? dsi->phy_ops = phy_ops;
 ????? dsi->max_data_lanes = max_data_lanes;
 ????? dsi->device = device;
+??? dsi->dsi_host.dev = (struct device *)dev;
 ????? dsi->dsi_host.ops = &dw_mipi_dsi_host_ops;
 ????? device->host = &dsi->dsi_host;
Quoted 1 line

?

Applied to u-boot-stm/next

Thanks

Patrice

#7 lore raw

PATCH 1/2 video: dw_mipi_dsi: missing device to log debug

In reply to Patrick Delaunay

Hi Patrick

Quoted 17 lines · Patrick Delaunay

From: Yannick Fertre <[email protected]>

Missing udevice to struct dw_mipi_dsi to log trace.

---

 drivers/video/dw_mipi_dsi.c | 1 +
 1 file changed, 1 insertion(+)
drivers/video/dw_mipi_dsi.c +0 -0
index 4dde648814..a5beed3514 100644

drivers/video/dw_mipi_dsi.c static int dw_mipi_dsi_init(struct udevice *dev, · line 803

Quoted 7 lines
drivers/video/dw_mipi_dsi.c +1 -0
@@ -797,6 +797,7 @@ static int dw_mipi_dsi_init(struct udevice *dev,
 	dsi->phy_ops = phy_ops;
 	dsi->max_data_lanes = max_data_lanes;
 	dsi->device = device;
+	dsi->dsi_host.dev = (struct device *)dev;
 	dsi->dsi_host.ops = &dw_mipi_dsi_host_ops;
 	device->host = &dsi->dsi_host;
 

Thanks
Patrice