Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp27600115rwd; Tue, 4 Jul 2023 05:23:11 -0700 (PDT) X-Google-Smtp-Source: APBJJlF8bixSMmYuUV2am4bU6MidT5G3cUD9o5/xUcgGQA2AR3WbnD7LOBubyIJ/MEzE+Q7/SOz8 X-Received: by 2002:a17:90b:3809:b0:25b:d292:d9a3 with SMTP id mq9-20020a17090b380900b0025bd292d9a3mr14025583pjb.37.1688473391186; Tue, 04 Jul 2023 05:23:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688473391; cv=none; d=google.com; s=arc-20160816; b=ZNbbDheX7BCdKpuk3yk/4b0ClhNagMj9OFlmBtEH49vitOgkT4Y5Z7eC5ey0AH8Cdg I9GKSPGHuRcJ27xnMkdtL8Ytbu/N4KQucHltPNuskHb9MdYmRfjYZtw5c3djmHu4coJr x/gQiK8EPeLitWFzJTWpWaCtWd+FVTyIW3sfWtD+ch6GAJfT7l6UfLUr7Lsi2P9/ZDUh 6BM0pd+HTdsULjGoeIjNhuTOLBV1JW07Hu24dDVumht36Kp5r9CV7dtxpx1qG+mWO5tx fso7zIOicb4FPXZ/ibUQniUPipxZbeHbiEig6UDMxK4F4TyslIJdvqpQRqTejg949fYC lhXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=7oOiD4mO8tmgWq8nEdHXF4OMxt99RieLs1o2xIelmVE=; fh=NAuXkc5JSLEXANS/WGzRBo8+pvt2IHDPVUsBNLp4AZI=; b=zRKPkp6PT9z2daCoA+SpnIbPO7X06QNfOMvZn0Qc5kdRoAB2Q4CZh2c43utxr4m/xy rBMqo9BCbf9CojXHdqL4t6LkqjLUEC+WsHDB2E1cQIVILg8qKJxMi2RH2/aY0Rc8Bb3x 78dH2+CQy40sG9wWVhl1s/8D7LpYhGP8FnyFOb1gf7PIzSjOzRr1I+guDm++sTIF7Ynu 8VMRN5CdDODwEU/xeFHIfBh7F45bkEf5x3xwGQJ0d7zIIXF62UCsfxJCC7Q9YhRsMqkB AI4jHw2ko68d+ZWx9px4/0qoc6WPHV0D3cZkyuUCPaWW3jyApimd1yNWWPxeSwSanHUA B4qQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=AqsedoFS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p4-20020a63c144000000b00530b6228f91si21485175pgi.895.2023.07.04.05.22.58; Tue, 04 Jul 2023 05:23:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=AqsedoFS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231509AbjGDMNn (ORCPT + 99 others); Tue, 4 Jul 2023 08:13:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231344AbjGDMNj (ORCPT ); Tue, 4 Jul 2023 08:13:39 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F2E3170E; Tue, 4 Jul 2023 05:13:09 -0700 (PDT) Received: from [IPV6:2001:b07:2ed:14ed:c5f8:7372:f042:90a2] (unknown [IPv6:2001:b07:2ed:14ed:c5f8:7372:f042:90a2]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 740D26606FA2; Tue, 4 Jul 2023 13:13:00 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1688472781; bh=tOFsOkcAsXmj1UCEfgpXX2h+aSRe7EftJRLlt/+7qCM=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=AqsedoFSQYO55RmHLaK9GtLwH9m86sxbuLzsekqXEx0ge9WgPfnMXfvn3zOoHefXy B92+hXz0eD3Nc5h88FO6XmqWsGEQgkt2ChG62SxbKtH0vcy2Zwcwn4Uv5YS1oNpsQ0 35jnahbhJZ2lBQeYl3NxI75CKGQOcImnkCv+NEoKI0jtXxdoFY8/IylnO1LXmvh4s7 Zi5ZJMbTjPG5hK6+B40SJ0LsuTRWsHLMQZ96XD5g0IsHO0yZJ/++/zsjkCqOIAZtQh hzSV+ZElglbGPBg8JhAduKjAF55bGZnmhRVeFJcz2jIoqmKxPjbYG7Gm6QpJbDW3Dw 6rzUjawzzDF0w== Message-ID: Date: Tue, 4 Jul 2023 14:12:57 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH v5,03/11] media: mediatek: vcodec: Removing struct 'mtk_vcodec_ctx/dev' for shared interface Content-Language: en-US To: Yunfei Dong , =?UTF-8?Q?N=c3=adcolas_F_=2e_R_=2e_A_=2e_Prado?= , Nicolas Dufresne , Hans Verkuil , Benjamin Gaignard , Nathan Hebert Cc: Chen-Yu Tsai , Hsin-Yi Wang , Fritz Koenig , Daniel Vetter , Steve Cho , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Project_Global_Chrome_Upstream_Group@mediatek.com References: <20230704111327.7140-1-yunfei.dong@mediatek.com> <20230704111327.7140-4-yunfei.dong@mediatek.com> From: AngeloGioacchino Del Regno In-Reply-To: <20230704111327.7140-4-yunfei.dong@mediatek.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Reviewed-by: Nicolas Dufresne > --- > .../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