media: coda: Add a V4L2 user for control error macroblocks count
authorEzequiel Garcia <ezequiel@collabora.com>
Wed, 4 Nov 2020 17:43:11 +0000 (18:43 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 16 Nov 2020 09:31:16 +0000 (10:31 +0100)
commitb2d3bef1aa7858b2ae5e0d01adb214121ba00b9f
tree1fbdb512350bdaed497ba1938f58dfef76886ea8
parent8297ae5c29fc715d1da2e057852053dd900c99a6
media: coda: Add a V4L2 user for control error macroblocks count

To avoid potentially overflowing the kernel logs in the case
of corrupted streams, this commit replaces an error message with
a per-stream counter to be read through a driver-specific
control.

Applications can read the per-stream accumulated
error macroblocks count.

The old error message is replaced by a rate-limited debug message.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/coda/coda-bit.c
drivers/media/platform/coda/coda-common.c
drivers/media/platform/coda/coda.h
include/uapi/linux/v4l2-controls.h