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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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






[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux for Synopsys ARC Processors]    
  • [Linux on Unisoc (RDA Micro) SoCs]     [Linux Actions SoC]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  •   Powered by Linux