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: 736050 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 61BB2CDB465 for ; Thu, 19 Oct 2023 08:36:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232941AbjJSIgx (ORCPT ); Thu, 19 Oct 2023 04:36:53 -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/fATBsSdzf8ZJpcFkTdWQRl0cPFqW3ylhFO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ifmLUTLJI1FQjkDX8/Wtw62eB1icEmm8yYhtvY4xokK4uzbOY8/vzwfVVg+S5bKn+Oc4XQX3IpPKSVJo05XxgZDYq/R8bhkm3Y87gsgBYfV4ABCwgdbk9PH1ZFzn069pf/SH/x6S4jNbTM3rxCK1cwz8wygScV0QJ6fxFfrUM2uJXsd4LFjj7RIC/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 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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");