From: Sowjanya Komatineni Subject: Re: [RFC PATCH v10 6/9] media: tegra: Add Tegra210 Video input driver Date: Sat, 25 Apr 2020 18:04:00 -0700 Message-ID: <64b636af-a63f-6c5e-5d66-d481f79660c2@nvidia.com> References: <1587700513-28449-1-git-send-email-skomatineni@nvidia.com> <1587700513-28449-7-git-send-email-skomatineni@nvidia.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: Content-Language: en-US Sender: linux-tegra-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Dmitry Osipenko , 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, sakari.ailus-X3B1VOXEql0@public.gmane.org, helen.koike-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org Cc: sboyd-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-tegra@vger.kernel.org On 4/25/20 4:29 PM, Dmitry Osipenko wrote: > External email: Use caution opening links or attachments > > > 24.04.2020 06:55, Sowjanya Komatineni =D0=BF=D0=B8=D1=88=D0=B5=D1=82: >> +static int tegra_csi_init(struct host1x_client *client) >> +{ >> + struct tegra_csi *csi =3D host1x_client_to_csi(client); >> + struct tegra_video_device *vid =3D dev_get_drvdata(client->host); >> + int ret; >> + >> + INIT_LIST_HEAD(&csi->csi_chans); >> + >> + ret =3D pm_runtime_get_sync(csi->dev); >> + if (ret < 0) { >> + dev_err(csi->dev, "failed to get runtime PM: %d\n", ret); >> + pm_runtime_put_noidle(csi->dev); >> + return ret; >> + } > The whole point of RPM is to keep hardware enabled only when needed, > i.e. during of the capture process in this case. You should move all RPM > handling to the capture start / stop functions. Will move it to handle during stream start/stop