[20/32] drm/msm/dsi: convert to the .attach_new op

Message ID 20250625-drm-dsi-host-no-device-ptr-v1-20-e36bc258a7c5@bootlin.com (mailing list archive)
State New
Headers
Series drm/mipi-dsi: avoid DSI host drivers to have pointers to DSI devices |

Commit Message

Luca Ceresoli June 25, 2025, 4:45 p.m. UTC
This op does not pass any pointer to the DSI device, so the DSI host driver
cannot store it.

Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
---
 drivers/gpu/drm/msm/dsi/dsi_host.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
  

Patch

diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
index 4d75529c0e858160761f5eb55db65e5d7565c27b..79cdb34074de3662d535a8d9b386c5399c8d23ba 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_host.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
@@ -1610,20 +1610,20 @@  static irqreturn_t dsi_host_irq(int irq, void *ptr)
 }
 
 static int dsi_host_attach(struct mipi_dsi_host *host,
-					struct mipi_dsi_device *dsi)
+			   const struct mipi_dsi_bus_fmt *bus_fmt)
 {
 	struct msm_dsi_host *msm_host = to_msm_dsi_host(host);
 	int ret;
 
-	if (dsi->lanes > msm_host->num_data_lanes)
+	if (bus_fmt->lanes > msm_host->num_data_lanes)
 		return -EINVAL;
 
-	msm_host->channel = dsi->channel;
-	msm_host->lanes = dsi->lanes;
-	msm_host->format = dsi->format;
-	msm_host->mode_flags = dsi->mode_flags;
-	if (dsi->dsc)
-		msm_host->dsc = dsi->dsc;
+	msm_host->channel = bus_fmt->channel;
+	msm_host->lanes = bus_fmt->lanes;
+	msm_host->format = bus_fmt->format;
+	msm_host->mode_flags = bus_fmt->mode_flags;
+	if (bus_fmt->dsc)
+		msm_host->dsc = bus_fmt->dsc;
 
 	ret = dsi_dev_attach(msm_host->pdev);
 	if (ret)
@@ -1663,7 +1663,7 @@  static ssize_t dsi_host_transfer(struct mipi_dsi_host *host,
 }
 
 static const struct mipi_dsi_host_ops dsi_host_ops = {
-	.attach = dsi_host_attach,
+	.attach_new = dsi_host_attach,
 	.detach = dsi_host_detach,
 	.transfer = dsi_host_transfer,
 };