mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
Camera: fix kernel warning after VI timeout
VI return timeout status when no frames are received from camera sensor. During the error recovery, the v4l2 buffers are set to VB2_BUF_STATE_ERROR, this causes kernel warning. As per the v4l2 framework correct buffer state for timeout is VB2_BUF_STATE_QUEUED. Bug 5512645 Change-Id: Iafc720b1ba74f04490d7d14e2e9014bd599b3cba Signed-off-by: Ankur Pawar <ankurp@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3462547 Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: svcacv <svcacv@nvidia.com> GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
d6685995db
commit
1d659b240c
@@ -594,10 +594,14 @@ static void vi5_capture_dequeue(struct tegra_channel *chan,
|
||||
|
||||
uncorr_err:
|
||||
spin_lock_irqsave(&chan->capture_state_lock, flags);
|
||||
if (err == -ETIMEDOUT) {
|
||||
chan->capture_state = CAPTURE_TIMEOUT;
|
||||
buf->vb2_state = VB2_BUF_STATE_QUEUED;
|
||||
} else {
|
||||
chan->capture_state = CAPTURE_ERROR;
|
||||
spin_unlock_irqrestore(&chan->capture_state_lock, flags);
|
||||
|
||||
buf->vb2_state = VB2_BUF_STATE_ERROR;
|
||||
}
|
||||
spin_unlock_irqrestore(&chan->capture_state_lock, flags);
|
||||
|
||||
rel_buf:
|
||||
vi5_release_buffer(chan, buf);
|
||||
@@ -659,6 +663,9 @@ static int vi5_channel_error_recover(struct tegra_channel *chan,
|
||||
buf = dequeue_dequeue_buffer(chan);
|
||||
if (!buf)
|
||||
break;
|
||||
if (chan->capture_state == CAPTURE_TIMEOUT)
|
||||
buf->vb2_state = VB2_BUF_STATE_QUEUED;
|
||||
else
|
||||
buf->vb2_state = VB2_BUF_STATE_ERROR;
|
||||
vi5_capture_dequeue(chan, buf);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user