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

From: Yannick Fertre yannick.fertre@foss.st.com
Missing udevice to struct dw_mipi_dsi to log trace.
Signed-off-by: Yannick Fertre yannick.fertre@foss.st.com Signed-off-by: Patrick Delaunay patrick.delaunay@foss.st.com ---
drivers/video/dw_mipi_dsi.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/drivers/video/dw_mipi_dsi.c b/drivers/video/dw_mipi_dsi.c index 4dde648814..a5beed3514 100644 --- a/drivers/video/dw_mipi_dsi.c +++ b/drivers/video/dw_mipi_dsi.c @@ -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;

From: Yannick Fertre yannick.fertre@foss.st.com
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.
Signed-off-by: Yannick Fertre yannick.fertre@foss.st.com Signed-off-by: Patrick Delaunay patrick.delaunay@foss.st.com ---
drivers/video/dw_mipi_dsi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/video/dw_mipi_dsi.c b/drivers/video/dw_mipi_dsi.c index a5beed3514..9ae09eec12 100644 --- a/drivers/video/dw_mipi_dsi.c +++ b/drivers/video/dw_mipi_dsi.c @@ -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)

Acked-by: Yannick Fertre yannick.fertre@foss.st.com
On 3/4/21 1:14 PM, Patrick Delaunay wrote:
From: Yannick Fertre yannick.fertre@foss.st.com
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.
Signed-off-by: Yannick Fertre yannick.fertre@foss.st.com Signed-off-by: Patrick Delaunay patrick.delaunay@foss.st.com
drivers/video/dw_mipi_dsi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/video/dw_mipi_dsi.c b/drivers/video/dw_mipi_dsi.c index a5beed3514..9ae09eec12 100644 --- a/drivers/video/dw_mipi_dsi.c +++ b/drivers/video/dw_mipi_dsi.c @@ -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)

Hi
On 3/4/21 4:00 PM, yannick Fertre wrote:
Acked-by: Yannick Fertre yannick.fertre@foss.st.com
On 3/4/21 1:14 PM, Patrick Delaunay wrote:
From: Yannick Fertre yannick.fertre@foss.st.com
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.
Signed-off-by: Yannick Fertre yannick.fertre@foss.st.com Signed-off-by: Patrick Delaunay patrick.delaunay@foss.st.com
drivers/video/dw_mipi_dsi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/video/dw_mipi_dsi.c b/drivers/video/dw_mipi_dsi.c index a5beed3514..9ae09eec12 100644 --- a/drivers/video/dw_mipi_dsi.c +++ b/drivers/video/dw_mipi_dsi.c @@ -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)
Applied to u-boot-stm/next
Thanks
Patrice

HI Patrick
On 3/4/21 1:14 PM, Patrick Delaunay wrote:
From: Yannick Fertre yannick.fertre@foss.st.com
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.
Signed-off-by: Yannick Fertre yannick.fertre@foss.st.com Signed-off-by: Patrick Delaunay patrick.delaunay@foss.st.com
drivers/video/dw_mipi_dsi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/video/dw_mipi_dsi.c b/drivers/video/dw_mipi_dsi.c index a5beed3514..9ae09eec12 100644 --- a/drivers/video/dw_mipi_dsi.c +++ b/drivers/video/dw_mipi_dsi.c @@ -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)
Reviewed-by: Patrice Chotard patrice.chotard@foss.st.com Thanks Patrice

Acked-by: Yannick Fertre yannick.fertre@foss.st.com
On 3/4/21 1:14 PM, Patrick Delaunay wrote:
From: Yannick Fertre yannick.fertre@foss.st.com
Missing udevice to struct dw_mipi_dsi to log trace.
Signed-off-by: Yannick Fertre yannick.fertre@foss.st.com Signed-off-by: Patrick Delaunay patrick.delaunay@foss.st.com
drivers/video/dw_mipi_dsi.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/drivers/video/dw_mipi_dsi.c b/drivers/video/dw_mipi_dsi.c index 4dde648814..a5beed3514 100644 --- a/drivers/video/dw_mipi_dsi.c +++ b/drivers/video/dw_mipi_dsi.c @@ -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;

Hi
On 3/4/21 3:59 PM, yannick Fertre wrote:
Acked-by: Yannick Fertre yannick.fertre@foss.st.com
On 3/4/21 1:14 PM, Patrick Delaunay wrote:
From: Yannick Fertre yannick.fertre@foss.st.com
Missing udevice to struct dw_mipi_dsi to log trace.
Signed-off-by: Yannick Fertre yannick.fertre@foss.st.com Signed-off-by: Patrick Delaunay patrick.delaunay@foss.st.com
drivers/video/dw_mipi_dsi.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/drivers/video/dw_mipi_dsi.c b/drivers/video/dw_mipi_dsi.c index 4dde648814..a5beed3514 100644 --- a/drivers/video/dw_mipi_dsi.c +++ b/drivers/video/dw_mipi_dsi.c @@ -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;
Applied to u-boot-stm/next
Thanks
Patrice

Hi Patrick
On 3/4/21 1:14 PM, Patrick Delaunay wrote:
From: Yannick Fertre yannick.fertre@foss.st.com
Missing udevice to struct dw_mipi_dsi to log trace.
Signed-off-by: Yannick Fertre yannick.fertre@foss.st.com Signed-off-by: Patrick Delaunay patrick.delaunay@foss.st.com
drivers/video/dw_mipi_dsi.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/drivers/video/dw_mipi_dsi.c b/drivers/video/dw_mipi_dsi.c index 4dde648814..a5beed3514 100644 --- a/drivers/video/dw_mipi_dsi.c +++ b/drivers/video/dw_mipi_dsi.c @@ -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;
Reviewed-by: Patrice Chotard patrice.chotard@foss.st.com Thanks Patrice
participants (3)
-
Patrice CHOTARD
-
Patrick Delaunay
-
yannick Fertre