Skip to contentSkip to conversation

media: meson: vdec: don't resume instantly if not streaming capture

PATCH In review Maxime Jourdan 2 participants 2 messages Jan 24, 2020 – Feb 6, 2020

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: meson: vdec: don't resume instantly if not streaming capture

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

---

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(-)
drivers/staging/media/meson/vdec/vdec_helpers.c +2 -1
index ff4333074197..a4970ec1bf2e 100644
@@ -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

#1 lore raw
Quoted 27 lines · Maxime Jourdan

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

---

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(-)
drivers/staging/media/meson/vdec/vdec_helpers.c +2 -2
index ff4333074197..a4970ec1bf2e 100644
@@ -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);
--
Quoted 2 lines

2.20.1

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

Thanks,
Neil