Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp3540927rwe; Sun, 16 Apr 2023 22:49:55 -0700 (PDT) X-Google-Smtp-Source: AKy350ZBUypkXORDQiZf8JVM86TjZAX6ew9yU1DrGwFe2IbCzdogqHTT+3q1ih+1CPWexNS4g/k3 X-Received: by 2002:a05:6a20:5487:b0:ef:890c:3005 with SMTP id i7-20020a056a20548700b000ef890c3005mr4191838pzk.17.1681710595109; Sun, 16 Apr 2023 22:49:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681710595; cv=none; d=google.com; s=arc-20160816; b=rMkXKbLyOeBTZB63PSOU9jylArDg8QGjhdH+p6vFF+mvsFu9sn+CPFsAAHjK3xyV51 ClhqeFSuf0Bv0qrQAjjBZg0oKWQmEPd5mopzY+fsL1CyqcYpEop/umABv3bPO4D3Wdy9 /G/WYlNtXODePkjo0/LmcPDailBIXW8+XAV4OSkWiWup5m4UESuN58m31pUQGlcj7lWK ApebPC04lB7rPk/iDBoSVt6fW3uVShAS5NsS79tQIqjVTGIXQq3D0HfInf63Lz06LGqm vU4airl0tEkFGb4T/z7TQ+lB1B5OTMAYKe7qit04zv5AL5Eta8MrGSNy8igmrcTD4sOc J36w== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a8-20020a656548000000b0050b508f68d8si10501981pgw.206.2023.04.16.22.49.43; Sun, 16 Apr 2023 22:49:55 -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 S230163AbjDQFs7 (ORCPT + 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 ); 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 ) (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 To: Chen-Yu Tsai , Nicolas Dufresne , Hans Verkuil , AngeloGioacchino Del Regno , Benjamin Gaignard , =?UTF-8?q?N=C3=ADcolas=20F=20=2E=20R=20=2E=20A=20=2E=20Prado?= , Yunfei Dong CC: Matthias Brugger , Hsin-Yi Wang , Fritz Koenig , Daniel Vetter , Steve Cho , , , , , , 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: X-Mailing-List: linux-kernel@vger.kernel.org Adding the status used to separate different decoder period for core hardware. Signed-off-by: Yunfei Dong --- 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) + /** * 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 -- 2.18.0