Message ID | 20230417054816.17097-3-yunfei.dong@mediatek.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1905881vqo; Sun, 16 Apr 2023 23:00:00 -0700 (PDT) X-Google-Smtp-Source: AKy350aLuktdD1wPoNdyX5FblW5V/NCXUh5KPIKJo3LH4PxlGk+r+JBCWzZsW5O3GOkfe9PQ7D7C X-Received: by 2002:a17:902:e5c8:b0:1a6:be37:22e1 with SMTP id u8-20020a170902e5c800b001a6be3722e1mr6936048plf.15.1681711200672; Sun, 16 Apr 2023 23:00:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681711200; cv=none; d=google.com; s=arc-20160816; b=OLmBe5BwTBogWvesT4mPrUTmvcYVzMUNGn3xiyD0cdvFbGTqTYjpfm6jAfcV3ZZZb3 IsC1Us69IpUyHF76avMQTQ5zfpmddIOrdCw3Rgc5lEgZwBe3Uyj1iU1j5E/Ej8icoNuJ jIX0Lb83KQG8uc+fJp9WgSwhQKm4C503daehpwTfAMtwSI8Ulcj0zfoL778/4vROVTs8 BtAReMUWSuP3lQmJ0xvp7EIygoiiHJya0BO9avYQnTbhM04hw1BZ7L41UQe4jBSd0oGy ATFB/A5TRUy2cXgr+Hby5kE9dmYFKvcU1Tbbixg38fqk9YdgY2ENmEWma+7bNxGv5MRO 0wOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ISjKjSjlbUiX+X5IFaZQc47c5c19rS221RG4vjudKtg=; b=HI1OOjIeKMq7iV2lSukjEfWuxTKlMC10CxNKwgE0Ga9Pk9rZmdVx8lj9BiSbsbZ2my UEjxEr0IKWHPIr9k6nenAOXm/MfMRupVVeUnF/92P7GTNUfH6S6AubINq/yC1LoVKbh+ FXGUCVaGW2FF+OGTakVfp7UQb8khS0zbKqKvTIElPV01UFUJIzQd22rOIYGsxU48/VIp sN+MIT53RyngGNOKuoU4VCiVwyJ/mFGAFd1XR25YaGs7H+bC60+U/HMjpbisq558rNCX UCvor4LC7G0kvNf50//L83oxC63wzsgVEC5BZDlwgGxJrrSRD4qD2fieJEKUXtaw1fLm bugA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=EBdJSvEh; 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=mediatek.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y1-20020a17090322c100b001a6db0a7ff0si2050904plg.131.2023.04.16.22.59.46; Sun, 16 Apr 2023 23:00:00 -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=@mediatek.com header.s=dk header.b=EBdJSvEh; 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=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230228AbjDQFs7 (ORCPT <rfc822;leviz.kernel.dev@gmail.com> + 99 others); Mon, 17 Apr 2023 01:48:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229688AbjDQFse (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 17 Apr 2023 01:48:34 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38F3426A6; Sun, 16 Apr 2023 22:48:29 -0700 (PDT) X-UUID: 765344b0dce311eda9a90f0bb45854f4-20230417 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=ISjKjSjlbUiX+X5IFaZQc47c5c19rS221RG4vjudKtg=; b=EBdJSvEhfRVohmLaIzD69unhQjjxV/kkmfJJeODIlJl/mLmrCd4zYi2bSSbyCqCKhooIgJuwVk03e2l3U/kjHyegeWJC7skryeLv7q4FRoXFcJ/dXHYS8ZmVjzgrG3GGLBrlOlHVEv/NAAz+TM5CnjNFDPMbcg7P5R3Gui7c0B4=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.22,REQID:009ccb4d-5095-4b3b-bf04-93d4572c08ac,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:120426c,CLOUDID:ee0e4884-cd9c-45f5-8134-710979e3df0e,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0 X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-UUID: 765344b0dce311eda9a90f0bb45854f4-20230417 Received: from mtkmbs10n2.mediatek.inc [(172.21.101.183)] by mailgw01.mediatek.com (envelope-from <yunfei.dong@mediatek.com>) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 769024818; Mon, 17 Apr 2023 13:48:21 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) by mtkmbs13n1.mediatek.inc (172.21.101.193) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.25; Mon, 17 Apr 2023 13:48:20 +0800 Received: from mhfsdcap04.gcn.mediatek.inc (10.17.3.154) by mtkmbs13n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.25 via Frontend Transport; Mon, 17 Apr 2023 13:48:19 +0800 From: Yunfei Dong <yunfei.dong@mediatek.com> To: Chen-Yu Tsai <wenst@chromium.org>, Nicolas Dufresne <nicolas@ndufresne.ca>, Hans Verkuil <hverkuil-cisco@xs4all.nl>, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>, Benjamin Gaignard <benjamin.gaignard@collabora.com>, =?utf-8?q?N=C3=ADcolas?= =?utf-8?q?_F_=2E_R_=2E_A_=2E_Prado?= <nfraprado@collabora.com>, Yunfei Dong <yunfei.dong@mediatek.com> CC: Matthias Brugger <matthias.bgg@gmail.com>, Hsin-Yi Wang <hsinyi@chromium.org>, Fritz Koenig <frkoenig@chromium.org>, Daniel Vetter <daniel@ffwll.ch>, Steve Cho <stevecho@chromium.org>, <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> Subject: [PATCH 2/6] media: mediatek: vcodec: add the definition of decoder status Date: Mon, 17 Apr 2023 13:48:12 +0800 Message-ID: <20230417054816.17097-3-yunfei.dong@mediatek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230417054816.17097-1-yunfei.dong@mediatek.com> References: <20230417054816.17097-1-yunfei.dong@mediatek.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-MTK: N X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763402003863350682?= X-GMAIL-MSGID: =?utf-8?q?1763402003863350682?= |
Series |
media: mediatek: vcodec: Fix decoder under flow and plt test fails randomly
|
|
Commit Message
Yunfei Dong (董云飞)
April 17, 2023, 5:48 a.m. UTC
Adding the status used to separate different decoder period for
core hardware.
Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
---
drivers/media/platform/mediatek/vcodec/vdec_msg_queue.h | 7 +++++++
1 file changed, 7 insertions(+)
Comments
Il 17/04/23 07:48, Yunfei Dong ha scritto: > Adding the status used to separate different decoder period for > core hardware. > > Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com> > --- > drivers/media/platform/mediatek/vcodec/vdec_msg_queue.h | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/media/platform/mediatek/vcodec/vdec_msg_queue.h b/drivers/media/platform/mediatek/vcodec/vdec_msg_queue.h > index a5d44bc97c16..19508be08566 100644 > --- a/drivers/media/platform/mediatek/vcodec/vdec_msg_queue.h > +++ b/drivers/media/platform/mediatek/vcodec/vdec_msg_queue.h > @@ -21,6 +21,13 @@ struct mtk_vcodec_ctx; > struct mtk_vcodec_dev; > typedef int (*core_decode_cb_t)(struct vdec_lat_buf *lat_buf); > > +/* current context isn't work */ > +#define CONTEXT_LIST_EMPTY (0) > +/* queued to the core work list */ > +#define CONTEXT_LIST_QUEUED (1) > +/* context decode done */ > +#define CONTEXT_LIST_DEC_DONE (2) I would prefer an enumeration instead; you can keep the documentation for those status signals with kerneldoc on the new enum. /** * enum core_ctx_status - Context decode status for core hardware * @CONTEXT_LIST_EMPTY: No buffer queued on Core HW (must always be 0) * @CONTEXT_LIST_QUEUED: Buffer queued to the core work list * @CONTEXT_LIST_DEC_DONE: Context decode done */ enum core_ctx_status { CONTEXT_LIST_EMPTY = 0, CONTEXT_LIST_QUEUED, CONTEXT_LIST_DEC_DONE, } Moreover, since this is a rather simple addition, please squash this commit with patch [3/6] where you actually also introduce the actual usage of the new enum. Cheers, Angelo
Hi AngeloGioacchino, Thanks for your suggestion. On Mon, 2023-04-17 at 11:26 +0200, AngeloGioacchino Del Regno wrote: > External email : Please do not click links or open attachments until > you have verified the sender or the content. > > > Il 17/04/23 07:48, Yunfei Dong ha scritto: > > Adding the status used to separate different decoder period for > > core hardware. > > > > Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com> > > --- > > drivers/media/platform/mediatek/vcodec/vdec_msg_queue.h | 7 > > +++++++ > > 1 file changed, 7 insertions(+) > > > > diff --git > > a/drivers/media/platform/mediatek/vcodec/vdec_msg_queue.h > > b/drivers/media/platform/mediatek/vcodec/vdec_msg_queue.h > > index a5d44bc97c16..19508be08566 100644 > > --- a/drivers/media/platform/mediatek/vcodec/vdec_msg_queue.h > > +++ b/drivers/media/platform/mediatek/vcodec/vdec_msg_queue.h > > @@ -21,6 +21,13 @@ struct mtk_vcodec_ctx; > > struct mtk_vcodec_dev; > > typedef int (*core_decode_cb_t)(struct vdec_lat_buf *lat_buf); > > > > +/* current context isn't work */ > > +#define CONTEXT_LIST_EMPTY (0) > > +/* queued to the core work list */ > > +#define CONTEXT_LIST_QUEUED (1) > > +/* context decode done */ > > +#define CONTEXT_LIST_DEC_DONE (2) > > I would prefer an enumeration instead; you can keep the documentation > for those > status signals with kerneldoc on the new enum. > > /** > * enum core_ctx_status - Context decode status for core hardware > * @CONTEXT_LIST_EMPTY: No buffer queued on Core HW (must always > be 0) > * @CONTEXT_LIST_QUEUED: Buffer queued to the core work list > * @CONTEXT_LIST_DEC_DONE: Context decode done > */ > enum core_ctx_status { > CONTEXT_LIST_EMPTY = 0, > CONTEXT_LIST_QUEUED, > CONTEXT_LIST_DEC_DONE, > } > > Moreover, since this is a rather simple addition, please squash this > commit with > patch [3/6] where you actually also introduce the actual usage of the > new enum. > Fixed in patch v2. Best Regards, Yunfei Dong > Cheers, > Angelo >
diff --git a/drivers/media/platform/mediatek/vcodec/vdec_msg_queue.h b/drivers/media/platform/mediatek/vcodec/vdec_msg_queue.h index a5d44bc97c16..19508be08566 100644 --- a/drivers/media/platform/mediatek/vcodec/vdec_msg_queue.h +++ b/drivers/media/platform/mediatek/vcodec/vdec_msg_queue.h @@ -21,6 +21,13 @@ struct mtk_vcodec_ctx; struct mtk_vcodec_dev; typedef int (*core_decode_cb_t)(struct vdec_lat_buf *lat_buf); +/* current context isn't work */ +#define CONTEXT_LIST_EMPTY (0) +/* queued to the core work list */ +#define CONTEXT_LIST_QUEUED (1) +/* context decode done */ +#define CONTEXT_LIST_DEC_DONE (2) + /** * struct vdec_msg_queue_ctx - represents a queue for buffers ready to be processed * @ready_to_use: ready used queue used to signalize when get a job queue