linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/3] add debug capabilities to v4l2 encoder for STMicroelectronics SOC
@ 2016-11-28 10:30 Jean-Christophe Trotin
  2016-11-28 10:30 ` [PATCH v3 1/3] st-hva: encoding summary at instance release Jean-Christophe Trotin
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Jean-Christophe Trotin @ 2016-11-28 10:30 UTC (permalink / raw)
  To: linux-media, Hans Verkuil
  Cc: kernel, Benjamin Gaignard, Yannick Fertre, Hugues Fruchet,
	Jean-Christophe Trotin

version 3:
- the encoding summary (first patch) is moved from hva-debug.c to hva-v4l2.c.
  As suggested by Hans, dev_info() is used instead of snprintf() in the
  hva_dbg_summary() function.

- About the debugfs entries for HVA (second patch), a driver-specific Kconfig
  option (VIDEO_STI_HVA_DEBUGFS) is added as suggested by Hans. This option
  depends both on VIDEO_STI_HVA and on DEBUG_FS.

- The third (new) patch enables STMicroelectronics HVA debugfs in
  multi_v7_defconfig (VIDEO_STI_HVA_DEBUGFS).

version 2:
- the encoding summary (first patch) doesn't include any longer information
  about the encoding performance. Thus, after each frame encoding, only one or
  two variables are increased (number of encoded frames, number of encoding
  errors), but no computation is executed (as it was in version 1). When the
  encoding instance is closed, the short summary that is printed (dev_info),
  also doesn't require any computation, and gives a useful brief status about
  the last operation: that are the reasons why there's no Kconfig option to
  explicitly enable this summary.

- the second patch enables the computation of the performances (hva_dbg_perf_begin
  and hva_dbg_perf_end) only if DEBUG_FS is enabled. The functions that
  create or remove the debugfs entries (hva_debugfs_create,
  hva_debugfs_remove, hva_dbg_ctx_create, hva_dbg_ctx_remove) are not under
  CONFIG_DEBUG_FS switch: if DEBUG_FS is disabled, the debugfs functions
  (debugfs_create_dir and debugfs_create_file) are available, but no entry is
  created. The "show" operations (hva_dbg_device, hva_dbg_encoders,
  hva_dbg_last, hva_dbg_regs, hva_dbg_ctx) are also not under
  CONFIG_DEBUG_FS switch: if DEBUG_FS is disabled, they will never be called.
  So, with this version 2, no new Kconfig option is introduced, but the
  performance computations and the debugfs entries depend on whether DEBUG_FS
  is enabled or not.

version 1:
- Initial submission

With the first patch, a short summary about the encoding operation is
unconditionnaly printed at each instance closing:
- information about the frame (format, resolution)
- information about the stream (format, profile, level, resolution)
- number of encoded frames
- potential (system, encoding...) errors

With the second patch, 4 static debugfs entries are created to dump:
- the device-related information ("st-hva/device")
- the list of registered encoders ("st-hva/encoders")
- the current values of the hva registers ("st-hva/regs")
- the information about the last closed instance ("st-hva/last")

Moreover, a debugfs entry is dynamically created for each opened instance,
("st-hva/<instance identifier>") to dump:
 - the information about the frame (format, resolution)
- the information about the stream (format, profile, level,
  resolution)
- the control parameters (bitrate mode, framerate, GOP size...)
- the potential (system, encoding...) errors
- the performance information about the encoding (HW processing
  duration, average bitrate, average framerate...)
Each time a running instance is closed, its context (including the debug
information) is saved to feed, on demand, the last closed instance debugfs
entry.

These debug capabilities are mainly implemented in the hva-debugfs.c file.

Jean-Christophe Trotin (3):
  st-hva: encoding summary at instance release
  st-hva: add debug file system
  ARM: multi_v7_defconfig: enable STMicroelectronics HVA debugfs

 arch/arm/configs/multi_v7_defconfig          |   1 +
 drivers/media/platform/Kconfig               |  11 +
 drivers/media/platform/sti/hva/Makefile      |   1 +
 drivers/media/platform/sti/hva/hva-debugfs.c | 422 +++++++++++++++++++++++++++
 drivers/media/platform/sti/hva/hva-h264.c    |   6 +
 drivers/media/platform/sti/hva/hva-hw.c      |  48 +++
 drivers/media/platform/sti/hva/hva-hw.h      |   3 +
 drivers/media/platform/sti/hva/hva-mem.c     |   5 +-
 drivers/media/platform/sti/hva/hva-v4l2.c    |  78 ++++-
 drivers/media/platform/sti/hva/hva.h         |  96 +++++-
 10 files changed, 657 insertions(+), 14 deletions(-)
 create mode 100644 drivers/media/platform/sti/hva/hva-debugfs.c

-- 
1.9.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-01-31 13:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-28 10:30 [PATCH v3 0/3] add debug capabilities to v4l2 encoder for STMicroelectronics SOC Jean-Christophe Trotin
2016-11-28 10:30 ` [PATCH v3 1/3] st-hva: encoding summary at instance release Jean-Christophe Trotin
2017-01-30 17:28   ` Mauro Carvalho Chehab
2017-01-31  8:50     ` Jean Christophe TROTIN
2017-01-31 13:48       ` Mauro Carvalho Chehab
2016-11-28 10:30 ` [PATCH v3 2/3] st-hva: add debug file system Jean-Christophe Trotin
2016-11-28 10:30 ` [PATCH v3 3/3] ARM: multi_v7_defconfig: enable STMicroelectronics HVA debugfs Jean-Christophe Trotin
2016-12-05 12:32   ` Hans Verkuil
2016-12-08 10:30     ` Jean Christophe TROTIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).