Message ID | 20230114094112.29068-1-yunfei.dong@mediatek.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp210314wrn; Sat, 14 Jan 2023 01:49:31 -0800 (PST) X-Google-Smtp-Source: AMrXdXuTBKEDYmWiPXsAzQ1zGL7We308HMaf7lrdfNhSvbNdCeNhmn4hr5+xGoWoOCbeG5oMtNaC X-Received: by 2002:a17:907:d044:b0:84d:328b:1b3e with SMTP id vb4-20020a170907d04400b0084d328b1b3emr6625411ejc.57.1673689771735; Sat, 14 Jan 2023 01:49:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673689771; cv=none; d=google.com; s=arc-20160816; b=fNuN04iCqEyohqgg+YOz8wnEmsY0xWFrukAUF9LYxAJMJV7uTFln0EyjnF2d+7mb8R H1+ftDPK/F+g/TvBw+RmTYtlCiiE/naO58HxlJV6BUQJc22UY2TgR5r9DUZhOj7jmLJ9 mAE02OqW8a6obteV2DyKMi0OUyIaJusatsLfz86JNS54yvX4e8Ty0PSEkT3hZlsWPa/B 0HA7P5uo+beo0NhsJZ4mCxoHADKOvtXLgWHmJL2/swr2ck3IIOybTfME8qStVj1o+fJ7 wgx6ZuClCkJIn7X7VL+UjsoJstnYpWKFpGoi6u16BQeY7J5spMVGI3SW9xfcYCGPB5Qi Lf1w== 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=JhlycgW5oR2VzgYLDMnvax7qMcTUSfY1PahndTkqWvk=; b=iujo+JV/Fcwo1c2pCCER5gGJf3yo0gFkP1MAxt4Dwq4/XsXkC4ifY2BrKUrARzlpKC GOpzHy+25gHAGbYMblayBKFz30/Jo2MHIhparorOv4W+py9qu0LQEpoBoRi3G3EMcSWP hNnccVwZnztxAnpsH3H8XSWZre0bncw3Zlb/FtfJYQNtTY2IEZrF0Vw4mYnirO2XpQ5Y zb2CbCJ7fMXCJmrK6r9w28r5C6Wst1SXPFPw7c+Xj+MNKBBIMtyr3fGwOSMHYekJFA4r 6XNJ3XKpSi8k98OOvkWinVBjgdXmeDjiC5PAsKM7Nw4B3KEXyPNpS2SbSpNCJBPN2Vcl Jxrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=G7TEpdHH; 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 sc40-20020a1709078a2800b007c0bc66e526si27629883ejc.622.2023.01.14.01.49.07; Sat, 14 Jan 2023 01:49:31 -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=G7TEpdHH; 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 S230176AbjANJnY (ORCPT <rfc822;stefanalexe48@gmail.com> + 99 others); Sat, 14 Jan 2023 04:43:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230257AbjANJnC (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 14 Jan 2023 04:43:02 -0500 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C31447AA4; Sat, 14 Jan 2023 01:41:18 -0800 (PST) X-UUID: 96a76f8a93ef11eda06fc9ecc4dadd91-20230114 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=JhlycgW5oR2VzgYLDMnvax7qMcTUSfY1PahndTkqWvk=; b=G7TEpdHHS1R0uyDqTYUndYnBOjTmoEN7NP8H0kyfEr1h0lA/LMHLq1yyIbMTTIJA12EKdWTBDnxXoGsyZVnlE4ey5UavlLN2gpwugVpzCPSLY4rcXmj7J0z5b9zsAc5PC0sCbtg7fVmd9zxnwjMxULYeKF9Q2INfvKkPxN6/Bq8=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.17,REQID:0d2ca7e7-64c2-430a-a1fd-a337bfecff70,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.17,REQID:0d2ca7e7-64c2-430a-a1fd-a337bfecff70,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:543e81c,CLOUDID:b88ecbf5-ff42-4fb0-b929-626456a83c14,B ulkID:230114174116TY8QCT7Y,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,OS I:0,OSA:0 X-CID-APTURL: Status:success,Category:nil,Trust:0,Unknown:0,Malicious:0 X-CID-BVR: 0,NGT X-UUID: 96a76f8a93ef11eda06fc9ecc4dadd91-20230114 Received: from mtkmbs13n1.mediatek.inc [(172.21.101.193)] 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 121519138; Sat, 14 Jan 2023 17:41:15 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Sat, 14 Jan 2023 17:41:13 +0800 Received: from mhfsdcap04.gcn.mediatek.inc (10.17.3.154) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Sat, 14 Jan 2023 17:41:13 +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] media: mediatek: vcodec: Using pm_runtime_put instead of pm_runtime_put_sync Date: Sat, 14 Jan 2023 17:41:12 +0800 Message-ID: <20230114094112.29068-1-yunfei.dong@mediatek.com> X-Mailer: git-send-email 2.25.1 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?1754990926363997744?= X-GMAIL-MSGID: =?utf-8?q?1754990926363997744?= |
Series |
[v2] media: mediatek: vcodec: Using pm_runtime_put instead of pm_runtime_put_sync
|
|
Commit Message
Yunfei Dong (董云飞)
Jan. 14, 2023, 9:41 a.m. UTC
pm_runtime_put will set RPM_ASYNC flag then queue an idle-notification
request again, won't return error immediately until current request is
scheduled.
But pm_runtime_put_sync run the ->runtime_idle() callback directly, return
error immediately no matter whether current request is scheduled.
Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
---
changed with v1:
- No need to print error log when the return value is -EAGAIN
---
drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_pm.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_pm.c b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_pm.c index 4305e4eb9900..777d445999e9 100644 --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_pm.c +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_pm.c @@ -72,9 +72,9 @@ static void mtk_vcodec_dec_pw_off(struct mtk_vcodec_pm *pm) { int ret; - ret = pm_runtime_put_sync(pm->dev); - if (ret) - mtk_v4l2_err("pm_runtime_put_sync fail %d", ret); + ret = pm_runtime_put(pm->dev); + if (ret && ret != -EAGAIN) + mtk_v4l2_err("pm_runtime_put fail %d", ret); } static void mtk_vcodec_dec_clock_on(struct mtk_vcodec_pm *pm)