* [PATCH for-5.15.y 1/3] Revert "drm/bridge: lt9611uxc: fix the race in the error path"
2023-12-19 10:11 [PATCH for-5.15.y 0/3] Revert lt9611uxc fixes which broke Amit Pundir
@ 2023-12-19 10:11 ` Amit Pundir
2023-12-19 10:11 ` [PATCH for-5.15.y 2/3] Revert "drm/bridge: lt9611uxc: Register and attach our DSI device at probe" Amit Pundir
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Amit Pundir @ 2023-12-19 10:11 UTC (permalink / raw)
To: Greg KH, Stable, Sasha Levin; +Cc: Maxime Ripard, Dmitry Baryshkov
This reverts commit d0d01bb4a56093fa214c0949e9e7ccb9fb437795.
This and the dependent fixes broke display on RB5.
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
---
drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/bridge/lontium-lt9611uxc.c b/drivers/gpu/drm/bridge/lontium-lt9611uxc.c
index 2a848e14181b..1e33b3150bdc 100644
--- a/drivers/gpu/drm/bridge/lontium-lt9611uxc.c
+++ b/drivers/gpu/drm/bridge/lontium-lt9611uxc.c
@@ -927,9 +927,9 @@ static int lt9611uxc_probe(struct i2c_client *client,
init_waitqueue_head(<9611uxc->wq);
INIT_WORK(<9611uxc->work, lt9611uxc_hpd_work);
- ret = request_threaded_irq(client->irq, NULL,
- lt9611uxc_irq_thread_handler,
- IRQF_ONESHOT, "lt9611uxc", lt9611uxc);
+ ret = devm_request_threaded_irq(dev, client->irq, NULL,
+ lt9611uxc_irq_thread_handler,
+ IRQF_ONESHOT, "lt9611uxc", lt9611uxc);
if (ret) {
dev_err(dev, "failed to request irq\n");
goto err_disable_regulators;
@@ -965,8 +965,6 @@ static int lt9611uxc_probe(struct i2c_client *client,
return lt9611uxc_audio_init(dev, lt9611uxc);
err_remove_bridge:
- free_irq(client->irq, lt9611uxc);
- cancel_work_sync(<9611uxc->work);
drm_bridge_remove(<9611uxc->bridge);
err_disable_regulators:
@@ -983,7 +981,7 @@ static int lt9611uxc_remove(struct i2c_client *client)
{
struct lt9611uxc *lt9611uxc = i2c_get_clientdata(client);
- free_irq(client->irq, lt9611uxc);
+ disable_irq(client->irq);
cancel_work_sync(<9611uxc->work);
lt9611uxc_audio_exit(lt9611uxc);
drm_bridge_remove(<9611uxc->bridge);
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH for-5.15.y 2/3] Revert "drm/bridge: lt9611uxc: Register and attach our DSI device at probe"
2023-12-19 10:11 [PATCH for-5.15.y 0/3] Revert lt9611uxc fixes which broke Amit Pundir
2023-12-19 10:11 ` [PATCH for-5.15.y 1/3] Revert "drm/bridge: lt9611uxc: fix the race in the error path" Amit Pundir
@ 2023-12-19 10:11 ` Amit Pundir
2023-12-19 10:11 ` [PATCH for-5.15.y 3/3] Revert "drm/bridge: lt9611uxc: Switch to devm MIPI-DSI helpers" Amit Pundir
2023-12-19 10:14 ` [PATCH for-5.15.y 0/3] Revert lt9611uxc fixes which broke Amit Pundir
3 siblings, 0 replies; 7+ messages in thread
From: Amit Pundir @ 2023-12-19 10:11 UTC (permalink / raw)
To: Greg KH, Stable, Sasha Levin; +Cc: Maxime Ripard, Dmitry Baryshkov
This reverts commit 29aba28ea195182f547cd8dac1b80eed51b6b73d.
This and the dependent fixes broke display on RB5.
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
---
drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 31 +++++++++-------------
1 file changed, 12 insertions(+), 19 deletions(-)
diff --git a/drivers/gpu/drm/bridge/lontium-lt9611uxc.c b/drivers/gpu/drm/bridge/lontium-lt9611uxc.c
index 1e33b3150bdc..b58842f69fff 100644
--- a/drivers/gpu/drm/bridge/lontium-lt9611uxc.c
+++ b/drivers/gpu/drm/bridge/lontium-lt9611uxc.c
@@ -367,6 +367,18 @@ static int lt9611uxc_bridge_attach(struct drm_bridge *bridge,
return ret;
}
+ /* Attach primary DSI */
+ lt9611uxc->dsi0 = lt9611uxc_attach_dsi(lt9611uxc, lt9611uxc->dsi0_node);
+ if (IS_ERR(lt9611uxc->dsi0))
+ return PTR_ERR(lt9611uxc->dsi0);
+
+ /* Attach secondary DSI, if specified */
+ if (lt9611uxc->dsi1_node) {
+ lt9611uxc->dsi1 = lt9611uxc_attach_dsi(lt9611uxc, lt9611uxc->dsi1_node);
+ if (IS_ERR(lt9611uxc->dsi1))
+ return PTR_ERR(lt9611uxc->dsi1);
+ }
+
return 0;
}
@@ -946,27 +958,8 @@ static int lt9611uxc_probe(struct i2c_client *client,
drm_bridge_add(<9611uxc->bridge);
- /* Attach primary DSI */
- lt9611uxc->dsi0 = lt9611uxc_attach_dsi(lt9611uxc, lt9611uxc->dsi0_node);
- if (IS_ERR(lt9611uxc->dsi0)) {
- ret = PTR_ERR(lt9611uxc->dsi0);
- goto err_remove_bridge;
- }
-
- /* Attach secondary DSI, if specified */
- if (lt9611uxc->dsi1_node) {
- lt9611uxc->dsi1 = lt9611uxc_attach_dsi(lt9611uxc, lt9611uxc->dsi1_node);
- if (IS_ERR(lt9611uxc->dsi1)) {
- ret = PTR_ERR(lt9611uxc->dsi1);
- goto err_remove_bridge;
- }
- }
-
return lt9611uxc_audio_init(dev, lt9611uxc);
-err_remove_bridge:
- drm_bridge_remove(<9611uxc->bridge);
-
err_disable_regulators:
regulator_bulk_disable(ARRAY_SIZE(lt9611uxc->supplies), lt9611uxc->supplies);
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH for-5.15.y 3/3] Revert "drm/bridge: lt9611uxc: Switch to devm MIPI-DSI helpers"
2023-12-19 10:11 [PATCH for-5.15.y 0/3] Revert lt9611uxc fixes which broke Amit Pundir
2023-12-19 10:11 ` [PATCH for-5.15.y 1/3] Revert "drm/bridge: lt9611uxc: fix the race in the error path" Amit Pundir
2023-12-19 10:11 ` [PATCH for-5.15.y 2/3] Revert "drm/bridge: lt9611uxc: Register and attach our DSI device at probe" Amit Pundir
@ 2023-12-19 10:11 ` Amit Pundir
2023-12-19 10:14 ` [PATCH for-5.15.y 0/3] Revert lt9611uxc fixes which broke Amit Pundir
3 siblings, 0 replies; 7+ messages in thread
From: Amit Pundir @ 2023-12-19 10:11 UTC (permalink / raw)
To: Greg KH, Stable, Sasha Levin; +Cc: Maxime Ripard, Dmitry Baryshkov
This reverts commit f53a045793289483b3c2930007fc52c7f1f642d5.
This and the dependent fixes broke display on RB5.
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
---
drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 38 +++++++++++++++++-----
1 file changed, 30 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/bridge/lontium-lt9611uxc.c b/drivers/gpu/drm/bridge/lontium-lt9611uxc.c
index b58842f69fff..c4454d0f6cad 100644
--- a/drivers/gpu/drm/bridge/lontium-lt9611uxc.c
+++ b/drivers/gpu/drm/bridge/lontium-lt9611uxc.c
@@ -258,18 +258,17 @@ static struct mipi_dsi_device *lt9611uxc_attach_dsi(struct lt9611uxc *lt9611uxc,
const struct mipi_dsi_device_info info = { "lt9611uxc", 0, NULL };
struct mipi_dsi_device *dsi;
struct mipi_dsi_host *host;
- struct device *dev = lt9611uxc->dev;
int ret;
host = of_find_mipi_dsi_host_by_node(dsi_node);
if (!host) {
- dev_err(dev, "failed to find dsi host\n");
+ dev_err(lt9611uxc->dev, "failed to find dsi host\n");
return ERR_PTR(-EPROBE_DEFER);
}
- dsi = devm_mipi_dsi_device_register_full(dev, host, &info);
+ dsi = mipi_dsi_device_register_full(host, &info);
if (IS_ERR(dsi)) {
- dev_err(dev, "failed to create dsi device\n");
+ dev_err(lt9611uxc->dev, "failed to create dsi device\n");
return dsi;
}
@@ -278,9 +277,10 @@ static struct mipi_dsi_device *lt9611uxc_attach_dsi(struct lt9611uxc *lt9611uxc,
dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE |
MIPI_DSI_MODE_VIDEO_HSE;
- ret = devm_mipi_dsi_attach(dev, dsi);
+ ret = mipi_dsi_attach(dsi);
if (ret < 0) {
- dev_err(dev, "failed to attach dsi to host\n");
+ dev_err(lt9611uxc->dev, "failed to attach dsi to host\n");
+ mipi_dsi_device_unregister(dsi);
return ERR_PTR(ret);
}
@@ -355,6 +355,19 @@ static int lt9611uxc_connector_init(struct drm_bridge *bridge, struct lt9611uxc
return drm_connector_attach_encoder(<9611uxc->connector, bridge->encoder);
}
+static void lt9611uxc_bridge_detach(struct drm_bridge *bridge)
+{
+ struct lt9611uxc *lt9611uxc = bridge_to_lt9611uxc(bridge);
+
+ if (lt9611uxc->dsi1) {
+ mipi_dsi_detach(lt9611uxc->dsi1);
+ mipi_dsi_device_unregister(lt9611uxc->dsi1);
+ }
+
+ mipi_dsi_detach(lt9611uxc->dsi0);
+ mipi_dsi_device_unregister(lt9611uxc->dsi0);
+}
+
static int lt9611uxc_bridge_attach(struct drm_bridge *bridge,
enum drm_bridge_attach_flags flags)
{
@@ -375,11 +388,19 @@ static int lt9611uxc_bridge_attach(struct drm_bridge *bridge,
/* Attach secondary DSI, if specified */
if (lt9611uxc->dsi1_node) {
lt9611uxc->dsi1 = lt9611uxc_attach_dsi(lt9611uxc, lt9611uxc->dsi1_node);
- if (IS_ERR(lt9611uxc->dsi1))
- return PTR_ERR(lt9611uxc->dsi1);
+ if (IS_ERR(lt9611uxc->dsi1)) {
+ ret = PTR_ERR(lt9611uxc->dsi1);
+ goto err_unregister_dsi0;
+ }
}
return 0;
+
+err_unregister_dsi0:
+ mipi_dsi_detach(lt9611uxc->dsi0);
+ mipi_dsi_device_unregister(lt9611uxc->dsi0);
+
+ return ret;
}
static enum drm_mode_status
@@ -523,6 +544,7 @@ static struct edid *lt9611uxc_bridge_get_edid(struct drm_bridge *bridge,
static const struct drm_bridge_funcs lt9611uxc_bridge_funcs = {
.attach = lt9611uxc_bridge_attach,
+ .detach = lt9611uxc_bridge_detach,
.mode_valid = lt9611uxc_bridge_mode_valid,
.mode_set = lt9611uxc_bridge_mode_set,
.detect = lt9611uxc_bridge_detect,
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH for-5.15.y 0/3] Revert lt9611uxc fixes which broke
2023-12-19 10:11 [PATCH for-5.15.y 0/3] Revert lt9611uxc fixes which broke Amit Pundir
` (2 preceding siblings ...)
2023-12-19 10:11 ` [PATCH for-5.15.y 3/3] Revert "drm/bridge: lt9611uxc: Switch to devm MIPI-DSI helpers" Amit Pundir
@ 2023-12-19 10:14 ` Amit Pundir
2023-12-19 10:52 ` Greg KH
3 siblings, 1 reply; 7+ messages in thread
From: Amit Pundir @ 2023-12-19 10:14 UTC (permalink / raw)
To: Greg KH, Stable, Sasha Levin; +Cc: Maxime Ripard, Dmitry Baryshkov
Apologies for the half-baked subject line. I don't know what went
wrong there. I meant "Revert lt9611uxc fixes which broke display on
RB5".
Regards,
Amit Pundir
On Tue, 19 Dec 2023 at 15:41, Amit Pundir <amit.pundir@linaro.org> wrote:
>
> Recent lt9611uxc fixes in v5.15.139 broke display on RB5
> devboard with following errors:
>
> lt9611uxc 5-002b: LT9611 revision: 0x17.04.93
> lt9611uxc 5-002b: LT9611 version: 0x43
> lt9611uxc 5-002b: failed to find dsi host
> msm ae00000.mdss: bound ae01000.mdp (ops dpu_ops [msm])
> msm_dsi_manager_register: failed to register mipi dsi host for DSI 0: -517
>
> Reverting these fixes get the display working again.
>
> Amit Pundir (3):
> Revert "drm/bridge: lt9611uxc: fix the race in the error path"
> Revert "drm/bridge: lt9611uxc: Register and attach our DSI device at
> probe"
> Revert "drm/bridge: lt9611uxc: Switch to devm MIPI-DSI helpers"
>
> drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 75 +++++++++++++---------
> 1 file changed, 44 insertions(+), 31 deletions(-)
>
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH for-5.15.y 0/3] Revert lt9611uxc fixes which broke
2023-12-19 10:14 ` [PATCH for-5.15.y 0/3] Revert lt9611uxc fixes which broke Amit Pundir
@ 2023-12-19 10:52 ` Greg KH
2023-12-20 14:43 ` Greg KH
0 siblings, 1 reply; 7+ messages in thread
From: Greg KH @ 2023-12-19 10:52 UTC (permalink / raw)
To: Amit Pundir; +Cc: Stable, Sasha Levin, Maxime Ripard, Dmitry Baryshkov
On Tue, Dec 19, 2023 at 03:44:14PM +0530, Amit Pundir wrote:
> Apologies for the half-baked subject line. I don't know what went
> wrong there. I meant "Revert lt9611uxc fixes which broke display on
> RB5".
Thanks, will queue these up after the latest -rc releases are done in a
few days.
greg k-h
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH for-5.15.y 0/3] Revert lt9611uxc fixes which broke
2023-12-19 10:52 ` Greg KH
@ 2023-12-20 14:43 ` Greg KH
0 siblings, 0 replies; 7+ messages in thread
From: Greg KH @ 2023-12-20 14:43 UTC (permalink / raw)
To: Amit Pundir; +Cc: Stable, Sasha Levin, Maxime Ripard, Dmitry Baryshkov
On Tue, Dec 19, 2023 at 11:52:52AM +0100, Greg KH wrote:
> On Tue, Dec 19, 2023 at 03:44:14PM +0530, Amit Pundir wrote:
> > Apologies for the half-baked subject line. I don't know what went
> > wrong there. I meant "Revert lt9611uxc fixes which broke display on
> > RB5".
>
> Thanks, will queue these up after the latest -rc releases are done in a
> few days.
All now queued up, thanks.
greg k-h
^ permalink raw reply [flat|nested] 7+ messages in thread