Hi Laurent, On Tue Mar 15, 2022 at 1:03 PM WET, Laurent Pinchart wrote: > Hi Jacopo, > > On Tue, Mar 15, 2022 at 01:27:48PM +0100, Jacopo Mondi wrote: > > On Tue, Mar 15, 2022 at 01:30:20PM +0200, Laurent Pinchart wrote: > > > On Mon, Mar 14, 2022 at 11:39:40AM +0100, Jacopo Mondi wrote: > > > > The mipi_csis_log_counters() function already checks for > > > > csis->debug.enable, it is not necessary to do the same in the caller. > > > > > > Does it ? It does only to decide whether or not to print counters that > > > have a zero value. > > > > Roght, I mis-read the condition there. > > > > What is the usage of the counters logger ? Should we make it > > conditional to debug.enable ? > > It's been there from the very beginning, so I'm not sure what the > expected use cases where. I'd be tempted to actually move it to debugfs, > possibly with a single warning message at stream start if any error is > detected. > > Rui, what do you think ? This were there to trace events when debug is enable or irq_src_errors where thrown in the irq_handler and report them at start stream. But, it looks good to move it to debugfs. Thanks for your and Jacopo work on this to improve it. Cheers, Rui > > > > > Compatc the code in the caller as well by removing an empty line. > > > > > > > > Signed-off-by: Jacopo Mondi <jacopo@xxxxxxxxxx> > > > > --- > > > > drivers/media/platform/imx/imx-mipi-csis.c | 5 +---- > > > > 1 file changed, 1 insertion(+), 4 deletions(-) > > > > > > > > diff --git a/drivers/media/platform/imx/imx-mipi-csis.c b/drivers/media/platform/imx/imx-mipi-csis.c > > > > index 4a6152c13d52..4bb469fcb6b3 100644 > > > > --- a/drivers/media/platform/imx/imx-mipi-csis.c > > > > +++ b/drivers/media/platform/imx/imx-mipi-csis.c > > > > @@ -913,11 +913,8 @@ static int mipi_csis_s_stream(struct v4l2_subdev *sd, int enable) > > > > > > > > if (!enable) { > > > > v4l2_subdev_call(csis->src_sd, video, s_stream, 0); > > > > - > > > > mipi_csis_stop_stream(csis); > > > > - if (csis->debug.enable) > > > > - mipi_csis_log_counters(csis, true); > > > > - > > > > + mipi_csis_log_counters(csis, true); > > > > pm_runtime_put(csis->dev); > > > > > > > > return 0; > > -- > Regards, > > Laurent Pinchart