lkml.org 
[lkml]   [2023]   [Jul]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v5,03/11] media: mediatek: vcodec: Removing struct 'mtk_vcodec_ctx/dev' for shared interface
From
Il 04/07/23 13:13, Yunfei Dong ha scritto:
> 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>


\
 
 \ /
  Last update: 2023-07-04 14:14    [W:0.241 / U:1.560 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site