From: Konrad Dybcio <konrad.dybcio@linaro.org>
To: Neil Armstrong <neil.armstrong@linaro.org>,
Sam Ravnborg <sam@ravnborg.org>, David Airlie <airlied@gmail.com>,
Daniel Vetter <daniel@ffwll.ch>
Cc: Marijn Suijten <marijn.suijten@somainline.org>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Konrad Dybcio <konrad.dybcio@linaro.org>
Subject: [PATCH] drm/panel: novatek-nt35950: Only unregister DSI1 if it exists
Date: Mon, 17 Apr 2023 17:41:08 +0200 [thread overview]
Message-ID: <20230417-topic-maple_panel_fixup-v1-1-07c8db606f5e@linaro.org> (raw)
Commit 5dd45b66742a ("drm/panel: novatek-nt35950: Improve error handling")
introduced logic to unregister DSI1 on any sort of probe failure, as
that's not done automatically by kernel APIs.
It did not however account for cases where only one DSI host is used.
Fix that.
Fixes: 5dd45b66742a ("drm/panel: novatek-nt35950: Improve error handling")
Reported-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
drivers/gpu/drm/panel/panel-novatek-nt35950.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-novatek-nt35950.c b/drivers/gpu/drm/panel/panel-novatek-nt35950.c
index 7498fc6258bb..8b108ac80b55 100644
--- a/drivers/gpu/drm/panel/panel-novatek-nt35950.c
+++ b/drivers/gpu/drm/panel/panel-novatek-nt35950.c
@@ -586,7 +586,8 @@ static int nt35950_probe(struct mipi_dsi_device *dsi)
ret = drm_panel_of_backlight(&nt->panel);
if (ret) {
- mipi_dsi_device_unregister(nt->dsi[1]);
+ if (num_dsis == 2)
+ mipi_dsi_device_unregister(nt->dsi[1]);
return dev_err_probe(dev, ret, "Failed to get backlight\n");
}
@@ -606,7 +607,8 @@ static int nt35950_probe(struct mipi_dsi_device *dsi)
ret = mipi_dsi_attach(nt->dsi[i]);
if (ret < 0) {
/* If we fail to attach to either host, we're done */
- mipi_dsi_device_unregister(nt->dsi[1]);
+ if (num_dsis == 2)
+ mipi_dsi_device_unregister(nt->dsi[1]);
return dev_err_probe(dev, ret,
"Cannot attach to DSI%d host.\n", i);
---
base-commit: ab4f869fba6119997f7630d600049762a2b014fa
change-id: 20230417-topic-maple_panel_fixup-170b6d3a8c9b
Best regards,
--
Konrad Dybcio <konrad.dybcio@linaro.org>
next reply other threads:[~2023-04-17 15:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-17 15:41 Konrad Dybcio [this message]
2023-04-18 8:04 ` AngeloGioacchino Del Regno
2023-04-18 8:22 ` Neil Armstrong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230417-topic-maple_panel_fixup-v1-1-07c8db606f5e@linaro.org \
--to=konrad.dybcio@linaro.org \
--cc=airlied@gmail.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=neil.armstrong@linaro.org \
--cc=sam@ravnborg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®