From: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
To: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Cc: linux-pm@vger.kernel.org, Hans Verkuil <hans.verkuil@cisco.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Ramakrishnan Muthukrishnan <ramakrmu@cisco.com>,
Sylwester Nawrocki <s.nawrocki@samsung.com>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 5/7] [media] v4l2-core: Implement dev_pm_ops.prepare()
Date: Fri, 3 Jul 2015 15:08:46 -0300 [thread overview]
Message-ID: <20150703150846.4eb8b032@recife.lan> (raw)
In-Reply-To: <1428065887-16017-6-git-send-email-tomeu.vizoso@collabora.com>
Hi,
Em Fri, 3 Apr 2015 14:57:54 +0200
Tomeu Vizoso <tomeu.vizoso@collabora.com> escreveu:
> Have it return 1 so that video devices that are runtime-suspended won't
> be suspended when the system goes to a sleep state. This can make resume
> times considerably shorter because these devices don't need to be
> resumed when the system is awaken.
I'm not a PM exprert, but that patch doesn't sound right. Not all devices
supported by v4l2-dev implement runtime suspend.
So, I guess this need to be done at driver level, not at core level.
> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
> ---
> drivers/media/v4l2-core/v4l2-dev.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/media/v4l2-core/v4l2-dev.c b/drivers/media/v4l2-core/v4l2-dev.c
> index e2b8b3e..b74e3d3 100644
> --- a/drivers/media/v4l2-core/v4l2-dev.c
> +++ b/drivers/media/v4l2-core/v4l2-dev.c
> @@ -219,9 +219,19 @@ static void v4l2_device_release(struct device *cd)
> v4l2_device_put(v4l2_dev);
> }
>
> +static int video_device_prepare(struct device *dev)
> +{
> + return 1;
> +}
> +
> +static const struct dev_pm_ops video_device_pm_ops = {
> + .prepare = video_device_prepare,
> +};
> +
> static struct class video_class = {
> .name = VIDEO_NAME,
> .dev_groups = video_device_groups,
> + .pm = &video_device_pm_ops,
> };
>
> struct video_device *video_devdata(struct file *file)
next prev parent reply other threads:[~2015-07-03 18:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-03 12:57 [PATCH v2 0/7] Allow UVC devices to remain runtime-suspended when sleeping Tomeu Vizoso
2015-04-03 12:57 ` [PATCH v2 1/7] Input: Implement dev_pm_ops.prepare in input_class Tomeu Vizoso
2015-04-03 12:57 ` [PATCH v2 2/7] Input: Add input_dev.stay_runtime_suspended flag Tomeu Vizoso
2015-04-03 12:57 ` [PATCH v2 3/7] [media] uvcvideo: Set " Tomeu Vizoso
2015-04-03 12:57 ` [PATCH v2 4/7] [media] uvcvideo: Enable runtime PM of descendant devices Tomeu Vizoso
2015-04-04 12:33 ` Laurent Pinchart
2015-04-09 10:52 ` Tomeu Vizoso
2015-04-03 12:57 ` [PATCH v2 5/7] [media] v4l2-core: Implement dev_pm_ops.prepare() Tomeu Vizoso
2015-07-03 18:08 ` Mauro Carvalho Chehab [this message]
2015-04-03 12:57 ` [PATCH v2 6/7] [media] media-devnode: Implement dev_pm_ops.prepare callback Tomeu Vizoso
2015-04-03 12:57 ` [PATCH v2 7/7] USB / PM: Allow USB devices to remain runtime-suspended when sleeping Tomeu Vizoso
2015-04-03 20:44 ` Dmitry Torokhov
2015-04-03 21:23 ` Rafael J. Wysocki
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=20150703150846.4eb8b032@recife.lan \
--to=mchehab@osg.samsung.com \
--cc=hans.verkuil@cisco.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=ramakrmu@cisco.com \
--cc=s.nawrocki@samsung.com \
--cc=sakari.ailus@linux.intel.com \
--cc=tomeu.vizoso@collabora.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox