From 4b3dddc90a8748bfb3e2fbc76b2b86b5b854f3dc Mon Sep 17 00:00:00 2001 From: Ankur Pawar Date: Mon, 27 Jan 2025 03:12:17 -0800 Subject: [PATCH] camera: vi5: scheduling while atomic bug fix "scheduling while atomic" bug is causing v4l2-test-app Latency*StreamMmap test to fail. This is seen because wait_event_interruptible is called inside spin_lock. This was introduced in below gerrit. https://git-master.nvidia.com/r/3262275 Bug 4449673 Jira L4T-6439 Change-Id: I9ffc65c95bbfce0907d1174639d0ec4a6cbd691a Signed-off-by: Ankur Pawar Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3291319 Reviewed-by: Bitan Biswas GVS: buildbot_gerritrpt --- drivers/media/platform/tegra/camera/vi/vi5_fops.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/media/platform/tegra/camera/vi/vi5_fops.c b/drivers/media/platform/tegra/camera/vi/vi5_fops.c index 6e974dc7..f7b9c6b8 100644 --- a/drivers/media/platform/tegra/camera/vi/vi5_fops.c +++ b/drivers/media/platform/tegra/camera/vi/vi5_fops.c @@ -762,12 +762,10 @@ static int tegra_channel_kthread_capture_dequeue(void *data) while (1) { try_to_freeze(); - spin_lock_irqsave(&chan->capture_state_lock, flags); wait_event_interruptible(chan->dequeue_wait, (kthread_should_stop() || !list_empty(&chan->dequeue) || (chan->capture_state == CAPTURE_ERROR))); - spin_unlock_irqrestore(&chan->capture_state_lock, flags); while (!(kthread_should_stop() || list_empty(&chan->dequeue) || (chan->capture_state == CAPTURE_ERROR))) {