From: Lucas Stach <l.stach@pengutronix.de> To: Yongzhi Liu <lyz_cs@pku.edu.cn>, linux+etnaviv@armlinux.org.uk, christian.gmeiner@gmail.com, airlied@linux.ie, daniel@ffwll.ch, etnaviv@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drm/etnaviv: Add missing pm_runtime_put Date: Wed, 19 Jan 2022 11:51:20 +0100 [thread overview] Message-ID: <bb71f83d4897ce818348522d9594b091478073ff.camel@pengutronix.de> (raw) In-Reply-To: <1642515391-19329-1-git-send-email-lyz_cs@pku.edu.cn> Am Dienstag, dem 18.01.2022 um 06:16 -0800 schrieb Yongzhi Liu: > pm_runtime_get_sync() increments the runtime PM usage counter even > when it returns an error code, thus a matching decrement is needed > on the error handling path to keep the counter balanced. > Instead of adding more error handling code here, I would prefer to convert this to pm_runtime_resume_and_get to avoid this issue. Regards, Lucas > Signed-off-by: Yongzhi Liu <lyz_cs@pku.edu.cn> > --- > drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c > index 242a5fd..5e81a98 100644 > --- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c > +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c > @@ -1714,6 +1714,9 @@ static int etnaviv_gpu_bind(struct device *dev, struct device *master, > return 0; > > out_sched: > +#ifdef CONFIG_PM > + pm_runtime_put_autosuspend(gpu->dev); > +#endif > etnaviv_sched_fini(gpu); > > out_workqueue:
WARNING: multiple messages have this Message-ID (diff)
From: Lucas Stach <l.stach@pengutronix.de> To: Yongzhi Liu <lyz_cs@pku.edu.cn>, linux+etnaviv@armlinux.org.uk, christian.gmeiner@gmail.com, airlied@linux.ie, daniel@ffwll.ch, etnaviv@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH] drm/etnaviv: Add missing pm_runtime_put Date: Wed, 19 Jan 2022 11:51:20 +0100 [thread overview] Message-ID: <bb71f83d4897ce818348522d9594b091478073ff.camel@pengutronix.de> (raw) In-Reply-To: <1642515391-19329-1-git-send-email-lyz_cs@pku.edu.cn> Am Dienstag, dem 18.01.2022 um 06:16 -0800 schrieb Yongzhi Liu: > pm_runtime_get_sync() increments the runtime PM usage counter even > when it returns an error code, thus a matching decrement is needed > on the error handling path to keep the counter balanced. > Instead of adding more error handling code here, I would prefer to convert this to pm_runtime_resume_and_get to avoid this issue. Regards, Lucas > Signed-off-by: Yongzhi Liu <lyz_cs@pku.edu.cn> > --- > drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c > index 242a5fd..5e81a98 100644 > --- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c > +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c > @@ -1714,6 +1714,9 @@ static int etnaviv_gpu_bind(struct device *dev, struct device *master, > return 0; > > out_sched: > +#ifdef CONFIG_PM > + pm_runtime_put_autosuspend(gpu->dev); > +#endif > etnaviv_sched_fini(gpu); > > out_workqueue:
next prev parent reply other threads:[~2022-01-19 10:51 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-01-18 14:16 [PATCH] drm/etnaviv: Add missing pm_runtime_put Yongzhi Liu 2022-01-18 14:16 ` Yongzhi Liu 2022-01-19 10:51 ` Lucas Stach [this message] 2022-01-19 10:51 ` Lucas Stach 2022-01-19 11:36 ` 刘永志 2022-01-19 11:36 ` 刘永志
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=bb71f83d4897ce818348522d9594b091478073ff.camel@pengutronix.de \ --to=l.stach@pengutronix.de \ --cc=airlied@linux.ie \ --cc=christian.gmeiner@gmail.com \ --cc=daniel@ffwll.ch \ --cc=dri-devel@lists.freedesktop.org \ --cc=etnaviv@lists.freedesktop.org \ --cc=linux+etnaviv@armlinux.org.uk \ --cc=linux-kernel@vger.kernel.org \ --cc=lyz_cs@pku.edu.cn \ /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: linkBe 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.