[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210910101218.1632297-11-maxime@cerno.tech>
Date: Fri, 10 Sep 2021 12:12:04 +0200
From: Maxime Ripard <maxime@...no.tech>
To: Andrzej Hajda <a.hajda@...sung.com>,
Sam Ravnborg <sam@...nborg.org>,
Daniel Vetter <daniel.vetter@...el.com>,
David Airlie <airlied@...ux.ie>,
Jonas Karlman <jonas@...boo.se>,
Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
Thierry Reding <thierry.reding@...il.com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Thomas Zimmermann <tzimmermann@...e.de>,
Maxime Ripard <maxime@...no.tech>,
Neil Armstrong <narmstrong@...libre.com>,
Robert Foss <robert.foss@...aro.org>,
Jernej Skrabec <jernej.skrabec@...il.com>
Cc: Sean Paul <sean@...rly.run>, freedreno@...ts.freedesktop.org,
Kyungmin Park <kyungmin.park@...sung.com>,
linux-kernel@...r.kernel.org,
Xinliang Liu <xinliang.liu@...aro.org>,
Seung-Woo Kim <sw0312.kim@...sung.com>,
Tian Tao <tiantao6@...ilicon.com>,
Inki Dae <inki.dae@...sung.com>,
linux-samsung-soc@...r.kernel.org, linux-arm-msm@...r.kernel.org,
Rob Clark <robdclark@...il.com>,
dri-devel@...ts.freedesktop.org,
John Stultz <john.stultz@...aro.org>,
Chen Feng <puck.chen@...ilicon.com>,
Xinwei Kong <kong.kongxinwei@...ilicon.com>,
Joonyoung Shim <jy0922.shim@...sung.com>
Subject: [PATCH v4 10/24] drm/bridge: lt8912b: Register and attach our DSI device at probe
In order to avoid any probe ordering issue, the best practice is to move
the secondary MIPI-DSI device registration and attachment to the
MIPI-DSI host at probe time. Let's do this.
Signed-off-by: Maxime Ripard <maxime@...no.tech>
---
drivers/gpu/drm/bridge/lontium-lt8912b.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/bridge/lontium-lt8912b.c b/drivers/gpu/drm/bridge/lontium-lt8912b.c
index cc968d65936b..c642d1e02b2f 100644
--- a/drivers/gpu/drm/bridge/lontium-lt8912b.c
+++ b/drivers/gpu/drm/bridge/lontium-lt8912b.c
@@ -544,10 +544,6 @@ static int lt8912_bridge_attach(struct drm_bridge *bridge,
if (ret)
goto error;
- ret = lt8912_attach_dsi(lt);
- if (ret)
- goto error;
-
lt->is_attached = true;
return 0;
@@ -706,8 +702,15 @@ static int lt8912_probe(struct i2c_client *client,
drm_bridge_add(<->bridge);
+ ret = lt8912_attach_dsi(lt);
+ if (ret)
+ goto err_attach;
+
return 0;
+err_attach:
+ drm_bridge_remove(<->bridge);
+ lt8912_free_i2c(lt);
err_i2c:
lt8912_put_dt(lt);
err_dt_parse:
--
2.31.1
Powered by blists - more mailing lists