Skip to content

CODA timeout fix & assorted changes

Ezequiel Garcia linux-media 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest6 patches 8 repliesIn review
  2. v16 patches 6 repliesSuperseded

Changes in v2 from the cover letter

* Keep the error MB message, but move it to coda_dbg(1, ctx).
* Add per-device rate limitting for the error MB message.
* Rename V4L2_CID_CODA_ERR_MB description.
* s/__coda_decoder_drop_used_metas/coda_decoder_drop_used_metas

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6coda: Remove redundant ctx->initialized settingdrivers/media/platform/coda/coda-bit.c+2 -100 replies
2/6coda: Simplify H.264 small buffer padding logicdrivers/media/platform/coda/coda-bit.c+4 -50 replies
3/6coda: Clarify device registered logdrivers/media/platform/coda/coda-common.c+5 -60 replies
4/6coda: Clarify interrupt registered namedrivers/media/platform/coda/coda-common.c+2 -20 replies
5/6coda: coda_buffer_meta housekeeping fixdrivers/media/platform/coda/coda-bit.c drivers/media/platform/coda/coda.h+39 -40 replies
6/6coda: Add a V4L2 user for control error macroblocks countMAINTAINERS drivers/media/platform/coda/coda-bit.c drivers/media/platform/coda/coda-common.c +3 more+70 -31 reply

Reviews trailers per patch

5 of 6 patches have a Reviewed-by or Acked-by.

PatchPhilipp Zabel
1/6R-b
2/6R-b
3/6A-b
4/6A-b
5/6R-b
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/6] CODA timeout fix & assorted changes

Hi all,

The main motivation for this series is to address a PIC_RUN timeout, which we managed to link with a hardware bitstream buffer underrun condition.

Upon further investigation we discovered that the underrun was produced by a subtle issue in the way buffer_meta's were being tracked.

The issue is fixed by patch "5/6 coda: coda_buffer_meta housekeeping fix".

Patches 1 to 4 are mostly cleanups and minor cosmetic changes.

Finally, while testing with corrupted bitstreams we realized the driver was logging too verbosely, so patch 6 addresses this by introducing a private control to read an macroblock-error counter.

These patches have been tested against media's upstream and v5.4-based, on i.MX6 (Wandboard) with H.264 and MPEG-2 streams.

In particular, this series manages to fix the PIC_RUN timeout reported by Benjamin Bara [1].

I believe this timeout can be systematically reproduced with a video containing small black frames, which can be generated with:

gst-launch-1.0 videotestsrc pattern=black num-buffers=300 ! \
video/x-raw,format=I420,width=176,height=120 ! avenc_mpeg2video ! \
mpegvideoparse ! mpegtsmux ! filesink location=black-qcif-10s.ts

Reviews and feedback are appreciated, as always.

[1] https://lkml.org/lkml/2020/8/21/495

Changelog
---------

v2:
* Keep the error MB message, but move it to coda_dbg(1, ctx).
* Add per-device rate limitting for the error MB message.
* Rename V4L2_CID_CODA_ERR_MB description.
* s/__coda_decoder_drop_used_metas/coda_decoder_drop_used_metas

Ezequiel Garcia (6):
coda: Remove redundant ctx->initialized setting
coda: Simplify H.264 small buffer padding logic
coda: Clarify device registered log
coda: Clarify interrupt registered name
coda: coda_buffer_meta housekeeping fix
coda: Add a V4L2 user for control error macroblocks count

 MAINTAINERS                               |  1 +
 drivers/media/platform/coda/coda-bit.c    | 72 ++++++++++++++++-------
 drivers/media/platform/coda/coda-common.c | 57 +++++++++++++++---
 drivers/media/platform/coda/coda.h        |  5 ++
 include/media/drv-intf/coda.h             | 13 ++++
 include/uapi/linux/v4l2-controls.h        |  4 ++
 6 files changed, 122 insertions(+), 30 deletions(-)
 create mode 100644 include/media/drv-intf/coda.h
Signature · 1 line
2.27.0