public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Osipenko <dmitry.osipenko@collabora.com>
To: Nicolas Dufresne <nicolas.dufresne@collabora.com>,
	Shreeya Patel <shreeya.patel@collabora.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Hans Verkuil <hverkuil@xs4all.nl>,
	Dingxian Wen <shawn.wen@rock-chips.com>
Cc: linux-media@vger.kernel.org, kernel@collabora.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] media: synopsys: hdmirx: Count dropped frames
Date: Fri, 11 Apr 2025 04:13:34 +0300	[thread overview]
Message-ID: <1ca0fceb-ebca-45fb-8733-0018843b8075@collabora.com> (raw)
In-Reply-To: <20250410-rk3588-hdmirx-sequence-v1-2-aad3f216d351@collabora.com>

10.04.2025 23:43, Nicolas Dufresne пишет:
> 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>
> ---
>  drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c | 8 ++++----
>  1 file 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 f5b3f5010ede55bde28756da326a434cc9245492..7af6765532e33239f4260b29ea82b31494b66213 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:
> 

Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>

-- 
Best regards,
Dmitry

      reply	other threads:[~2025-04-11  1:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-10 20:43 [PATCH 0/2] media: synopsys: hdmirx: Report frame drops Nicolas Dufresne
2025-04-10 20:43 ` [PATCH 1/2] media: synopsys: hdmirx: Renamed frame_idx to sequence Nicolas Dufresne
2025-04-11  1:13   ` Dmitry Osipenko
2025-04-10 20:43 ` [PATCH 2/2] media: synopsys: hdmirx: Count dropped frames Nicolas Dufresne
2025-04-11  1:13   ` Dmitry Osipenko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1ca0fceb-ebca-45fb-8733-0018843b8075@collabora.com \
    --to=dmitry.osipenko@collabora.com \
    --cc=hverkuil@xs4all.nl \
    --cc=kernel@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=nicolas.dufresne@collabora.com \
    --cc=shawn.wen@rock-chips.com \
    --cc=shreeya.patel@collabora.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox