mbox

[v2,0/6] CODA timeout fix & assorted changes

Message ID 20201007103544.22807-1-ezequiel@collabora.com (mailing list archive)
Headers

Message

Ezequiel Garcia Oct. 7, 2020, 10:35 a.m. UTC
  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