[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <016201dc15be$3d032ca0$b70985e0$@samsung.com>
Date: Mon, 25 Aug 2025 18:16:07 +0530
From: "Inbaraj E" <inbaraj.e@...sung.com>
To: "'Krzysztof Kozlowski'" <krzk@...nel.org>, <mturquette@...libre.com>,
<sboyd@...nel.org>, <robh@...nel.org>, <krzk+dt@...nel.org>,
<conor+dt@...nel.org>, <s.nawrocki@...sung.com>, <s.hauer@...gutronix.de>,
<shawnguo@...nel.org>, <cw00.choi@...sung.com>, <rmfrfs@...il.com>,
<laurent.pinchart@...asonboard.com>, <martink@...teo.de>,
<mchehab@...nel.org>, <linux-fsd@...la.com>, <will@...nel.org>,
<catalin.marinas@....com>, <pankaj.dubey@...sung.com>,
<shradha.t@...sung.com>, <ravi.patel@...sung.com>
Cc: <linux-clk@...r.kernel.org>, <devicetree@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <alim.akhtar@...sung.com>,
<linux-samsung-soc@...r.kernel.org>, <kernel@...i.sm>,
<kernel@...gutronix.de>, <festevam@...il.com>,
<linux-media@...r.kernel.org>, <imx@...ts.linux.dev>,
<linux-arm-kernel@...ts.infradead.org>
Subject: RE: [PATCH v2 12/12] media: fsd-csis: Add support for FSD CSIS DMA
Hi Krzysztof,
> >> Even more questions why?
> >
> > If CONFIG_PM is enabled, the clocks are enabled manually in the driver
> > through fsd_csis_runtime_resume API.
> >
> > If CONFIG_PM is enabled, the clocks are managed through the PM runtime
> > framework.
> >
> > Can you please help me understand what wrong here?
>
> I think I see such code for the first time, so wrong is doing something
> common in completely unusual way.
>
Driver should ensure a device can be also used normally when runtime
PM is disabled. So enabling clocks manually in probe, if CONFIG_PM is
disabled.
A Couple of other drivers also doing it in same way
drivers/media/platform/nxp/imx-mipi-csis.c and
drivers/media/platform/samsung/exynos4-is/fimc-core.c
> >
> > I'll fix in next patchset.
> >
> >>> +
> >>> + ret = fsd_csis_async_register(csis);
> >>> + if (ret)
> >>> + goto err_media_cleanup;
> >>> +
> >>> + return 0;
> >>> +
> >>> +err_media_cleanup:
> >>> + fsd_csis_media_cleanup(csis);
> >>
> >> Also this...
> >>
> >
> > if fsd_csis_media_init fails, the cleanup is handled internally.
>
> What does it mean internally?
I mean that in case fsd_csis_media_init fails, the cleanup of resources is handled
Within the same function itself.
>
> > Here, cleanup is used only for fsd_csis_async_register failure.
> >
> > can you please help me understand what is wrong here?
>
> Yeah, you leak clock resources.
I'll fix in next patchset
Regards,
Inbaraj E
Powered by blists - more mailing lists