Message ID | 20240506084918.799544-2-ming.qian@nxp.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A27BAC25B5C for <linux-arm-kernel@archiver.kernel.org>; Mon, 6 May 2024 08:50:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3ay5rMwbCg8zMlJBqnC6sNC6DVIO029lmzuDEsvGESA=; b=yd4z2kVHdHNXm5 hPasmycbC3AbOzQYYR7wJvc2UzF6PaViPWyf4pQrsE5zGvbHqtWPtt4D5FZ3lXDfEajQiJ+/7xdoT 5jQQev2ZsQQ4hG5ySZP7Dp1OUKYTnRHbgHKTurImVxz2/9NgPhQ5xVwIPWZ3UIQonpzs3LE4Wtadu d/Vq1xwZrcOjxzE1UIal6hEBeKOhrH0mny3oIKCkAlzNnTulsXVInsuXNfbHIHPhfkj187HauuYNz cZctVFNu6d6jT1PTs4woeU1tSRKKo7RjyDyZsfPCTcZ50RWeBesZZIc6DEsVR0c0qqNbnOT5xJmzU eKvC+Dfr+UxNZWPIC31g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s3u2q-00000006hLF-3v5j; Mon, 06 May 2024 08:50:00 +0000 Received: from mail-db3eur04on060a.outbound.protection.outlook.com ([2a01:111:f400:fe0c::60a] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s3u2o-00000006hIJ-015A for linux-arm-kernel@lists.infradead.org; Mon, 06 May 2024 08:49:59 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iezDbPtP8WNYJKsa6tJzEzGbWNZ9RQjFJTBsN2pOgzGKxo94wCaQKVhobqeyfhKb4Mys/1fx0mvTvpZvgekePFwsHJfnZc3YpgY7cjIIHqp3+zqXiLXnWwdXXEUnQBb2I3OZ6USzi6/KZy6nUVUifld/ktTF8LGK5Z3/Zp5c6IcSBrNdM47vzyJTPseyiDGm0TdroI4hkCNVy6evbzeeJ5BNjyuvXNv9YHx20CRlNmRj1J8V7zZDIAKKSlXqPkzDaZL5bcohwUxiOt07kyJEmQUaBgCaWp+fg8B52tZix5OuL44e5wt5x+QdwdpFfs3Y+pycM/e5vqtrWgWuWNfuBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=b9YfFe3rFeY2EoSGpF23QQWQydVBAsyfl7fdO+m0dyU=; b=b8KuG8n59+loPrpQ4UuPbAqqWhiXPDuLgiWSUX7q8MLj0lSaYJmRi6Nad/ztg+IxkpIqO30qJXCy5fo2z1ykAsKxZ9b7jxCeO6ER9R5S9KEs9Q833TWawgLlaIayTColnNZWHIQJ57pUjtp8Jg+vXVunmIqpExgCYp4e+px1CqBAv092oMj/kCnmHH+7/SLFuM01nLXUfpbJlVDKMqHAWiJsIluAb40jWDrZvvevWd2Q2mMdgRQxkZpucYLtfoPlfIuhFiWSyfRC1wjMB0MDnG9BIEg5Jj9B4Q3QdXnJzTZWtC7WWWeHa1lAy0LpwTy5neWGJzSnAvJCmX8Jk6ezEg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=b9YfFe3rFeY2EoSGpF23QQWQydVBAsyfl7fdO+m0dyU=; b=aXVQ41h1+IOgo1nOy/UNJHRbhHABSL5z0eOMMG+3t6sxd3r9VDNI4NiMnzYCORIXxXryTjVib2GLbk36DO8IOa/z6towtHfCMp3YruiFdr+XwduCXISUiS7h3C7HFzRE2spQQJtIVK3rTwJJRQaKSHF+tZnJqySfkUJyZUg9gOc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB8254.eurprd04.prod.outlook.com (2603:10a6:102:1cd::24) by AM8PR04MB7812.eurprd04.prod.outlook.com (2603:10a6:20b:245::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.41; Mon, 6 May 2024 08:49:54 +0000 Received: from PAXPR04MB8254.eurprd04.prod.outlook.com ([fe80::8589:eb00:ecf3:b4ca]) by PAXPR04MB8254.eurprd04.prod.outlook.com ([fe80::8589:eb00:ecf3:b4ca%6]) with mapi id 15.20.7544.041; Mon, 6 May 2024 08:49:54 +0000 From: Ming Qian <ming.qian@nxp.com> To: mchehab@kernel.org, hverkuil-cisco@xs4all.nl Cc: nicolas@ndufresne.ca, shawnguo@kernel.org, robh+dt@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, xiahong.bao@nxp.com, eagle.zhou@nxp.com, tao.jiang_2@nxp.com, ming.qian@oss.nxp.com, imx@lists.linux.dev, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 2/3] media: amphion: Remove lock in s_ctrl callback Date: Mon, 6 May 2024 17:49:17 +0900 Message-ID: <20240506084918.799544-2-ming.qian@nxp.com> X-Mailer: git-send-email 2.43.0-rc1 In-Reply-To: <20240506084918.799544-1-ming.qian@nxp.com> References: <20240506084918.799544-1-ming.qian@nxp.com> X-ClientProxiedBy: SG2PR01CA0178.apcprd01.prod.exchangelabs.com (2603:1096:4:28::34) To PAXPR04MB8254.eurprd04.prod.outlook.com (2603:10a6:102:1cd::24) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB8254:EE_|AM8PR04MB7812:EE_ X-MS-Office365-Filtering-Correlation-Id: 690063c6-884d-463c-a301-08dc6da97f9e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|366007|1800799015|7416005|376005|52116005|38350700005; X-Microsoft-Antispam-Message-Info: Ksdd0OiTYRSmozho9ZndmnEQ62evfmTT09hsuSlRlNZzjh3UcVjuhN+IhftvvaGZDB63bLCH6wDYqWQ5ff0sAThd1d/b0ZWuRZJajGNLkcB/onjH7X3M/J78K3R2xIbA/Shg3tXgkdO57SkvRVfHClay3M7/0FzAJd2T/UVXgpibU5J0wRuv6ouXhRECh/hpvyBVd+D+rYp33EJSK1+oJ9MbNHRJ8x0HebHJakcAlFmwTQqN+guAfhU55m79gvViYCT+jvBOXUoGu/KY/45xKUTSxPBuQoFPrq7ETDM+uu9LK1UndtLBRE5xSYqsxZLqbfpiAh8mO0gNXuHkgytGheNinDHGXEWir26JHRNqZOcpbqIEAGzWTMazn1YqhPXu9rzRZLjtJ5ut/00GgCtnZO3bi4c6247CWCmp82VxXrvIc9XmQxTjJ/j4h2/PqA9EJiUQhyWu2+A56tsEoWfSBhOrgMzc8O/uE8qkp0aZg78B+v6Hon1Vw7fI7kb+w2dldjCdfKDr8wOazSCIJTDickDNU0Hiet+IuQP+CWl3nS5fnH2CPOIA2mQfPcrkWEdY2xLMjC+IKJ9jnuEaij6QntoFn4V31JhnJAb7e1Tj/EoGKtKNoyhl43xc6ibVaZb9bdz6Q0LtLgYDBSbBlObff/0RQbJifqonoi7JOShksuwlkp4lUtl1rutik7W+Y1d0HTId3iFkxHwZl1FRZifiY6/dclegrGMU4JS33CLnu9fvrDg1Q99OFkIMQLh5c+ICYhsj3F5+rG4bHNjRB2PvV3L25QDwOBFT5F0qBTaBj0KIdecs2tiwbBJS01apmtVD0Mrk3fz/XE79DqjOd2/+fnlylB8CXGY8nDKe4k46ERoPj1xR5B1pnf3AVYTpcFChglicjuC3vXtgRMngx9DDlu4D7AT8Oj5pXJWLgi+PwUSL5PVtHepeZ8SHA+WzRa8xg1emxRoWl/tVREqI5R02FWQiryHTgg+ESDNsu1B0tV8WWBAOjevjPJ4uDpYiI6RAawlkE5TvE4INYyyce+idzqiXwssjE8686lZl9eFeQ13tlX2pDcB6QtiiApmm2+1bJcfrR9Yp2nIUmeJhN+2is3PjU7+YBodj3DJixh2ztAmF65HaPmcOtsPIdsOYNv9RmPvWPUeAVtuV9Rpa0xtlqSBdLWS4W8wDjVXDAOxqUuZBcGg58hUvQKFERkq8iWrGJlHB2BqDTjyVX5eP/nZna5MziZeXEUt2i4kIH2OaEl5mFoeS/zIqlXZeSVq3nf1am0GRbj8JhLVxDDrMaWifLg4h99OSBabNe0Qkxv3l1GG8vx8RQ1aQROEkwIHycIx0ULeSBcpz4qlv2NqZydTDKg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB8254.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366007)(1800799015)(7416005)(376005)(52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EJVaqVDucMRcSaAujXROrE08zco085Y3r+tkGO7lKGPyraFpDQxciq6DqWUAKGaMqdhTBz0/rDEhv1kF4AlqWv/TTmhI/30l40CN/3oj/+RLuxKm5yAm32gbEtbnoanF3MFyGHLh9Fn/BCU6L4TAdw2nBwtVbVoZuMg6E7kE6g+gPCs7EHF4qtTVnXuqC2V3VbZ6FilTr2xhBX+8Jy7fCmJiRR1B8yF8zA+NO/kT3focdc+9pW15zNppLTnCMFG1rwzvr5oENFdF+LnD+MFOIEoW8YIYCmNajUFbSH2GcyIdRULc0j7BLf/Qy76GIgyntbZDIygR4kIlBaENQUQE58jV5DSpv2ZkLpXXijjuDElYWwvTR3WG05t3w7Nr2AArUcmNg047yXoft5xmcGIjVjNKIAnlMLiWBZfFC0YmSUMbsf1pQER6ELX2kI38Oc+G4NWy6sxaFyeVhV0SdP8Cp/vez4zyhIFdQp1qDk6vQ2/G/S7+aPGZ6nhDkY00j14QrUfYK1WZFBiXtn4SEq5VAKcryxkcBSh65EfW9shxN8fOysg7unvx3qoCdFeusBaUeLA5Pkh1jzmbiUiUQ9X4+qS1IJT42LunAYRHSk2ViR X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 690063c6-884d-463c-a301-08dc6da97f9e X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8254.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2024 08:49:54.0846 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Jflz+0+tGm1mbSDv12wxwrzU/afIrD4V0+eOAtZzwCpi+DvvF0aUpoci2jsNGh9mH3bza1fnY6AXQCy5+4LdoA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7812 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240506_014958_067837_7786C0D9 X-CRM114-Status: GOOD ( 11.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
[v3,1/3] media: v4l2-ctrls: Add average qp control
|
expand
|
diff --git a/drivers/media/platform/amphion/vdec.c b/drivers/media/platform/amphion/vdec.c index a57f9f4f3b87..6a38a0fa0e2d 100644 --- a/drivers/media/platform/amphion/vdec.c +++ b/drivers/media/platform/amphion/vdec.c @@ -195,7 +195,6 @@ static int vdec_op_s_ctrl(struct v4l2_ctrl *ctrl) struct vdec_t *vdec = inst->priv; int ret = 0; - vpu_inst_lock(inst); switch (ctrl->id) { case V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE: vdec->params.display_delay_enable = ctrl->val; @@ -207,7 +206,6 @@ static int vdec_op_s_ctrl(struct v4l2_ctrl *ctrl) ret = -EINVAL; break; } - vpu_inst_unlock(inst); return ret; } diff --git a/drivers/media/platform/amphion/venc.c b/drivers/media/platform/amphion/venc.c index 4eb57d793a9c..16ed4d21519c 100644 --- a/drivers/media/platform/amphion/venc.c +++ b/drivers/media/platform/amphion/venc.c @@ -518,7 +518,6 @@ static int venc_op_s_ctrl(struct v4l2_ctrl *ctrl) struct venc_t *venc = inst->priv; int ret = 0; - vpu_inst_lock(inst); switch (ctrl->id) { case V4L2_CID_MPEG_VIDEO_H264_PROFILE: venc->params.profile = ctrl->val; @@ -579,7 +578,6 @@ static int venc_op_s_ctrl(struct v4l2_ctrl *ctrl) ret = -EINVAL; break; } - vpu_inst_unlock(inst); return ret; }
There is no need to add lock in s_ctrl callback, it has been synchronized by the ctrl_handler's lock, otherwise it may led to deadlock if driver call v4l2_ctrl_s_ctrl(). Signed-off-by: Ming Qian <ming.qian@nxp.com> --- v3 - move this patch from 3/3 to 2/3 to avoid confusion drivers/media/platform/amphion/vdec.c | 2 -- drivers/media/platform/amphion/venc.c | 2 -- 2 files changed, 4 deletions(-)