summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.com>2025-04-10 23:43:47 +0300
committerHans Verkuil <hverkuil@xs4all.nl>2025-05-09 12:55:07 +0300
commit57c8d79adf05244b171964d1d6c7e6fabbe5f5fd (patch)
treef708e716a12a3dc62e59969f7c6c29b3d8977b28
parent0400bee67f49753b878c2576c02c1bc454f091ed (diff)
downloadlinux-57c8d79adf05244b171964d1d6c7e6fabbe5f5fd.tar.xz
media: synopsys: hdmirx: Count dropped frames
The sequence number communicate the lost frames to userspace. For this reason, it must be incremented even when a frame is skipped. This allows userspace such as GStreamer to report the loss. Fixes: 7b59b132ad439 ("media: platform: synopsys: Add support for HDMI input driver") Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
-rw-r--r--drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c b/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c
index f5b3f5010ede..7af6765532e3 100644
--- a/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c
+++ b/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c
@@ -1956,10 +1956,6 @@ static void dma_idle_int_handler(struct snps_hdmirx_dev *hdmirx_dev,
vb_done->field = V4L2_FIELD_NONE;
hdmirx_vb_done(stream, vb_done);
- stream->sequence++;
- if (stream->sequence == 30)
- v4l2_dbg(1, debug, v4l2_dev,
- "rcv frames\n");
}
stream->curr_buf = NULL;
@@ -1971,6 +1967,10 @@ static void dma_idle_int_handler(struct snps_hdmirx_dev *hdmirx_dev,
v4l2_dbg(3, debug, v4l2_dev,
"%s: next_buf NULL, skip vb_done\n", __func__);
}
+
+ stream->sequence++;
+ if (stream->sequence == 30)
+ v4l2_dbg(1, debug, v4l2_dev, "rcv frames\n");
}
DMA_IDLE_OUT: