mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
media: staging: rkisp1: isp: add a warning and debugfs var for irq delay
The signal RKISP1_CIF_ISP_FRAME is set when the ISP completes outputting the frame to the next block in the pipeline. In order to keep buffer synchronization we assume that the RKISP1_CIF_ISP_V_START signal never arrives together with the RKISP1_CIF_ISP_FRAME signal. In case those signals arrive together then the code is not able to tell if the RKISP1_CIF_ISP_FRAME signal relates to the frame of the current v-start or the previous. This patch adds a WARN_ONCE and a debugfs var to catch it. Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
21f4417263
commit
8524fa22fd
@@ -326,6 +326,7 @@ struct rkisp1_debug {
|
|||||||
unsigned long outform_size_error;
|
unsigned long outform_size_error;
|
||||||
unsigned long img_stabilization_size_error;
|
unsigned long img_stabilization_size_error;
|
||||||
unsigned long inform_size_error;
|
unsigned long inform_size_error;
|
||||||
|
unsigned long irq_delay;
|
||||||
unsigned long mipi_error;
|
unsigned long mipi_error;
|
||||||
unsigned long stats_error;
|
unsigned long stats_error;
|
||||||
unsigned long stop_timeout[2];
|
unsigned long stop_timeout[2];
|
||||||
|
|||||||
@@ -444,6 +444,8 @@ static void rkisp1_debug_init(struct rkisp1_device *rkisp1)
|
|||||||
&debug->img_stabilization_size_error);
|
&debug->img_stabilization_size_error);
|
||||||
debugfs_create_ulong("inform_size_error", 0444, debug->debugfs_dir,
|
debugfs_create_ulong("inform_size_error", 0444, debug->debugfs_dir,
|
||||||
&debug->inform_size_error);
|
&debug->inform_size_error);
|
||||||
|
debugfs_create_ulong("irq_delay", 0444, debug->debugfs_dir,
|
||||||
|
&debug->irq_delay);
|
||||||
debugfs_create_ulong("mipi_error", 0444, debug->debugfs_dir,
|
debugfs_create_ulong("mipi_error", 0444, debug->debugfs_dir,
|
||||||
&debug->mipi_error);
|
&debug->mipi_error);
|
||||||
debugfs_create_ulong("stats_error", 0444, debug->debugfs_dir,
|
debugfs_create_ulong("stats_error", 0444, debug->debugfs_dir,
|
||||||
|
|||||||
@@ -1123,6 +1123,10 @@ void rkisp1_isp_isr(struct rkisp1_device *rkisp1)
|
|||||||
if (status & RKISP1_CIF_ISP_V_START) {
|
if (status & RKISP1_CIF_ISP_V_START) {
|
||||||
rkisp1->isp.frame_sequence++;
|
rkisp1->isp.frame_sequence++;
|
||||||
rkisp1_isp_queue_event_sof(&rkisp1->isp);
|
rkisp1_isp_queue_event_sof(&rkisp1->isp);
|
||||||
|
if (status & RKISP1_CIF_ISP_FRAME) {
|
||||||
|
WARN_ONCE(1, "irq delay is too long, buffers might not be in sync\n");
|
||||||
|
rkisp1->debug.irq_delay++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (status & RKISP1_CIF_ISP_PIC_SIZE_ERROR) {
|
if (status & RKISP1_CIF_ISP_PIC_SIZE_ERROR) {
|
||||||
/* Clear pic_size_error */
|
/* Clear pic_size_error */
|
||||||
|
|||||||
Reference in New Issue
Block a user