[v2,2/7] media: mediatek: vcodec: using each instance lat_buf count replace core ready list
Message ID | 20221219064332.2124-3-yunfei.dong@mediatek.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp2242922wrn; Sun, 18 Dec 2022 23:23:26 -0800 (PST) X-Google-Smtp-Source: AA0mqf4sPpZjfDuXxhJ9AmWgeeuQYPs5mzxpfhxakXjDN8TNBuIfg37Etpt1pdC34NzO75A0vrU8 X-Received: by 2002:a17:906:55c6:b0:7c0:d60b:2883 with SMTP id z6-20020a17090655c600b007c0d60b2883mr32313283ejp.50.1671434606619; Sun, 18 Dec 2022 23:23:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671434606; cv=none; d=google.com; s=arc-20160816; b=eisv+P7y203+grDyvbJ3e6c0fs9Nztd0kYUNWZPcdlPOGAF+zZnnNmmTOKrIe8BZcf tpYwrg9uNQIlBK3lx7pTGC1jq9d26W/sJ2sU95Ltv5GsYPdxtAzqdg6m9xwUCIElbuDb nGSG47hnAj/Dw6s24PZ+d0GDPZLu5G7H386G511YqAW59p5MlZzcH9FnYbxT+RJ9dr7e SsxwJWZ54YXi62g7wJockD78wi1IoABG5wkDDLsFiWnf0XKrkGKvqape3Ckr+6lqa4sz I1gBMIjxvzhkK8jWszLALB692jKdMZ9BFHdOOJRltcWwRHawDdWYwbD6GXMioudwK9H3 4nnQ== 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=Ep6+w+pjGfry1uGq919wEZUgmqgXy3jy9hg5P1njcnM=; b=WUM3quC6uwD1CspD71p8mBH5oR3fJ20/p8JDFCwFkJjHCI5PVC40wYY1xlfJiR7bQV pL6C7Wx24vwAnf4KbeqNFannh/k2OeVT1lyK6VguddfZlziLbwkLvu5zR4HNi2Ns7XG/ d2satjz4bkrI5CWVg0MOU0nPF54ZRjT7ND8bGjsbfmr2ZlMAyCe9FG8uZqRCfrQkTjOq 1cwl1tjWzssLUZMHU36pPeFQjBZGvm8qc8uCyWoPSiX56m9tgg4gkjy9kpM+ZDc6c2cf ZuRcRG5Flx0Wr3Yf7slbkTDPxFpOizLKpE1fs5+RvU9igW67NwldIF8uiqzQOkif5n+I 4w+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=Bf0BgR3d; 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 sd16-20020a1709076e1000b008310ae17418si47572ejc.594.2022.12.18.23.22.50; Sun, 18 Dec 2022 23:23:26 -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=Bf0BgR3d; 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 S231297AbiLSGpV (ORCPT <rfc822;peekingduck44@gmail.com> + 99 others); Mon, 19 Dec 2022 01:45:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231535AbiLSGon (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 19 Dec 2022 01:44:43 -0500 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9D676155; Sun, 18 Dec 2022 22:43:47 -0800 (PST) X-UUID: af1f628bfd18487daada7a512112e0aa-20221219 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=Ep6+w+pjGfry1uGq919wEZUgmqgXy3jy9hg5P1njcnM=; b=Bf0BgR3d7+BYjn2VQzkx9C2oawsVfyQ/rYS7NSj3GOXHf2UUarREI5ZkkWV+KtS+cpwcSAz7wNiZhN3YLtHE82RJFva8rLLkCYmzwmn6+hywASiNZrNH4Tvuv5i/UvRR264TS2rzK3e7Unkgmkiry0SpYjt2KUnSlmaGviHsNI8=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.14,REQID:324729c0-05dd-42d5-9f6a-2d37520a0857,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:dcaaed0,CLOUDID:1a962152-dd49-462e-a4be-2143a3ddc739,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 X-UUID: af1f628bfd18487daada7a512112e0aa-20221219 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw02.mediatek.com (envelope-from <yunfei.dong@mediatek.com>) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 115710885; Mon, 19 Dec 2022 14:43:40 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) 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.792.15; Mon, 19 Dec 2022 14:43:39 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Mon, 19 Dec 2022 14:43:38 +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 v2,2/7] media: mediatek: vcodec: using each instance lat_buf count replace core ready list Date: Mon, 19 Dec 2022 14:43:27 +0800 Message-ID: <20221219064332.2124-3-yunfei.dong@mediatek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221219064332.2124-1-yunfei.dong@mediatek.com> References: <20221219064332.2124-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,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?1752626214184403421?= X-GMAIL-MSGID: =?utf-8?q?1752626214184403421?= |
Series |
media: mediatek: vcodec: Fix power_VideoCall test fail
|
|
Commit Message
Yunfei Dong (董云飞)
Dec. 19, 2022, 6:43 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>
---
drivers/media/platform/mediatek/vcodec/vdec_msg_queue.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Il 19/12/22 07:43, Yunfei Dong ha scritto: > 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>
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);