[PATCH v2 12/12] media: fsd-csis: Add support for FSD CSIS DMA

Inbaraj E inbaraj.e at samsung.com
Mon Aug 25 05:46:07 PDT 2025


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




More information about the linux-arm-kernel mailing list