Linux-Amlogic Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] media: meson: vdec: don't resume instantly if not streaming capture
@ 2020-01-24 15:56 Maxime Jourdan
  2020-02-06  7:59 ` Neil Armstrong
  0 siblings, 1 reply; 2+ messages in thread
From: Maxime Jourdan @ 2020-01-24 15:56 UTC (permalink / raw)
  To: mchehab, hans.verkuil
  Cc: Maxime Jourdan, Neil Armstrong, linux-kernel, linux-amlogic,
	linux-arm-kernel, linux-media

In case userspace configured the capture queue before the source change
event, do not resume decoding instantly if it wasn't streamed on yet.

Signed-off-by: Maxime Jourdan <mjourdan@baylibre.com>
---

Note: this patch is based off Neil's series:
[v4,0/4] media: meson: vdec: Add compliant H264 support

 drivers/staging/media/meson/vdec/vdec_helpers.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/media/meson/vdec/vdec_helpers.c b/drivers/staging/media/meson/vdec/vdec_helpers.c
index ff4333074197..a4970ec1bf2e 100644
--- a/drivers/staging/media/meson/vdec/vdec_helpers.c
+++ b/drivers/staging/media/meson/vdec/vdec_helpers.c
@@ -417,7 +417,8 @@ void amvdec_src_change(struct amvdec_session *sess, u32 width,
 	 * Check if the capture queue is already configured well for our
 	 * usecase. If so, keep decoding with it and do not send the event
 	 */
-	if (sess->width == width &&
+	if (sess->streamon_cap &&
+	    sess->width == width &&
 	    sess->height == height &&
 	    dpb_size <= sess->num_dst_bufs) {
 		sess->fmt_out->codec_ops->resume(sess);
--
2.20.1

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] media: meson: vdec: don't resume instantly if not streaming capture
  2020-01-24 15:56 [PATCH] media: meson: vdec: don't resume instantly if not streaming capture Maxime Jourdan
@ 2020-02-06  7:59 ` Neil Armstrong
  0 siblings, 0 replies; 2+ messages in thread
From: Neil Armstrong @ 2020-02-06  7:59 UTC (permalink / raw)
  To: Maxime Jourdan, mchehab, hans.verkuil
  Cc: linux-amlogic, linux-kernel, linux-arm-kernel, linux-media

On 24/01/2020 16:56, Maxime Jourdan wrote:
> In case userspace configured the capture queue before the source change
> event, do not resume decoding instantly if it wasn't streamed on yet.
> 
> Signed-off-by: Maxime Jourdan <mjourdan@baylibre.com>
> ---
> 
> Note: this patch is based off Neil's series:
> [v4,0/4] media: meson: vdec: Add compliant H264 support
> 
>  drivers/staging/media/meson/vdec/vdec_helpers.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/media/meson/vdec/vdec_helpers.c b/drivers/staging/media/meson/vdec/vdec_helpers.c
> index ff4333074197..a4970ec1bf2e 100644
> --- a/drivers/staging/media/meson/vdec/vdec_helpers.c
> +++ b/drivers/staging/media/meson/vdec/vdec_helpers.c
> @@ -417,7 +417,8 @@ void amvdec_src_change(struct amvdec_session *sess, u32 width,
>  	 * Check if the capture queue is already configured well for our
>  	 * usecase. If so, keep decoding with it and do not send the event
>  	 */
> -	if (sess->width == width &&
> +	if (sess->streamon_cap &&
> +	    sess->width == width &&
>  	    sess->height == height &&
>  	    dpb_size <= sess->num_dst_bufs) {
>  		sess->fmt_out->codec_ops->resume(sess);
> --
> 2.20.1
> 

Will squash into v5 of "media: meson: vdec: Add compliant H264 support"

Thanks,
Neil

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-24 15:56 [PATCH] media: meson: vdec: don't resume instantly if not streaming capture Maxime Jourdan
2020-02-06  7:59 ` Neil Armstrong

Linux-Amlogic Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-amlogic/0 linux-amlogic/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-amlogic linux-amlogic/ https://lore.kernel.org/linux-amlogic \
		linux-amlogic@lists.infradead.org
	public-inbox-index linux-amlogic

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-amlogic


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git