From: Marek Szyprowski <m.szyprowski@samsung.com>
To: Jagan Teki <jagan@amarulasolutions.com>
Cc: Andrzej Hajda <andrzej.hajda@intel.com>,
Inki Dae <inki.dae@samsung.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
Marek Vasut <marex@denx.de>, Maxime Ripard <mripard@kernel.org>,
Seung-Woo Kim <sw0312.kim@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
Frieder Schrempf <frieder.schrempf@kontron.de>,
Tim Harvey <tharvey@gateworks.com>,
Adam Ford <aford173@gmail.com>,
Matteo Lisi <matteo.lisi@engicam.com>,
dri-devel@lists.freedesktop.org,
linux-samsung-soc@vger.kernel.org,
linux-amarula <linux-amarula@amarulasolutions.com>
Subject: Re: [PATCH v15 00/16] drm: Add Samsung MIPI DSIM bridge
Date: Mon, 6 Mar 2023 12:02:43 +0100 [thread overview]
Message-ID: <4b2624f6-b904-4daa-29ca-380cc7dbfc45@samsung.com> (raw)
In-Reply-To: <CAMty3ZC1U3eDmtWa_sx0Sop_V1vU3fSM=r21U9qPf0UmCYTOkA@mail.gmail.com>
Hi Jagan,
On 04.03.2023 19:59, Jagan Teki wrote:
> On Sat, Mar 4, 2023 at 3:56 AM Marek Szyprowski
> <m.szyprowski@samsung.com> wrote:
>> On 03.03.2023 15:51, Jagan Teki wrote:
>>> This series supports common bridge support for Samsung MIPI DSIM
>>> which is used in Exynos and i.MX8MM SoC's.
>>>
>>> The final bridge supports both the Exynos and i.MX8M Mini/Nano/Plus.
>>>
>>> Inki Dae: please note that this series added on top of exynos-drm-next
>>> since few exynos dsi changes are not been part of drm-misc-next.
>>> Request you to pick these via exynos-drm-next, or let me know if you
>>> have any comments?
>> I gave it a try on Exynos TM2e and unfortunately it nukes again:
>>
>> exynos-drm exynos-drm: bound 13970000.hdmi (ops hdmi_component_ops)
>> Unable to handle kernel paging request at virtual address 003d454d414e5675
>> ...
>> [003d454d414e5675] address between user and kernel address ranges
>> Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP
>> Modules linked in:
>> CPU: 4 PID: 9 Comm: kworker/u16:0 Not tainted 6.2.0-next-20230303+ #13341
>> Hardware name: Samsung TM2E board (DT)
>> Workqueue: events_unbound deferred_probe_work_func
>> pstate: 000000c5 (nzcv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
>> pc : drm_connector_list_iter_next+0x58/0x100
>> lr : drm_connector_list_iter_next+0x2c/0x100
>> sp : ffff80000bbab910
>> ...
>> Call trace:
>> drm_connector_list_iter_next+0x58/0x100
>> drm_mode_config_reset+0xfc/0x144
>> exynos_drm_bind+0x160/0x1b8
>> try_to_bring_up_aggregate_device+0x168/0x1d4
>> __component_add+0xa8/0x170
>> component_add+0x14/0x20
>> hdmi_probe+0x3fc/0x6d4
>> platform_probe+0x68/0xd8
>> really_probe+0x148/0x2b4
>> __driver_probe_device+0x78/0xe0
>> driver_probe_device+0xd8/0x160
>> __device_attach_driver+0xb8/0x138
>> bus_for_each_drv+0x84/0xe0
>> __device_attach+0xa8/0x1b0
>> device_initial_probe+0x14/0x20
>> bus_probe_device+0xb0/0xb4
>> deferred_probe_work_func+0x8c/0xc8
>> process_one_work+0x288/0x6c8
>> worker_thread+0x24c/0x450
>> kthread+0x118/0x11c
>> ret_from_fork+0x10/0x20
> This looks not related to dsi to me since there is no exynos_drm_dsi
> call in the trace. look hdmi related. Moreover, I think the exynos dsi
> worked well on v10 and I couldn't find any potential differences in
> terms of call flow change.
> https://gitlab.com/openedev/kernel/-/commits/imx8mm-dsi-v10
Well, the issue is definitely related to this patchset. On Friday, due
to other kernel messages, I missed the most important part of the log:
[drm] Exynos DRM: using 13800000.decon device for DMA mapping operations
exynos-drm exynos-drm: bound 13800000.decon (ops decon_component_ops)
exynos-drm exynos-drm: bound 13880000.decon (ops decon_component_ops)
exynos-dsi 13900000.dsi: [drm:samsung_dsim_host_attach] Attached s6e3hf2
device
exynos-dsi 13900000.dsi: request interrupt failed with -22
panel-samsung-s6e3ha2: probe of 13900000.dsi.0 failed with error -22
exynos-drm exynos-drm: bound 13900000.dsi (ops exynos_dsi_component_ops)
exynos-drm exynos-drm: bound 13930000.mic (ops exynos_mic_component_ops)
It looks that the are at least 2 issues. The first one related to TE
interrupt registration, the second is broken error path, which should
free allocated resources and stop DRM from binding/initialization.
This patch fixes the issue (TE gpio/interrupt is optional!):
diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c
b/drivers/gpu/drm/bridge/samsung-dsim.c
index b4a5348b763c..ed83495fe105 100644
--- a/drivers/gpu/drm/bridge/samsung-dsim.c
+++ b/drivers/gpu/drm/bridge/samsung-dsim.c
@@ -1518,7 +1518,9 @@ static int samsung_dsim_register_te_irq(struct
samsung_dsim *dsi, struct device
int ret;
dsi->te_gpio = devm_gpiod_get_optional(dev, "te", GPIOD_IN);
- if (IS_ERR(dsi->te_gpio))
+ if (!dsi->te_gpio)
+ return 0;
+ else if (IS_ERR(dsi->te_gpio))
return dev_err_probe(dev, PTR_ERR(dsi->te_gpio),
"failed to get te GPIO\n");
te_gpio_irq = gpiod_to_irq(dsi->te_gpio);
The error path in samsung_dsim_host_attach() after
samsung_dsim_register_te_irq() failure is wrong. It lacks cleaning up
the allocated resources (removing the bridge, detaing the dsi device).
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
next prev parent reply other threads:[~2023-03-06 11:03 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20230303145219eucas1p218c2e302e41464432627c8ac074302f8@eucas1p2.samsung.com>
2023-03-03 14:51 ` [PATCH v15 00/16] drm: Add Samsung MIPI DSIM bridge Jagan Teki
2023-03-03 14:51 ` [PATCH v15 01/16] drm: exynos: dsi: Drop explicit call to bridge detach Jagan Teki
2023-03-03 16:39 ` Marek Vasut
2023-03-03 14:51 ` [PATCH v15 02/16] drm: exynos: dsi: Lookup OF-graph or Child node devices Jagan Teki
2023-03-03 16:41 ` Marek Vasut
2023-03-03 14:51 ` [PATCH v15 03/16] drm: exynos: dsi: Mark PHY as optional Jagan Teki
2023-03-03 14:51 ` [PATCH v15 04/16] drm: exynos: dsi: Add platform PLL_P (PMS_P) offset Jagan Teki
2023-03-03 14:51 ` [PATCH v15 05/16] drm: exynos: dsi: Introduce hw_type platform data Jagan Teki
2023-03-03 14:51 ` [PATCH v15 06/16] drm: exynos: dsi: Handle proper host initialization Jagan Teki
2023-03-03 14:51 ` [PATCH v15 07/16] drm: exynos: dsi: Add atomic check Jagan Teki
2023-03-03 14:51 ` [PATCH v15 08/16] drm: exynos: dsi: Add input_bus_flags Jagan Teki
2023-03-03 15:00 ` Maxime Ripard
2023-03-03 15:02 ` Maxime Ripard
2023-03-03 14:51 ` [PATCH v15 09/16] drm: exynos: dsi: Add atomic_get_input_bus_fmts Jagan Teki
2023-03-03 14:51 ` [PATCH v15 10/16] drm: exynos: dsi: Consolidate component and bridge Jagan Teki
2023-03-03 14:51 ` [PATCH v15 11/16] drm: exynos: dsi: Add host helper for te_irq_handler Jagan Teki
2023-03-03 14:51 ` [PATCH v15 13/16] dt-bindings: display: exynos: dsim: Add NXP i.MX8M Mini/Nano support Jagan Teki
2023-03-03 14:51 ` [PATCH v15 14/16] drm: bridge: samsung-dsim: Add " Jagan Teki
2023-03-03 14:51 ` [PATCH v15 15/16] dt-bindings: display: exynos: dsim: Add NXP i.MX8M Plus support Jagan Teki
2023-03-03 14:51 ` [PATCH v15 16/16] drm: bridge: samsung-dsim: Add " Jagan Teki
[not found] ` <20230303145138.29233-13-jagan@amarulasolutions.com>
2023-03-03 15:08 ` [PATCH v15 12/16] drm: bridge: Generalize Exynos-DSI driver into a Samsung DSIM bridge Maxime Ripard
2023-03-03 15:11 ` Jagan Teki
2023-03-03 22:26 ` [PATCH v15 00/16] drm: Add Samsung MIPI " Marek Szyprowski
2023-03-04 18:59 ` Jagan Teki
2023-03-06 11:02 ` Marek Szyprowski [this message]
2023-03-06 17:24 ` Jagan Teki
2023-03-06 22:41 ` Marek Szyprowski
2023-03-07 7:55 ` Jagan Teki
2023-03-07 9:22 ` Jagan Teki
2023-03-07 10:44 ` Marek Szyprowski
2023-03-06 5:24 ` 대인기/Tizen Platform Lab(SR)/삼성전자
2023-03-06 8:48 ` Jagan Teki
2023-03-14 0:31 ` Fabio Estevam
[not found] ` <CAAQKjZM66M6wgtoBmAcQifq8LgBUos0bZfbTkRBqnOb7E-05tQ@mail.gmail.com>
2023-03-23 15:34 ` Fabio Estevam
2023-03-27 14:08 ` Neil Armstrong
[not found] ` <CAAQKjZPmYcdUphP9w7i_O65rhXwsw2rCxAnDJ1JG73-RuLP4UQ@mail.gmail.com>
2023-03-28 7:53 ` 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=4b2624f6-b904-4daa-29ca-380cc7dbfc45@samsung.com \
--to=m.szyprowski@samsung.com \
--cc=aford173@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=frieder.schrempf@kontron.de \
--cc=inki.dae@samsung.com \
--cc=jagan@amarulasolutions.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-amarula@amarulasolutions.com \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=marex@denx.de \
--cc=matteo.lisi@engicam.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=sw0312.kim@samsung.com \
--cc=tharvey@gateworks.com \
/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;
as well as URLs for NNTP newsgroup(s).