All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: "Tommaso Merciai" <tomm.merciai@gmail.com>,
	linux-renesas-soc@vger.kernel.org, linux-media@vger.kernel.org,
	biju.das.jz@bp.renesas.com,
	prabhakar.mahadev-lad.rj@bp.renesas.com,
	"Mauro Carvalho Chehab" <mchehab@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Geert Uytterhoeven" <geert+renesas@glider.be>,
	"Magnus Damm" <magnus.damm@gmail.com>,
	"Hans Verkuil" <hverkuil@xs4all.nl>,
	"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 8/8] media: rzg2l-cru: rzg2l-core: Use devm_pm_runtime_enable()
Date: Tue, 18 Feb 2025 13:21:24 +0100	[thread overview]
Message-ID: <Z7R7RCkaa/iBtf4M@tom-desktop> (raw)
In-Reply-To: <20250214005059.GG8393@pendragon.ideasonboard.com>

Hi Laurent,
Thanks for your review.

On Fri, Feb 14, 2025 at 02:50:59AM +0200, Laurent Pinchart wrote:
> Hi Tommaso,
> 
> Thank you for the patch.
> 
> On Mon, Feb 10, 2025 at 12:45:40PM +0100, Tommaso Merciai wrote:
> > Use newly added devm_pm_runtime_enable() into rzg2l_cru_probe() and
> > drop unnecessary pm_runtime_disable() from rzg2l_cru_probe() and
> > rzg2l_csi2_remove().
> > 
> > Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
> > ---
> >  drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c | 7 +++----
> >  1 file changed, 3 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c
> > index 70fed0ce45ea..5548b328d970 100644
> > --- a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c
> > +++ b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c
> > @@ -287,7 +287,9 @@ static int rzg2l_cru_probe(struct platform_device *pdev)
> >  
> >  	cru->num_buf = RZG2L_CRU_HW_BUFFER_DEFAULT;
> >  	pm_suspend_ignore_children(dev, true);
> > -	pm_runtime_enable(dev);
> > +	ret = devm_pm_runtime_enable(dev);
> > +	if (ret)
> > +		return ret;
> 
> Leaking DMA.

Ouch, thanks!
Will fix this in v2.

> 
> >  
> >  	ret = rzg2l_cru_media_init(cru);
> >  	if (ret)
> > @@ -297,7 +299,6 @@ static int rzg2l_cru_probe(struct platform_device *pdev)
> >  
> >  error_dma_unregister:
> >  	rzg2l_cru_dma_unregister(cru);
> > -	pm_runtime_disable(dev);
> >  
> >  	return ret;
> >  }
> > @@ -306,8 +307,6 @@ static void rzg2l_cru_remove(struct platform_device *pdev)
> >  {
> >  	struct rzg2l_cru_dev *cru = platform_get_drvdata(pdev);
> >  
> > -	pm_runtime_disable(&pdev->dev);
> > -
> >  	v4l2_async_nf_unregister(&cru->notifier);
> >  	v4l2_async_nf_cleanup(&cru->notifier);
> >  
> 
> -- 
> Regards,
> 
> Laurent Pinchart

Thanks & Regards,
Tommaso

      reply	other threads:[~2025-02-18 12:21 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-10 11:45 [PATCH 0/8] media: rzg2l-cru: Document RZ/G3E (CSI2, CRU) Tommaso Merciai
2025-02-10 11:45 ` [PATCH 1/8] clk: renesas: r9a09g047: Add support for CRU0 clocks, and resets Tommaso Merciai
2025-02-10 11:54   ` Biju Das
2025-02-20 14:39     ` Geert Uytterhoeven
2025-02-20 14:36   ` Geert Uytterhoeven
2025-02-10 11:45 ` [PATCH 2/8] media: dt-bindings: renesas,rzg2l-csi2: Document Renesas RZ/V2H(P) SoC Tommaso Merciai
2025-02-14  0:29   ` Laurent Pinchart
2025-02-18 11:55     ` Tommaso Merciai
2025-02-18 12:35       ` Laurent Pinchart
2025-02-18 13:37         ` Tommaso Merciai
2025-02-19 14:51     ` Rob Herring
2025-02-19 15:12       ` Laurent Pinchart
2025-02-19 20:56         ` Rob Herring
2025-02-19 21:17           ` Laurent Pinchart
2025-02-19 14:52   ` Rob Herring
2025-02-10 11:45 ` [PATCH 3/8] media: dt-bindings: renesas,rzg2l-csi2: Document Renesas RZ/G3E CSI-2 block Tommaso Merciai
2025-02-13  8:56   ` Krzysztof Kozlowski
2025-02-13 15:59     ` Tommaso Merciai
2025-02-10 11:45 ` [PATCH 4/8] media: dt-bindings: renesas,rzg2l-cru: Document Renesas RZ/G3E SoC Tommaso Merciai
2025-02-10 13:47   ` Rob Herring (Arm)
2025-02-14  0:45   ` Laurent Pinchart
2025-02-18 15:51     ` Tommaso Merciai
2025-02-10 11:45 ` [PATCH 5/8] media: rzg2l-cru: csi2: Use temporary variable for struct device in rzg2l_csi2_probe() Tommaso Merciai
2025-02-10 11:55   ` Biju Das
2025-02-14  0:47   ` Laurent Pinchart
2025-02-18 12:12     ` Tommaso Merciai
2025-02-10 11:45 ` [PATCH 6/8] media: rzg2l-cru: csi2: Use devm_pm_runtime_enable() Tommaso Merciai
2025-02-10 11:56   ` Biju Das
2025-02-14  0:48   ` Laurent Pinchart
2025-02-10 11:45 ` [PATCH 7/8] media: rzg2l-cru: rzg2l-core: Use temporary variable for struct device in rzg2l_cru_probe() Tommaso Merciai
2025-02-10 11:56   ` Biju Das
2025-02-14  0:49   ` Laurent Pinchart
2025-02-10 11:45 ` [PATCH 8/8] media: rzg2l-cru: rzg2l-core: Use devm_pm_runtime_enable() Tommaso Merciai
2025-02-10 11:57   ` Biju Das
2025-02-14  0:50   ` Laurent Pinchart
2025-02-18 12:21     ` Tommaso Merciai [this message]

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=Z7R7RCkaa/iBtf4M@tom-desktop \
    --to=tommaso.merciai.xr@bp.renesas.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=hverkuil@xs4all.nl \
    --cc=krzk+dt@kernel.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=mchehab@kernel.org \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=robh@kernel.org \
    --cc=tomm.merciai@gmail.com \
    --cc=u.kleine-koenig@baylibre.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.