Skip to content

Commit 683b4db

Browse files
committed
media: uvcvideo: Flush the control cache when we get an event
jira LE-3622 Rebuild_History Non-Buildable kernel-6.12.0-55.22.1.el10_0 commit-author Ricardo Ribalda <ribalda@chromium.org> commit d6b874f Asynchronous controls trigger an event when they have completed their operation. This can make that the control cached value does not match the value in the device. Let's flush the cache to be on the safe side. Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://lore.kernel.org/r/20241203-uvc-fix-async-v6-5-26c867231118@chromium.org Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> (cherry picked from commit d6b874f) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent f88ae5c commit 683b4db

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/media/usb/uvc/uvc_ctrl.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1622,6 +1622,9 @@ void uvc_ctrl_status_event(struct uvc_video_chain *chain,
16221622

16231623
mutex_lock(&chain->ctrl_mutex);
16241624

1625+
/* Flush the control cache, the data might have changed. */
1626+
ctrl->loaded = 0;
1627+
16251628
handle = ctrl->handle;
16261629
if (handle)
16271630
uvc_ctrl_set_handle(handle, ctrl, NULL);

0 commit comments

Comments
 (0)