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/+/3463848 Tested-by: Jerry Chang <jerchang@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Jerry Chang <jerchang@nvidia.com> GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com> Reviewed-by: svcacv <svcacv@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
76bdc9f5b6
commit
9ee2b01686
@@ -617,10 +617,14 @@ static void vi5_capture_dequeue(struct tegra_channel *chan,
|
|||||||
|
|
||||||
uncorr_err:
|
uncorr_err:
|
||||||
spin_lock_irqsave(&chan->capture_state_lock, flags);
|
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;
|
chan->capture_state = CAPTURE_ERROR;
|
||||||
spin_unlock_irqrestore(&chan->capture_state_lock, flags);
|
|
||||||
|
|
||||||
buf->vb2_state = VB2_BUF_STATE_ERROR;
|
buf->vb2_state = VB2_BUF_STATE_ERROR;
|
||||||
|
}
|
||||||
|
spin_unlock_irqrestore(&chan->capture_state_lock, flags);
|
||||||
|
|
||||||
rel_buf:
|
rel_buf:
|
||||||
vi5_release_buffer(chan, buf);
|
vi5_release_buffer(chan, buf);
|
||||||
@@ -683,6 +687,9 @@ static int vi5_channel_error_recover(struct tegra_channel *chan,
|
|||||||
buf = dequeue_dequeue_buffer(chan);
|
buf = dequeue_dequeue_buffer(chan);
|
||||||
if (!buf)
|
if (!buf)
|
||||||
break;
|
break;
|
||||||
|
if (chan->capture_state == CAPTURE_TIMEOUT)
|
||||||
|
buf->vb2_state = VB2_BUF_STATE_QUEUED;
|
||||||
|
else
|
||||||
buf->vb2_state = VB2_BUF_STATE_ERROR;
|
buf->vb2_state = VB2_BUF_STATE_ERROR;
|
||||||
vi5_capture_dequeue(chan, buf);
|
vi5_capture_dequeue(chan, buf);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user