mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Improvement around mtk_vcodec_mem_free() logging and usage
@ 2023-12-21  9:17 Fei Shao
  2023-12-21  9:17 ` [PATCH v2 1/4] media: mediatek: vcodec: Replace dev_name in error string Fei Shao
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Fei Shao @ 2023-12-21  9:17 UTC (permalink / raw)
  To: Hans Verkuil, AngeloGioacchino Del Regno
  Cc: Fei Shao, Andrew-CT Chen, Matthias Brugger,
	Mauro Carvalho Chehab, Nicolas Dufresne, Tiffany Lin,
	Xiaoyong Lu, Yunfei Dong, linux-arm-kernel, linux-kernel,
	linux-media, linux-mediatek

Hi,

This series includes some improvements around mtk_vcodec_mem_free() in
mtk_vcodec_util.c.

I noticed that mtk_vcodec_mem_free() generates a spurious error if the
target DMA buffer has been freed previously:
  mtk_vcodec_mem_free(),69: [MTK_V4L2][ERROR] 18000000.video-codec
  dma_free size=0 failed!

The warning is harmless, but it brings some confusion to our developers
and testing infra, so I sent this series to fix that with some minor
improvement for the driver alongside.

The first two patches are for aesthetic and style improvements, the
third tries to make the error logs more informative, and the last adds
back the missing checks when calling the free function.

Regards,
Fei

v1: https://lore.kernel.org/all/20231113123049.4117280-1-fshao@chromium.org/

Changes in v2:
- rebased on top of next-20231219
- revise commit message for clearer intention and rationale
- update the error messages based on the suggestion

Fei Shao (4):
  media: mediatek: vcodec: Replace dev_name in error string
  media: mediatek: vcodec: Drop unnecessary variable
  media: mediatek: vcodec: Update mtk_vcodec_mem_free() error messages
  media: mediatek: vcodec: Only free buffer VA that is not NULL

 .../mediatek/vcodec/common/mtk_vcodec_util.c  | 23 +++++++++----------
 .../vcodec/decoder/vdec/vdec_av1_req_lat_if.c | 22 ++++++++++++------
 .../vcodec/encoder/venc/venc_h264_if.c        |  5 ++--
 3 files changed, 29 insertions(+), 21 deletions(-)

-- 
2.43.0.472.g3155946c3a-goog


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

end of thread, other threads:[~2024-03-27  9:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-21  9:17 [PATCH v2 0/4] Improvement around mtk_vcodec_mem_free() logging and usage Fei Shao
2023-12-21  9:17 ` [PATCH v2 1/4] media: mediatek: vcodec: Replace dev_name in error string Fei Shao
2023-12-21  9:17 ` [PATCH v2 2/4] media: mediatek: vcodec: Drop unnecessary variable Fei Shao
2023-12-21  9:17 ` [PATCH v2 3/4] media: mediatek: vcodec: Update mtk_vcodec_mem_free() error messages Fei Shao
2023-12-21 11:43   ` AngeloGioacchino Del Regno
2023-12-21  9:17 ` [PATCH v2 4/4] media: mediatek: vcodec: Only free buffer VA that is not NULL Fei Shao
2023-12-21 11:43   ` AngeloGioacchino Del Regno
2024-03-27  9:18 ` [PATCH v2 0/4] Improvement around mtk_vcodec_mem_free() logging and usage Fei Shao
2024-03-27  9:57   ` Sebastian Fricke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®