* [PATCH v2 0/6] media: uvcvideo: Implement Granular Power Saving
@ 2025-02-03 12:26 Ricardo Ribalda
2025-02-03 12:26 ` [PATCH v2 1/6] media: uvcvideo: Keep streaming state in the file handle Ricardo Ribalda
` (5 more replies)
0 siblings, 6 replies; 8+ messages in thread
From: Ricardo Ribalda @ 2025-02-03 12:26 UTC (permalink / raw)
To: Laurent Pinchart, Hans de Goede, Mauro Carvalho Chehab,
Guennadi Liakhovetski
Cc: linux-media, linux-kernel, Mauro Carvalho Chehab, Ricardo Ribalda
Right now we power-up the device when a user open() the device and we
power it off when the last user close() the first video node.
This behaviour affects the power consumption of the device is multiple
use cases, such as:
- Polling the privacy gpio
- udev probing the device
This patchset introduces a more granular power saving behaviour where
the camera is only awaken when needed. It is compatible with
asynchronous controls.
While developing this patchset, two bugs were found. The patchset has
been developed so these fixes can be taken independently.
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
Changes in v2:
- Add missing semicolon.
- Rebase on top of media-committers/next
- Link to v1: https://lore.kernel.org/r/20241126-uvc-granpower-ng-v1-0-6312bf26549c@chromium.org
---
Ricardo Ribalda (6):
media: uvcvideo: Keep streaming state in the file handle
media: uvcvideo: Move usb_autopm_(get|put)_interface to status_get
media: uvcvideo: Add a uvc_status guard
media: uvcvideo: Increase/decrease the PM counter per IOCTL
media: uvcvideo: Make power management granular
media: uvcvideo: Do not turn on the camera for some ioctls
drivers/media/usb/uvc/uvc_ctrl.c | 13 ++++++-
drivers/media/usb/uvc/uvc_status.c | 38 ++++++++++++++++---
drivers/media/usb/uvc/uvc_v4l2.c | 76 ++++++++++++++++++++++++++------------
drivers/media/usb/uvc/uvcvideo.h | 3 ++
4 files changed, 100 insertions(+), 30 deletions(-)
---
base-commit: 2014c95afecee3e76ca4a56956a936e23283f05b
change-id: 20241126-uvc-granpower-ng-069185a6d474
Best regards,
--
Ricardo Ribalda <ribalda@chromium.org>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 1/6] media: uvcvideo: Keep streaming state in the file handle
2025-02-03 12:26 [PATCH v2 0/6] media: uvcvideo: Implement Granular Power Saving Ricardo Ribalda
@ 2025-02-03 12:26 ` Ricardo Ribalda
2025-02-03 12:26 ` [PATCH v2 2/6] media: uvcvideo: Move usb_autopm_(get|put)_interface to status_get Ricardo Ribalda
` (4 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Ricardo Ribalda @ 2025-02-03 12:26 UTC (permalink / raw)
To: Laurent Pinchart, Hans de Goede, Mauro Carvalho Chehab,
Guennadi Liakhovetski
Cc: linux-media, linux-kernel, Mauro Carvalho Chehab, Ricardo Ribalda
Add a variable in the file handle state to figure out if a camera is in
the streaming state or not.
This variable will be used in the future for power management policies.
Now that we are at it, make use of guards to simplify the code.
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
drivers/media/usb/uvc/uvc_v4l2.c | 15 +++++++++++----
drivers/media/usb/uvc/uvcvideo.h | 1 +
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c
index 93c6cdb23881..856eaa23e703 100644
--- a/drivers/media/usb/uvc/uvc_v4l2.c
+++ b/drivers/media/usb/uvc/uvc_v4l2.c
@@ -835,11 +835,17 @@ static int uvc_ioctl_streamon(struct file *file, void *fh,
if (!uvc_has_privileges(handle))
return -EBUSY;
- mutex_lock(&stream->mutex);
+ guard(mutex)(&stream->mutex);
+
+ if (handle->is_streaming)
+ return 0;
+
ret = uvc_queue_streamon(&stream->queue, type);
- mutex_unlock(&stream->mutex);
+ if (!ret)
+ handle->is_streaming = true;
return ret;
+
}
static int uvc_ioctl_streamoff(struct file *file, void *fh,
@@ -851,9 +857,10 @@ static int uvc_ioctl_streamoff(struct file *file, void *fh,
if (!uvc_has_privileges(handle))
return -EBUSY;
- mutex_lock(&stream->mutex);
+ guard(mutex)(&stream->mutex);
+
uvc_queue_streamoff(&stream->queue, type);
- mutex_unlock(&stream->mutex);
+ handle->is_streaming = false;
return 0;
}
diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h
index 5e388f05f3fc..bc87e1f2c669 100644
--- a/drivers/media/usb/uvc/uvcvideo.h
+++ b/drivers/media/usb/uvc/uvcvideo.h
@@ -618,6 +618,7 @@ struct uvc_fh {
struct uvc_streaming *stream;
enum uvc_handle_state state;
unsigned int pending_async_ctrls;
+ bool is_streaming;
};
struct uvc_driver {
--
2.48.1.362.g079036d154-goog
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 2/6] media: uvcvideo: Move usb_autopm_(get|put)_interface to status_get
2025-02-03 12:26 [PATCH v2 0/6] media: uvcvideo: Implement Granular Power Saving Ricardo Ribalda
2025-02-03 12:26 ` [PATCH v2 1/6] media: uvcvideo: Keep streaming state in the file handle Ricardo Ribalda
@ 2025-02-03 12:26 ` Ricardo Ribalda
2025-02-03 12:26 ` [PATCH v2 3/6] media: uvcvideo: Add a uvc_status guard Ricardo Ribalda
` (3 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Ricardo Ribalda @ 2025-02-03 12:26 UTC (permalink / raw)
To: Laurent Pinchart, Hans de Goede, Mauro Carvalho Chehab,
Guennadi Liakhovetski
Cc: linux-media, linux-kernel, Mauro Carvalho Chehab, Ricardo Ribalda
Right now PM operations are always called at the same locations as
uvc_status_(get|put).
Combine them into uvc_status_(get|put). This simplifies the current
code and future PM changes in the driver.
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
drivers/media/usb/uvc/uvc_status.c | 38 +++++++++++++++++++++++++++++++++-----
drivers/media/usb/uvc/uvc_v4l2.c | 11 +----------
2 files changed, 34 insertions(+), 15 deletions(-)
diff --git a/drivers/media/usb/uvc/uvc_status.c b/drivers/media/usb/uvc/uvc_status.c
index ee01dce4b783..caa673b0279d 100644
--- a/drivers/media/usb/uvc/uvc_status.c
+++ b/drivers/media/usb/uvc/uvc_status.c
@@ -382,7 +382,7 @@ void uvc_status_suspend(struct uvc_device *dev)
uvc_status_stop(dev);
}
-int uvc_status_get(struct uvc_device *dev)
+static int _uvc_status_get(struct uvc_device *dev)
{
int ret;
@@ -399,13 +399,41 @@ int uvc_status_get(struct uvc_device *dev)
return 0;
}
-void uvc_status_put(struct uvc_device *dev)
+int uvc_status_get(struct uvc_device *dev)
+{
+ int ret;
+
+ ret = usb_autopm_get_interface(dev->intf);
+ if (ret)
+ return ret;
+
+ ret = _uvc_status_get(dev);
+
+ if (ret)
+ usb_autopm_put_interface(dev->intf);
+
+ return ret;
+}
+
+static int _uvc_status_put(struct uvc_device *dev)
{
guard(mutex)(&dev->status_lock);
if (dev->status_users == 1)
uvc_status_stop(dev);
- WARN_ON(!dev->status_users);
- if (dev->status_users)
- dev->status_users--;
+
+ if (WARN_ON(!dev->status_users))
+ return -EIO;
+
+ dev->status_users--;
+ return 0;
+}
+
+void uvc_status_put(struct uvc_device *dev)
+{
+ int ret;
+
+ ret = _uvc_status_put(dev);
+ if (!ret)
+ usb_autopm_put_interface(dev->intf);
}
diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c
index 856eaa23e703..5d4e967938af 100644
--- a/drivers/media/usb/uvc/uvc_v4l2.c
+++ b/drivers/media/usb/uvc/uvc_v4l2.c
@@ -636,20 +636,13 @@ static int uvc_v4l2_open(struct file *file)
stream = video_drvdata(file);
uvc_dbg(stream->dev, CALLS, "%s\n", __func__);
- ret = usb_autopm_get_interface(stream->dev->intf);
- if (ret < 0)
- return ret;
-
/* Create the device handle. */
handle = kzalloc(sizeof(*handle), GFP_KERNEL);
- if (handle == NULL) {
- usb_autopm_put_interface(stream->dev->intf);
+ if (!handle)
return -ENOMEM;
- }
ret = uvc_status_get(stream->dev);
if (ret) {
- usb_autopm_put_interface(stream->dev->intf);
kfree(handle);
return ret;
}
@@ -685,8 +678,6 @@ static int uvc_v4l2_release(struct file *file)
file->private_data = NULL;
uvc_status_put(stream->dev);
-
- usb_autopm_put_interface(stream->dev->intf);
return 0;
}
--
2.48.1.362.g079036d154-goog
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 3/6] media: uvcvideo: Add a uvc_status guard
2025-02-03 12:26 [PATCH v2 0/6] media: uvcvideo: Implement Granular Power Saving Ricardo Ribalda
2025-02-03 12:26 ` [PATCH v2 1/6] media: uvcvideo: Keep streaming state in the file handle Ricardo Ribalda
2025-02-03 12:26 ` [PATCH v2 2/6] media: uvcvideo: Move usb_autopm_(get|put)_interface to status_get Ricardo Ribalda
@ 2025-02-03 12:26 ` Ricardo Ribalda
2025-02-03 12:26 ` [PATCH v2 4/6] media: uvcvideo: Increase/decrease the PM counter per IOCTL Ricardo Ribalda
` (2 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Ricardo Ribalda @ 2025-02-03 12:26 UTC (permalink / raw)
To: Laurent Pinchart, Hans de Goede, Mauro Carvalho Chehab,
Guennadi Liakhovetski
Cc: linux-media, linux-kernel, Mauro Carvalho Chehab, Ricardo Ribalda
It helps will help will the error handling of PM functions.
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
drivers/media/usb/uvc/uvcvideo.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h
index bc87e1f2c669..be0817da538c 100644
--- a/drivers/media/usb/uvc/uvcvideo.h
+++ b/drivers/media/usb/uvc/uvcvideo.h
@@ -763,6 +763,8 @@ void uvc_status_suspend(struct uvc_device *dev);
int uvc_status_get(struct uvc_device *dev);
void uvc_status_put(struct uvc_device *dev);
+DEFINE_GUARD(uvc_status, struct uvc_device *, uvc_status_get(_T), uvc_status_put(_T))
+
/* Controls */
extern const struct v4l2_subscribed_event_ops uvc_ctrl_sub_ev_ops;
--
2.48.1.362.g079036d154-goog
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 4/6] media: uvcvideo: Increase/decrease the PM counter per IOCTL
2025-02-03 12:26 [PATCH v2 0/6] media: uvcvideo: Implement Granular Power Saving Ricardo Ribalda
` (2 preceding siblings ...)
2025-02-03 12:26 ` [PATCH v2 3/6] media: uvcvideo: Add a uvc_status guard Ricardo Ribalda
@ 2025-02-03 12:26 ` Ricardo Ribalda
2025-02-03 23:57 ` kernel test robot
2025-02-03 12:26 ` [PATCH v2 5/6] media: uvcvideo: Make power management granular Ricardo Ribalda
2025-02-03 12:26 ` [PATCH v2 6/6] media: uvcvideo: Do not turn on the camera for some ioctls Ricardo Ribalda
5 siblings, 1 reply; 8+ messages in thread
From: Ricardo Ribalda @ 2025-02-03 12:26 UTC (permalink / raw)
To: Laurent Pinchart, Hans de Goede, Mauro Carvalho Chehab,
Guennadi Liakhovetski
Cc: linux-media, linux-kernel, Mauro Carvalho Chehab, Ricardo Ribalda
Now we call uvc_status_get/put from the device open/close. This low
level of granularity might leave the camera powered on in situations
where it is not needed.
Increase the granularity by increasing and decreasing the Power
Management counter per ioctl. There are two special cases where the
power management outlives the ioctl: async controls and streamon. Handle
those cases as well.
In a future patch, we will remove the uvc_status_get/put from open/close.
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
drivers/media/usb/uvc/uvc_ctrl.c | 13 +++++++++++--
drivers/media/usb/uvc/uvc_v4l2.c | 26 +++++++++++++++++++++++---
2 files changed, 34 insertions(+), 5 deletions(-)
diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c
index 4e58476d305e..97c1141a45b3 100644
--- a/drivers/media/usb/uvc/uvc_ctrl.c
+++ b/drivers/media/usb/uvc/uvc_ctrl.c
@@ -1594,12 +1594,15 @@ static void uvc_ctrl_set_handle(struct uvc_fh *handle, struct uvc_control *ctrl,
if (ctrl->handle) {
WARN_ON(!ctrl->handle->pending_async_ctrls);
- if (ctrl->handle->pending_async_ctrls)
+ if (ctrl->handle->pending_async_ctrls) {
ctrl->handle->pending_async_ctrls--;
+ uvc_status_put(handle->chain->dev);
+ }
}
ctrl->handle = new_handle;
handle->pending_async_ctrls++;
+ uvc_status_get(handle->chain->dev);
return;
}
@@ -1611,6 +1614,7 @@ static void uvc_ctrl_set_handle(struct uvc_fh *handle, struct uvc_control *ctrl,
if (WARN_ON(!handle->pending_async_ctrls))
return;
handle->pending_async_ctrls--;
+ uvc_status_put(handle->chain->dev);
}
void uvc_ctrl_status_event(struct uvc_video_chain *chain,
@@ -2815,6 +2819,7 @@ int uvc_ctrl_init_device(struct uvc_device *dev)
void uvc_ctrl_cleanup_fh(struct uvc_fh *handle)
{
struct uvc_entity *entity;
+ int i;
guard(mutex)(&handle->chain->ctrl_mutex);
@@ -2829,7 +2834,11 @@ void uvc_ctrl_cleanup_fh(struct uvc_fh *handle)
}
}
- WARN_ON(handle->pending_async_ctrls);
+ if (!WARN_ON(handle->pending_async_ctrls))
+ return;
+
+ for (i = 0; i < handle->pending_async_ctrls; i++)
+ uvc_status_put(handle->stream->dev);
}
/*
diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c
index 5d4e967938af..5d6935539e0a 100644
--- a/drivers/media/usb/uvc/uvc_v4l2.c
+++ b/drivers/media/usb/uvc/uvc_v4l2.c
@@ -670,6 +670,9 @@ static int uvc_v4l2_release(struct file *file)
if (uvc_has_privileges(handle))
uvc_queue_release(&stream->queue);
+ if (handle->is_streaming)
+ uvc_status_put(stream->dev);
+
/* Release the file handle. */
uvc_dismiss_privileges(handle);
v4l2_fh_del(&handle->vfh);
@@ -832,8 +835,10 @@ static int uvc_ioctl_streamon(struct file *file, void *fh,
return 0;
ret = uvc_queue_streamon(&stream->queue, type);
- if (!ret)
+ if (!ret) {
handle->is_streaming = true;
+ uvc_status_get(stream->dev);
+ }
return ret;
@@ -851,7 +856,10 @@ static int uvc_ioctl_streamoff(struct file *file, void *fh,
guard(mutex)(&stream->mutex);
uvc_queue_streamoff(&stream->queue, type);
- handle->is_streaming = false;
+ if (handle->is_streaming) {
+ handle->is_streaming = false;
+ uvc_status_put(stream->dev);
+ }
return 0;
}
@@ -1374,6 +1382,16 @@ static int uvc_v4l2_put_xu_query(const struct uvc_xu_control_query *kp,
return 0;
}
+static long uvc_v4l2_video_ioctl2(struct file *file,
+ unsigned int cmd, unsigned long arg)
+{
+ struct uvc_fh *handle = file->private_data;
+
+ guard(uvc_status)(handle->stream->dev);
+
+ return video_ioctl2(file, cmd, arg);
+}
+
#define UVCIOC_CTRL_MAP32 _IOWR('u', 0x20, struct uvc_xu_control_mapping32)
#define UVCIOC_CTRL_QUERY32 _IOWR('u', 0x21, struct uvc_xu_control_query32)
@@ -1388,6 +1406,8 @@ static long uvc_v4l2_compat_ioctl32(struct file *file,
void __user *up = compat_ptr(arg);
long ret;
+ guard(uvc_status)(handle->stream->dev);
+
switch (cmd) {
case UVCIOC_CTRL_MAP32:
ret = uvc_v4l2_get_xu_mapping(&karg.xmap, up);
@@ -1507,7 +1527,7 @@ const struct v4l2_file_operations uvc_fops = {
.owner = THIS_MODULE,
.open = uvc_v4l2_open,
.release = uvc_v4l2_release,
- .unlocked_ioctl = video_ioctl2,
+ .unlocked_ioctl = uvc_v4l2_video_ioctl2,
#ifdef CONFIG_COMPAT
.compat_ioctl32 = uvc_v4l2_compat_ioctl32,
#endif
--
2.48.1.362.g079036d154-goog
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 5/6] media: uvcvideo: Make power management granular
2025-02-03 12:26 [PATCH v2 0/6] media: uvcvideo: Implement Granular Power Saving Ricardo Ribalda
` (3 preceding siblings ...)
2025-02-03 12:26 ` [PATCH v2 4/6] media: uvcvideo: Increase/decrease the PM counter per IOCTL Ricardo Ribalda
@ 2025-02-03 12:26 ` Ricardo Ribalda
2025-02-03 12:26 ` [PATCH v2 6/6] media: uvcvideo: Do not turn on the camera for some ioctls Ricardo Ribalda
5 siblings, 0 replies; 8+ messages in thread
From: Ricardo Ribalda @ 2025-02-03 12:26 UTC (permalink / raw)
To: Laurent Pinchart, Hans de Goede, Mauro Carvalho Chehab,
Guennadi Liakhovetski
Cc: linux-media, linux-kernel, Mauro Carvalho Chehab, Ricardo Ribalda
Now that every ioctl takes care of their power management we can remove
the "global" power management.
Despite its size, this is a relatively big change. We hope that there
are no size effects of it. If there are some specific devices that
miss-behave, we can add a small quirk for them.
This patch introduces a behavioral change for the uvc "trigger" button.
It will not work unless the camera is streaming. We consider that this
the most common (if not the only) usecase and therefore we do not consider
it a regression.
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
drivers/media/usb/uvc/uvc_v4l2.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c
index 5d6935539e0a..90ec6f0015ca 100644
--- a/drivers/media/usb/uvc/uvc_v4l2.c
+++ b/drivers/media/usb/uvc/uvc_v4l2.c
@@ -631,7 +631,6 @@ static int uvc_v4l2_open(struct file *file)
{
struct uvc_streaming *stream;
struct uvc_fh *handle;
- int ret = 0;
stream = video_drvdata(file);
uvc_dbg(stream->dev, CALLS, "%s\n", __func__);
@@ -641,12 +640,6 @@ static int uvc_v4l2_open(struct file *file)
if (!handle)
return -ENOMEM;
- ret = uvc_status_get(stream->dev);
- if (ret) {
- kfree(handle);
- return ret;
- }
-
v4l2_fh_init(&handle->vfh, &stream->vdev);
v4l2_fh_add(&handle->vfh);
handle->chain = stream->chain;
@@ -680,7 +673,6 @@ static int uvc_v4l2_release(struct file *file)
kfree(handle);
file->private_data = NULL;
- uvc_status_put(stream->dev);
return 0;
}
--
2.48.1.362.g079036d154-goog
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 6/6] media: uvcvideo: Do not turn on the camera for some ioctls
2025-02-03 12:26 [PATCH v2 0/6] media: uvcvideo: Implement Granular Power Saving Ricardo Ribalda
` (4 preceding siblings ...)
2025-02-03 12:26 ` [PATCH v2 5/6] media: uvcvideo: Make power management granular Ricardo Ribalda
@ 2025-02-03 12:26 ` Ricardo Ribalda
5 siblings, 0 replies; 8+ messages in thread
From: Ricardo Ribalda @ 2025-02-03 12:26 UTC (permalink / raw)
To: Laurent Pinchart, Hans de Goede, Mauro Carvalho Chehab,
Guennadi Liakhovetski
Cc: linux-media, linux-kernel, Mauro Carvalho Chehab, Ricardo Ribalda
There are some ioctls that do not need to turn on the camera. Do not
call uvc_status_get in those cases.
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
drivers/media/usb/uvc/uvc_v4l2.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c
index 90ec6f0015ca..121a582c7945 100644
--- a/drivers/media/usb/uvc/uvc_v4l2.c
+++ b/drivers/media/usb/uvc/uvc_v4l2.c
@@ -1379,6 +1379,26 @@ static long uvc_v4l2_video_ioctl2(struct file *file,
{
struct uvc_fh *handle = file->private_data;
+ /* The following IOCTLs do not need to turn on the camera. */
+ switch (cmd) {
+ case VIDIOC_CREATE_BUFS:
+ case VIDIOC_DQBUF:
+ case VIDIOC_ENUM_FMT:
+ case VIDIOC_ENUM_FRAMEINTERVALS:
+ case VIDIOC_ENUM_FRAMESIZES:
+ case VIDIOC_ENUMINPUT:
+ case VIDIOC_EXPBUF:
+ case VIDIOC_G_FMT:
+ case VIDIOC_G_PARM:
+ case VIDIOC_G_SELECTION:
+ case VIDIOC_QBUF:
+ case VIDIOC_QUERYCAP:
+ case VIDIOC_REQBUFS:
+ case VIDIOC_SUBSCRIBE_EVENT:
+ case VIDIOC_UNSUBSCRIBE_EVENT:
+ return video_ioctl2(file, cmd, arg);
+ }
+
guard(uvc_status)(handle->stream->dev);
return video_ioctl2(file, cmd, arg);
--
2.48.1.362.g079036d154-goog
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2 4/6] media: uvcvideo: Increase/decrease the PM counter per IOCTL
2025-02-03 12:26 ` [PATCH v2 4/6] media: uvcvideo: Increase/decrease the PM counter per IOCTL Ricardo Ribalda
@ 2025-02-03 23:57 ` kernel test robot
0 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2025-02-03 23:57 UTC (permalink / raw)
To: Ricardo Ribalda, Laurent Pinchart, Hans de Goede,
Mauro Carvalho Chehab, Guennadi Liakhovetski
Cc: oe-kbuild-all, linux-media, linux-kernel, Ricardo Ribalda
Hi Ricardo,
kernel test robot noticed the following build errors:
[auto build test ERROR on 2014c95afecee3e76ca4a56956a936e23283f05b]
url: https://github.com/intel-lab-lkp/linux/commits/Ricardo-Ribalda/media-uvcvideo-Keep-streaming-state-in-the-file-handle/20250203-203055
base: 2014c95afecee3e76ca4a56956a936e23283f05b
patch link: https://lore.kernel.org/r/20250203-uvc-granpower-ng-v2-4-bef4b55e7b67%40chromium.org
patch subject: [PATCH v2 4/6] media: uvcvideo: Increase/decrease the PM counter per IOCTL
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20250204/202502040757.Rn9RKQjR-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250204/202502040757.Rn9RKQjR-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202502040757.Rn9RKQjR-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/media/usb/uvc/uvc_v4l2.c:1530:27: error: 'uvc_v4l2_video_ioctl2' undeclared here (not in a function)
1530 | .unlocked_ioctl = uvc_v4l2_video_ioctl2,
| ^~~~~~~~~~~~~~~~~~~~~
vim +/uvc_v4l2_video_ioctl2 +1530 drivers/media/usb/uvc/uvc_v4l2.c
1525
1526 const struct v4l2_file_operations uvc_fops = {
1527 .owner = THIS_MODULE,
1528 .open = uvc_v4l2_open,
1529 .release = uvc_v4l2_release,
> 1530 .unlocked_ioctl = uvc_v4l2_video_ioctl2,
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-02-03 23:58 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-03 12:26 [PATCH v2 0/6] media: uvcvideo: Implement Granular Power Saving Ricardo Ribalda
2025-02-03 12:26 ` [PATCH v2 1/6] media: uvcvideo: Keep streaming state in the file handle Ricardo Ribalda
2025-02-03 12:26 ` [PATCH v2 2/6] media: uvcvideo: Move usb_autopm_(get|put)_interface to status_get Ricardo Ribalda
2025-02-03 12:26 ` [PATCH v2 3/6] media: uvcvideo: Add a uvc_status guard Ricardo Ribalda
2025-02-03 12:26 ` [PATCH v2 4/6] media: uvcvideo: Increase/decrease the PM counter per IOCTL Ricardo Ribalda
2025-02-03 23:57 ` kernel test robot
2025-02-03 12:26 ` [PATCH v2 5/6] media: uvcvideo: Make power management granular Ricardo Ribalda
2025-02-03 12:26 ` [PATCH v2 6/6] media: uvcvideo: Do not turn on the camera for some ioctls Ricardo Ribalda
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox