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: 13428454 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 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 4F951CDB465 for ; Thu, 19 Oct 2023 08:37:30 +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: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:In-Reply-To:References: List-Owner; bh=1rXnidr0ktiDHpjDrbuVXBsmc0VjinT74pRZfXuWEYg=; b=aZfQJOwtb6Aybl t0RpKlpXYIccPz28txrQ+vjaewv2yxayMqvM6etnBPqJAyB2PN92Uk54GNLl/RSrVbr9k2D4iA539 KJbU/axBdDr6d/RP/CmwkWGygMMCtm8+GhD1luV+iyOR3vCfn8JDObU9PQP+yosskHo1ynldhJi/P XFWHG9hZQ9iusLmJb1TVIvNwkBovmH1VIdlIYAvL5OXx0gv4JY8YKaWlGih16zDmJRk2WDslCtVxq ZLzPfyHDuItU6GqGWxz2Y1FCfQcB2jiR5PP+AUOwO6lFWj8UxJ3dk82cvUZ6dBfOeYN9bbR3L+05r Nj4+k5Ig4RRw89IFO+Zw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qtOWb-00GjW0-2z; Thu, 19 Oct 2023 08:37:01 +0000 Received: from mail-vi1eur02on2060d.outbound.protection.outlook.com ([2a01:111:f400:fe16::60d] helo=EUR02-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qtOWY-00GjTq-21 for linux-arm-kernel@lists.infradead.org; Thu, 19 Oct 2023 08:36:59 +0000 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/MIbsEjEr2Bnbd46l2lfrW3j7Ls3EmUcnSq1s2lWmlFRJuLsRDCulUxd1YaQ4YA9xxJ6wEsM/FjYWPRzik510652hj26RTWkixhu7vXydB3LwCyS62rkcb3r70g6CrWpXWPiTmkuEZ6ra4LrayloZDyTYV4LttyNd78HYhZGnHii/AVLFhPXcJhE/7Cvrb+g5zNzJVHaJNYP9WmDHSRjgNUAatAujMs4s+wggAuc2uiOeFi174PH5wbBX36sEXJSzaqvLf/YCwE1X0pIUgaL1kF46j0WGk4WrpwtE4bB5DX2KtVHv/2El7EvWjw89i4q4GuvtOe8AG5lfCHqwbJuYwHFhwp7EX0YpTHzzd4LYtIGuJ24A+fJXqdIO0x3Q/76JPEvG5zVB3QrXJNECiqCJB1diGg3ul7l6WWx6vwxaDToeh5glbcZ3pr+K21vonTilT+Y/ns6UNpq7HRwtpMic/6CY04fETDtKzDC2ZmMr7xBSZbE5p+jwJ6i81Wh4D89IMtMO2C661W9/YpM+IOlsWHI7czfNcR4I/St3GobXrxsGkC4cIQp503BauZY5LxeczIw/igPR7Sfg+F5bpZlyzKEs4MWDoJbfE+0q0XuKSc/Ov37y7NuJ/PGRaxGTvl/9ZeFXePEqQ4fi2S+5ggp74CE5P/A32FQgs5DBQ2X/QKDhUrdPHJqjCM4q7R5cNowbXwAq0Q4rCr9FW/qisbt83GhPi1rq+kBZU624UgGYUx7UvfBJO4e8uXcRDqJOW85jT8l/iamkdLZBtCY2baO2SIC1W3Py3kee8N93o87pBsYPZzcP1lQaUHUYIFhd6cZn4dwnGt8koa0qSgqk8G/hsigVbxNutx5CQ/zpwT99m/f8U1vmloL8sZMXo46OzLiyxsL4IqOXVhe9ADK+/mzafEuu2MaaNszkW9HZ/RLz3OlyyN1pZcGfO70wqARu37mFXZfDifmLUTLJI1FQjkDX8/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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231019_013658_665289_A9EEED92 X-CRM114-Status: GOOD ( 13.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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");