From patchwork Sat Dec 10 07:32:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?WXVuZmVpIERvbmcgKOiRo+S6kemjnik=?= X-Patchwork-Id: 2842 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp1184161wrr; Fri, 9 Dec 2022 23:33:34 -0800 (PST) X-Google-Smtp-Source: AA0mqf7WGyLkxWl3wU8mVi48tHH4/OlEuhAzCt7tEUmH1w9kocOtnFO0pH45jBc81URI0DuXaFmS X-Received: by 2002:a17:906:141a:b0:7c1:4e5d:d8a0 with SMTP id p26-20020a170906141a00b007c14e5dd8a0mr1579426ejc.76.1670657614242; Fri, 09 Dec 2022 23:33:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670657614; cv=none; d=google.com; s=arc-20160816; b=ip5xIn5FBgYAIRDR/j2In79RjqNe0WNBB/aGBvQhCtidoBESNrYj+vSPSbALeb12PZ IUJTYj/TkJ/MwubITr4XFVCvtIELLXjN5UOV+xoy9qJ+AfLqR48Hu/lrS+oQ9iGVUp7O wf/NDmRlvuAhRJc00gOeV/4jnN3Es6bC+ylxqJXeIw8HL+gB5NrmrMekWYBpzGC3BTz8 oxwjD64dT5AADcvRk6vBbi8ecOlvkyP03sEeWKCw2s+i6bZm+wY/abJwYS+Wi1j4NNDm P+Wpg0wl5GHUjYxugkthMUagymQeRVwmr4TUVtuUNHIerJyxGrM6A3+WUm1PPiz1tTaO INGw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=RV9FBZj19jlJj76zizzD8sDNUjqQGz9+DRIs5bQdvgo=; b=Gb2XDw1H/7moAzo2zxcAjZGhLPB6CWes3eyvzrNzRPW3aIZBR0laia3bh2snMj/mvn saHCasJ+fh3GXRWXRFJ2hbvLDRYF/38akkAAQ5jly1Ma1wYxsI7Z2pV7yOFQNYknILkp vLPd7Zl08TTWIHIe4PEJ9mGjqyaJzNr5CUTOIa8fHIzMd3TSyhGbysxntmpuvsK2It2a YttVAkfv4ARemm9KR0j9htarpXbyKjMtfHEbkzMTb/1PS1zibhusatmrAYApgkZX1oHa cTAD/BDad5iFdm/YZnpKFkDHdbfe/I3TQcApVFoOnc9vnA6u2m9XRuNOcQddgd78Ob/O VTLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=dpGonxXr; 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 hz5-20020a1709072ce500b007add8160fd4si1810954ejc.766.2022.12.09.23.33.04; Fri, 09 Dec 2022 23:33:34 -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=dpGonxXr; 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 S229710AbiLJHcf (ORCPT + 99 others); Sat, 10 Dec 2022 02:32:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229468AbiLJHcd (ORCPT ); Sat, 10 Dec 2022 02:32:33 -0500 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E2021263B; Fri, 9 Dec 2022 23:32:27 -0800 (PST) X-UUID: ca6ba3865f0e40758cb07f733de742cf-20221210 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:Message-ID:Date:Subject:CC:To:From; bh=RV9FBZj19jlJj76zizzD8sDNUjqQGz9+DRIs5bQdvgo=; b=dpGonxXrGs6UCuur090hQkAr6Q9Ja6LSvMw4j9VSg+YOmtyXc5d+p4dlQyyCHWP+IJeeLfYzpG2+3E+OJXKnpMxZ8BMi9en5AvnBZAfxOm/y9bTyBDbhEJWelks7sUgsyXRujnMvDXbI2M2sL9TO674qpnvvulTTimthE1ClxI4=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.14,REQID:35998799-579d-492b-ba45-6a4975e798b6,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.14,REQID:35998799-579d-492b-ba45-6a4975e798b6,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:dcaaed0,CLOUDID:f8a531d2-652d-43fd-a13a-a5dd3c69a43d,B ulkID:2212101532234J9HKBJQ,BulkQuantity:0,Recheck:0,SF:38|28|17|19|48,TC:n il,Content:0,EDM:-3,IP:nil,URL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0 X-UUID: ca6ba3865f0e40758cb07f733de742cf-20221210 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 21752955; Sat, 10 Dec 2022 15:32:22 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.15; Sat, 10 Dec 2022 15:32:20 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Sat, 10 Dec 2022 15:32:19 +0800 From: Yunfei Dong To: Yunfei Dong , Chen-Yu Tsai , Nicolas Dufresne , Hans Verkuil , AngeloGioacchino Del Regno , Benjamin Gaignard , Tiffany Lin CC: Mauro Carvalho Chehab , Matthias Brugger , Hsin-Yi Wang , Fritz Koenig , Daniel Vetter , Steve Cho , , , , , , Subject: [PATCH 0/5] media: mediatek: vcodec: Fix power_VideoCall test fail Date: Sat, 10 Dec 2022 15:32:13 +0800 Message-ID: <20221210073218.17350-1-yunfei.dong@mediatek.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751811478308303021?= X-GMAIL-MSGID: =?utf-8?q?1751811478308303021?= Random getting below error message when test power_VideoCall/control.49_vp9: pc : __list_del_entry_valid+0xb0/0xfc lr : __list_del_entry_valid+0xac/0xfc sp : ffffffc020f23ce0 The lat_buf in core list won't be deleted when one instance decode done. Will access invalid released lat_buf list when queue work continue to decode. Firstly, remove all unused lat_buf to the top of core list, making sure these buffers can be decoded in highest priority; lastly, remove all unused lat_buf when the instance is freed. patch 1 add params to record lat and core lat_buf count. patch 2 using each instance lat_buf count replace core ready list. patch 3 move lat_buf to the top of core list. patch 4 add core decode done event. patch 5 remove unused lat_buf. --- Yunfei Dong (5): media: mediatek: vcodec: add params to record lat and core lat_buf count media: mediatek: vcodec: using each instance lat_buf count replace core ready list media: mediatek: vcodec: move lat_buf to the top of core list media: mediatek: vcodec: add core decode done event media: mediatek: vcodec: remove unused lat_buf .../platform/mediatek/vcodec/vdec_msg_queue.c | 74 +++++++++++++++++-- .../platform/mediatek/vcodec/vdec_msg_queue.h | 13 ++++ 2 files changed, 81 insertions(+), 6 deletions(-)