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

AngeloGioacchino Del Regno angelogioacchino.delregno at collabora.com
Tue Jul 4 05:12:57 PDT 2023


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 at mediatek.com>
> Reviewed-by: Nicolas Dufresne <nicolas.dufresne at 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 at collabora.com>





More information about the linux-arm-kernel mailing list