From: Dmitry Osipenko Subject: Re: [RFC PATCH v1 3/5] media: tegra-video: Move PM runtime handle to streaming Date: Tue, 28 Apr 2020 17:05:34 +0300 Message-ID: <4d069601-5507-dc8f-0cbc-acd8fd7324b3@gmail.com> References: <1588047650-29402-1-git-send-email-skomatineni@nvidia.com> <1588047650-29402-4-git-send-email-skomatineni@nvidia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: <1588047650-29402-4-git-send-email-skomatineni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> Content-Language: en-US Sender: linux-tegra-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Sowjanya Komatineni , thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org, frankc-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org, hverkuil-qWit8jRvyhVmR6Xm/wNWPw@public.gmane.org Cc: linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-tegra@vger.kernel.org 28.04.2020 07:20, Sowjanya Komatineni пишет: > + ret = csi->ops->csi_streaming(csi_chan, chan->pg_mode, enable); > > - return csi->ops->csi_streaming(csi_chan, chan->pg_mode, enable); > + if ((ret < 0 || !enable) && atomic_dec_and_test(&csi->clk_refcnt)) > + pm_runtime_put_sync(csi->dev); There shouldn't be a need to sync the RPM here, hence just pm_runtime_put(csi->dev). Same for the VI.