Thread (19 messages) 19 messages, 2 authors, 2023-07-04

Re: [PATCH v5,03/11] media: mediatek: vcodec: Removing struct 'mtk_vcodec_ctx/dev' for shared interface

From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Date: 2023-07-04 12:13:45
Also in: linux-devicetree, linux-media, linux-mediatek, lkml

Il 04/07/23 13:13, Yunfei Dong ha scritto:
quoted hunk ↗ jump to hunk
The shared struct 'mtk_vcodec_ctx/dev' will be changed to 'mtk_vcodec_enc_ctx/dev'
and 'mtk_vcodec_dec_ctx/dev' in order to separate encoder and decoder. Removing
common struct 'mtk_vcodec_ctx/dev' for shared interface which encoder and decoder
used at the same time. Then encoder and decoder can call the same interface
independently.

Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
---
  .../mediatek/vcodec/mtk_vcodec_intr.c         | 30 ++++++++++++-------
  .../mediatek/vcodec/mtk_vcodec_intr.h         |  3 +-
  .../mediatek/vcodec/mtk_vcodec_util.c         | 19 +++++-------
  .../mediatek/vcodec/mtk_vcodec_util.h         |  9 ++----
  .../mediatek/vcodec/vdec/vdec_vp8_if.c        | 16 +++++-----
  .../mediatek/vcodec/venc/venc_h264_if.c       |  2 +-
  .../mediatek/vcodec/venc/venc_vp8_if.c        |  2 +-
  7 files changed, 41 insertions(+), 40 deletions(-)
diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_intr.c b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_intr.c
index 552b4c93d972..daa44f635727 100644
--- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_intr.c
+++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_intr.c
@@ -11,32 +11,40 @@
  #include "mtk_vcodec_intr.h"
  #include "mtk_vcodec_util.h"
  
-int mtk_vcodec_wait_for_done_ctx(struct mtk_vcodec_ctx *ctx,
-				 int command, unsigned int timeout_ms,
+int mtk_vcodec_wait_for_done_ctx(void *priv, int command, unsigned int timeout_ms,
  				 unsigned int hw_id)
  {
+	struct mtk_vcodec_ctx *ctx = priv;
  	long timeout_jiff, ret;
-	int status = 0;
+	int status = 0, ctx_id, ctx_type;
Only one nitpick here, but nothing critical: please order variables by name.

	int ctx_id, ctx_type, status = 0;

after which

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help