From patchwork Thu Oct 19 08:36:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Qian X-Patchwork-Id: 155375 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2010:b0:403:3b70:6f57 with SMTP id fe16csp239553vqb; Thu, 19 Oct 2023 01:37:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHdPfLiAnEq/Z7ytqPv0+3mFFT7Rzp2lbqvEJWx9YnebTjfU2XZB1dpeHzmofTsGlawrdEd X-Received: by 2002:a05:6870:5b04:b0:1e9:c2bd:f2e8 with SMTP id ds4-20020a0568705b0400b001e9c2bdf2e8mr1432827oab.23.1697704628649; Thu, 19 Oct 2023 01:37:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697704628; cv=pass; d=google.com; s=arc-20160816; b=FMCdupOz0h713xKPjYdHYGCb+fDdaX5G/inRWI0qeXFUBC5LRdsetnBz9uqRvx38nc B4YbMAbB6sqj+C5y0Cc0rM/fKqTkHrRTbjTAlifVrYsda7N2wr997HH4Qwm6vQ7jOso8 JU/6KNd0Crhird9tzhu82F05ZrnzAFNHQhl1dmeBNHIUCuVNbmUA3XTlGQuT0usvoPwY tA7714ppRc2VHh2kGRqJx3tTWve8Xu2pFQK2pOWZr1cOxhLsFmsSip/b0qXegSjue1dC E0qL9oDaQ83uueuvYsQS112JI9OuHviUhpDaCINjN8cGU3nXWgZGtBwzXxA9IzaFuupF HRKA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=WiBsrDiMvQG6nGHZcDZsI/8W1cXfZT8iJfdlQPp1hro=; fh=jHoa7ohAdc4I1E1g0YioNHe/I/s0e2GUxRSPWJZB+k4=; b=gvYZhasIASszWn3/WFG25fKOjYKY8xeSBegOPtWvFONPOZIqT5iAidlxPhzmJmBlkJ NOq3yDbnt2jpFarJ+OpDMzt8NI1iF5Xp5xnCPKvgRycEXNJwG2NsVCd9DnudllAeHTxG kJbZ/y37fR7nE9Z9UIYD30ZhVHGWpQueV+SqjXUVJhiWZ2j2anVp7O7y/lu9SDXILfOb XRk2OiK5x6msmHNNenHDkpZPDUTlz+06QNNJ8vbsyznD44xM3Zs3HcmjgX7dPlfN/jdB lPmorau/mCLUhPWp06rj3tZxl480XGnHUk42eB9BkcCwfhN0psTyndCxTesQQrNesPu1 Hxsw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=PkwEGb62; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id h65-20020a636c44000000b005859aec9406si4030975pgc.16.2023.10.19.01.37.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 01:37:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=PkwEGb62; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 924C081CC86B; Thu, 19 Oct 2023 01:37:07 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232975AbjJSIgy (ORCPT + 24 others); Thu, 19 Oct 2023 04:36:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232850AbjJSIgv (ORCPT ); Thu, 19 Oct 2023 04:36:51 -0400 Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2075.outbound.protection.outlook.com [40.107.241.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2D03129; Thu, 19 Oct 2023 01:36:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fxIhGYgaFq6jnq6fibAuc3+/FLkZw53zHxCRYIstM4feh20xrJSviLQ/ZeTR3aewXFCjssZBSI5v7zi058lNmSLOSsX2WBUBvWMWUPOnJVgGnajSU1yJEIdoziddj1mpk9M7fZeV6EJeipWL3wlkCbVLsYCA0OeYN+RcIXvWeA+unYwuteJF0Mop4hrRGBuOdviZgRLOxy/TCJWDTwYXMxHrEa+XOQnnh3YQDy+AKXG6zWimUms14zh1OxmKVmk7e3jH0LzXW3zs33ZR8c/S6IGFxZuLHWK9Qy4eQtXi0MgVS8eUvI6GQifmc4mHWnvfFxL5dlhB9yNjkaczbn9TNw== 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=WiBsrDiMvQG6nGHZcDZsI/8W1cXfZT8iJfdlQPp1hro=; b=hiHzG7KzqumrcVcKsEdxXsxEw6MIjxEQ6cuIcvfxYyO0cmHCYzyrsMHt3zlzVI/Z/e6ziB315coJoTZCD4qv7fYGofSd3oIBvtYpW6WdM+2atWujzNYSY/iYRvumQU5qKuJsCuLr9lQGAQS62mUFb/eLjjFTbNa0gCR6COfE0aXjH6BtkznyMNuBjoDUtSu8jDWHjh/38EYH/tghfqOsu8DMEV6yNE3/1JVax0eBTwWaG4zm/avoZP+UcA5wFaaSQ/T6f+0INaAbvQNDgSz/Ls/lDFUb8AvDH+NsYktbL/rhXRW9MJgO8Pt/ahq2rzOzotIYf2Wig5ADqdOnHcxZqA== 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=WiBsrDiMvQG6nGHZcDZsI/8W1cXfZT8iJfdlQPp1hro=; b=PkwEGb62OjnGwi2Qlsj44nw2PtfQXkCztPO+OMH8arWbIdeeJJeBVRMUVM2HRqYAeeWn4mbXUEqlLHfi1Zj/NhQzRNe91rNT/mc7tug98+KIOQHPsEYJvDH+xUge8jl45ZnqEqOqHvhhmJxKqV3OVjITn5NUFgeH9sxUOWow5go= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB6341.eurprd04.prod.outlook.com (2603:10a6:20b:d8::14) by AS8PR04MB8724.eurprd04.prod.outlook.com (2603:10a6:20b:42b::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.7; Thu, 19 Oct 2023 08:36:46 +0000 Received: from AM6PR04MB6341.eurprd04.prod.outlook.com ([fe80::6e53:39fc:f010:30d5]) by AM6PR04MB6341.eurprd04.prod.outlook.com ([fe80::6e53:39fc:f010:30d5%4]) with mapi id 15.20.6907.021; Thu, 19 Oct 2023 08:36:46 +0000 From: Ming Qian To: mchehab@kernel.org, mirela.rabulea@oss.nxp.com, hverkuil-cisco@xs4all.nl Cc: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, xiahong.bao@nxp.com, eagle.zhou@nxp.com, tao.jiang_2@nxp.com, ming.qian@oss.nxp.com, linux-imx@nxp.com, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] media: imx-jpeg: Drop initial source change event if capture has been setup Date: Thu, 19 Oct 2023 16:36:36 +0800 Message-Id: <20231019083636.10762-1-ming.qian@nxp.com> X-Mailer: git-send-email 2.38.1 X-ClientProxiedBy: SG2PR01CA0131.apcprd01.prod.exchangelabs.com (2603:1096:4:40::35) To AM6PR04MB6341.eurprd04.prod.outlook.com (2603:10a6:20b:d8::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6PR04MB6341:EE_|AS8PR04MB8724:EE_ X-MS-Office365-Filtering-Correlation-Id: a08754e4-a84a-4bbc-c47a-08dbd07e87cc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: N5j5eiQYpJTAX8Sl7IlXMQ/V4eDG/scE3QLi9IwY6GCPK3OUxQadawzyl0op7sZ6jAIo1pfnexU880yA3ulL8XKGbDmQQwSsioRdTsxE5zkdGgdDD+vTlK91O7kX0Pnuof3aXKDI/Z5bpn5HzIlbPbliCPmCzhabp+NM4cYN9RxWIOCVvOF/LuC/SW3sW5ZSpervSe6bgUMweJJKkeWdThjl4ffdOuYdUCfHnHhQWru00GVQx9aje7hCJpMVI3WbcOA4JpTuiYivHBcxUPPQv/capO5Ejdzqht+nBicollFHps+/TUjcPyHStKxWcZbQBI90yJPVFMhKJhqcTqz7BuH/rqaYRGhZan0Ixh4fYygAlu1Q5dXjIZu5Ui16wjjsyOkveoCjm5zHkxP11F+BON6/b+akX8YqF7IMebT0tSNz1j1LjZOseYepL4aNZDTOmCJuRiahyLde/fUCuos7nzmrrm98igCpyRialF+X4qqkFIoQCmr94oHX+hCgbzN9mYwvMjQyoiRTn1GAcSgOL3EClDMSQpJwMJD4XptOzb/KmdvjjroLefGWeiJY3tDPIo7b69vtW1VdNHqouWTMVY1v7xY5h/hehmKJaYfX0/rdtozivksf/QlSSNy0xA+B X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR04MB6341.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(346002)(376002)(39860400002)(396003)(136003)(230922051799003)(64100799003)(1800799009)(451199024)(186009)(38350700005)(6506007)(86362001)(41300700001)(4326008)(36756003)(2906002)(38100700002)(1076003)(6512007)(26005)(2616005)(52116002)(44832011)(5660300002)(8676002)(6666004)(478600001)(6486002)(8936002)(66556008)(66476007)(316002)(66946007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: qlAO2V6SkQvSXZUbvvDTqNPUiPa6SNmgGTSU/pQ4gX6gjytGkQKrejD+xjWN7fAscAVqm3DAWhzlrmQrwUQvZl4y2Y4SW+QqerMTzzENk0B9RgCYuQJevCsiHkYb1k3lK8Tcm64n1XFKQBz+AezxVl3YswI5OAhJNSPZ3dDyyyS+/0pQ/iDRCpxxF/fATBsSdzf8ZJpcFkTdWQRl0cPFqW3ylhFOsilfYBsJYF7D5BFaA06cvbwuzeoyP4mUu6G9BqANU3OFcWm7L5NVaMnCgDaW9NV9RdwlWst8lmPMUzxDZXiP+OQwnpV3O06CBlR6kDHZvz9WrZS5RxdowTe/MIbsEjEr2Bnbd46l2lfrW3j7Ls3EmUcnSq1s2lWmlFRJuLsRDCulUxd1YaQ4Y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RIC/pjyLnwwBNhrd31mK7f69xEmG0cIoBF5uIzM8pO7EpCmro1oNCHHDWHLqqGkru+hp5MBdf2I5TndHjanRmsr12lvM9xJ8xy6Y5L0NwQoBYuTAaeA X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a08754e4-a84a-4bbc-c47a-08dbd07e87cc X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB6341.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Oct 2023 08:36:46.7152 (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: lmGQZde6rzchfSql1nAhz2WNIdlgnAlsvoMyAk1Pesz4AkziGZTv5rCrnN8YJ5GOUF9I7bPuHJtrsgTS8MI/Iw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8724 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_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 19 Oct 2023 01:37:07 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780172328578781675 X-GMAIL-MSGID: 1780172328578781675 In section 4.5.1.5. Initialization, the step 4 may be skipped and continue with the Capture Setup sequence, so if the capture has been setup, there is no need to trigger the initial source change event, just start decoding, and follow the dynamic resolution change flow if the configured values do not match those parsed by the decoder. And it won't fail the gstreamer pipeline. Fixes: abf5d3c5bcbe ("media: imx-jpeg: notify source chagne event when the first picture parsed") Signed-off-by: Ming Qian --- drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c index c538440abe8d..c87603cb4a6f 100644 --- a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c +++ b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c @@ -1632,6 +1632,9 @@ static int mxc_jpeg_start_streaming(struct vb2_queue *q, unsigned int count) dev_dbg(ctx->mxc_jpeg->dev, "Start streaming ctx=%p", ctx); q_data->sequence = 0; + if (V4L2_TYPE_IS_CAPTURE(q->type)) + ctx->need_initial_source_change_evt = false; + ret = pm_runtime_resume_and_get(ctx->mxc_jpeg->dev); if (ret < 0) { dev_err(ctx->mxc_jpeg->dev, "Failed to power up jpeg\n");