diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2018-11-05 16:25:12 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-11-23 11:36:07 +0100 |
commit | 8f90d15e6d5471bde75e77dbd415b27907bd56bd (patch) | |
tree | 02ac027d6281002f8886e8b82316c13f86e5d726 /drivers/media/platform/coda/coda.h | |
parent | media: coda: improve queue busy error message (diff) | |
download | linux-8f90d15e6d5471bde75e77dbd415b27907bd56bd.tar.xz linux-8f90d15e6d5471bde75e77dbd415b27907bd56bd.zip |
media: coda: normalise debug output
Consistently add the context index to debug output, which otherwise is
impossible to make sense of when two contexts are running concurrently.
For this purpose, add a convenience macro coda_dbg(). Use the function
name with the coda_ prefix stripped as keyword where applicable, and
consistently use vid-out and vid-cap names for the queues. Add sequence
counters to the decoder job finished message and correctly indicate B
frames. Add a start streaming message to complement the stop streaming
message and a start encoding message to complement the existing start
decoding message.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to '')
-rw-r--r-- | drivers/media/platform/coda/coda.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/media/platform/coda/coda.h b/drivers/media/platform/coda/coda.h index 7fd0157c759a..22f6efaf9510 100644 --- a/drivers/media/platform/coda/coda.h +++ b/drivers/media/platform/coda/coda.h @@ -252,6 +252,13 @@ struct coda_ctx { extern int coda_debug; +#define coda_dbg(level, ctx, fmt, arg...) \ + do { \ + if (coda_debug >= (level)) \ + v4l2_dbg((level), coda_debug, &(ctx)->dev->v4l2_dev, \ + "%u: " fmt, (ctx)->idx, ##arg); \ + } while (0) + void coda_write(struct coda_dev *dev, u32 data, u32 reg); unsigned int coda_read(struct coda_dev *dev, u32 reg); void coda_write_base(struct coda_ctx *ctx, struct coda_q_data *q_data, |