[v4,2/7] media: mediatek: vcodec: using each instance lat_buf count replace core ready list
Message ID | 20230201073316.27923-3-yunfei.dong@mediatek.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2388:b0:96:219d:e725 with SMTP id i8csp248334dyf; Tue, 31 Jan 2023 23:35:35 -0800 (PST) X-Google-Smtp-Source: AK7set9pFOICOx5oviyZYPh9rc0FQ8yRjIsKNpFDtZsCoJd5aWihHe7X1mpJor/YZ5C1G5l1SL7j X-Received: by 2002:a05:6402:5167:b0:4a2:2e33:35fd with SMTP id d7-20020a056402516700b004a22e3335fdmr1115832ede.15.1675236935636; Tue, 31 Jan 2023 23:35:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675236935; cv=none; d=google.com; s=arc-20160816; b=SZbm3RpE5EuzkJeQXQ6elGo+Gq4Lj8GQjvmT7aDIX0GA0rZlBUD7cUg6yD/Mcpm67P N2lVK2iEhvHh9MwlRh4u8SEjqwvI8tjG+1iGuGm35EyI9pmKwD5sp3UejLjlp/64PzWD KNQtHbOTlQ4g/kFGooeqrLaOAuLmFPz/9R4u3XNzd4o95m36dACkVNlomBVUF5H11/n6 4BPACCeW6NVls6VgHNAOdU/4HS80chGjz9hSpsBzAxs2aVlv3EOE7VgDYwhxjNUFWEZ4 14Tz0bvyuH+cMHonQLKEdTeYYQ0ZWUOuBKOQHC7epg0uVKIYxyr1LMdMXIze2MdsnHk1 JDaw== 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=gz7OdVfZErCQdXy+fRjQiUvbIcVWxDyhc2LsrCgb9is=; b=ptF9zEO3EKWzoOApBxubRw5MiXFDVk6HnMSYca5hYKExmlycXO2I2ynw7yziMKfh3h V7nWCkrnZ5fk6HEFTBJhe0Bl8kZtcMNAsKVZHmoa9ID72js0FNuUrqbHUvl9tRaYRpUi 1LnQk9xxC3fTJvzJbBcoaLvvcbXl9xtp+BkdMA7rIeNkxn9IxzTLD8T70YreOCvPINFk KBuqwqd2tMlMR6XmDdQM2wHU8IL8MbpZYhd62OylZObrjjojJcrV9/hYXUteKPLxXP3D n9yoQq8r7yX38+EtHcgfa6A3dDjRvA8gUK/YhY+Y2EoiDWrT/trXKWFcPqgSIWVJbFtq 6dSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=rTxonek8; 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 ui37-20020a170907c92500b008775d7fcb5dsi20030983ejc.46.2023.01.31.23.35.10; Tue, 31 Jan 2023 23:35:35 -0800 (PST) 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=rTxonek8; 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 S230372AbjBAHdf (ORCPT <rfc822;duw91626@gmail.com> + 99 others); Wed, 1 Feb 2023 02:33:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229770AbjBAHde (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 1 Feb 2023 02:33:34 -0500 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 736F839280; Tue, 31 Jan 2023 23:33:26 -0800 (PST) X-UUID: b48bf9b4a20211ed945fc101203acc17-20230201 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=gz7OdVfZErCQdXy+fRjQiUvbIcVWxDyhc2LsrCgb9is=; b=rTxonek8ID5oMGsI+c48QCIVSehhumk1cnVy4C1kNU9ST4VlCOYbIMcJu60UyASOOI4hDpbkcmvOP9ksGGECC95aQzk+r8zYHRV2vaQ/D/txyyFkIlgzLsUpRObsdN7BKaWm+497Vtb3Ie7GG8fzAFpTAHJF84/Q3yEfA9DGbgk=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.18,REQID:913115e3-2d96-4d6a-bb1c-8b1928f21b2d,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:95 X-CID-INFO: VERSION:1.1.18,REQID:913115e3-2d96-4d6a-bb1c-8b1928f21b2d,IP:0,URL :0,TC:0,Content:0,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Spam_GS981B3D,ACTION :quarantine,TS:95 X-CID-META: VersionHash:3ca2d6b,CLOUDID:06a51ef7-ff42-4fb0-b929-626456a83c14,B ulkID:230201153323CDW8L4LK,BulkQuantity:0,Recheck:0,SF:38|29|28|17|19|48,T C:nil,Content:0,EDM:-3,IP:nil,URL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0 ,OSI:0,OSA:0 X-CID-BVR: 0 X-UUID: b48bf9b4a20211ed945fc101203acc17-20230201 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw02.mediatek.com (envelope-from <yunfei.dong@mediatek.com>) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 982533512; Wed, 01 Feb 2023 15:33:22 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.194) by mtkmbs11n2.mediatek.inc (172.21.101.187) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Wed, 1 Feb 2023 15:33:21 +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.792.15 via Frontend Transport; Wed, 1 Feb 2023 15:33:20 +0800 From: Yunfei Dong <yunfei.dong@mediatek.com> To: Yunfei Dong <yunfei.dong@mediatek.com>, 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>, Tiffany Lin <tiffany.lin@mediatek.com> CC: Mauro Carvalho Chehab <mchehab@kernel.org>, 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 v4,2/7] media: mediatek: vcodec: using each instance lat_buf count replace core ready list Date: Wed, 1 Feb 2023 15:33:11 +0800 Message-ID: <20230201073316.27923-3-yunfei.dong@mediatek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230201073316.27923-1-yunfei.dong@mediatek.com> References: <20230201073316.27923-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, T_SPF_TEMPERROR,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?1756613245042583063?= X-GMAIL-MSGID: =?utf-8?q?1756613245042583063?= |
Series |
media: mediatek: vcodec: Fix power_VideoCall test fail
|
|
Commit Message
Yunfei Dong (董云飞)
Feb. 1, 2023, 7:33 a.m. UTC
Core Hardware decoder depends on each instance lat_buf count, calling queue_work decode again when the lat_buf count of each instance isn't zero. Fixes: 365e4ba01df4 ("media: mtk-vcodec: Add work queue for core hardware decode") Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> --- drivers/media/platform/mediatek/vcodec/vdec_msg_queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/mediatek/vcodec/vdec_msg_queue.c b/drivers/media/platform/mediatek/vcodec/vdec_msg_queue.c index 3f016c87d722..ad5002ca953e 100644 --- a/drivers/media/platform/mediatek/vcodec/vdec_msg_queue.c +++ b/drivers/media/platform/mediatek/vcodec/vdec_msg_queue.c @@ -239,7 +239,7 @@ static void vdec_msg_queue_core_work(struct work_struct *work) mtk_vcodec_dec_disable_hardware(ctx, MTK_VDEC_CORE); vdec_msg_queue_qbuf(&ctx->msg_queue.lat_ctx, lat_buf); - if (!list_empty(&dev->msg_queue_core_ctx.ready_queue)) { + if (atomic_read(&lat_buf->ctx->msg_queue.core_list_cnt)) { mtk_v4l2_debug(3, "re-schedule to decode for core: %d", dev->msg_queue_core_ctx.ready_num); queue_work(dev->core_workqueue, &msg_queue->core_work);