Message ID | 20250210-8qxp_camera-v3-4-324f5105accc@nxp.com (mailing list archive) |
---|---|
State | New |
Headers | show
Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2088.outbound.protection.outlook.com [40.107.20.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 842EE192B8C for <imx@lists.linux.dev>; Mon, 10 Feb 2025 21:00:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.88 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739221212; cv=fail; b=EEHxRa9y2sQKKb6cMjRLTSC2xebBn0wAQ2agHHzuSDi079dRI+lFyHwQV5gc6fdwJNmDsUTGWdy9FrYXJJ8auaPXNaY+f2JG/W5o8Rr5QwOgvcPM6DPSsMvT6xNxSIyMn46aOK6uDc/iyfWYSAdhToE/hWZtJOEFRWycAkTlTaA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739221212; c=relaxed/simple; bh=Ip5M/e71q+Ga2McCkdT3MDC241p4b75hE0vPlSEpQ1I=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=Song860FOJwleH1+Lp2p7iMQecEy/xxgSE2i7sXelozFrExedH+Jy0F/7zfzh7g+nRAwt4JKV9PU0S9DcJx4SgkkxgFGRqS/QcQSsP9ABqp1jHFB0ZEZHQrDaj+ZprJxeJgFW+0S7Nhi+Bfc4xoRFax7W7EnJsE8GW7pkpY85kU= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=H0jQNppM; arc=fail smtp.client-ip=40.107.20.88 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="H0jQNppM" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=rGikZvz/CD0bsAOwSVM0kzev883+hEU2r2Px/lusPsLOU70/zQeFhgeJXsWZAXl4SwpG+rVxB6YsiXzCHP3UDdTIrJafylYShRnkK8d/Dr1Re/S3hBEqKdjb1SrHKQMeNhY1Je4Iz05AAlHIWe+8ykHxd23S3OpEFmEGE7qrim651vSNojLABMej6ihwAs3zDCl2sxiDu4jRNtbWspXZjyPcfV9ckLAW6Ab5BK/hQYA8AqlunjL4+Q6b9C8gXfd+WMB1sLBoXZwhHuovz9e6acBTw9OVR81KHv3otDQAwJdaS7dmB226zEV5oVCc2CAdTyrqvnBSByrEhm43gXiq6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=yB7a+axCJWrVm2CuKydyvWjA9Cn3Zs68tIlrHpWnAVo=; b=TwTbuSWXsGRNK9o24AHgvpxOMI+D7LAJD3Gx7XGa2cZHo8ome4/gvL5PEd8t5bIecqKIblaWe4D5R0TmggNPCJpv16kyRyxNwhZ2uiPLhzGdhrnLRmu1UnXG0qMVRuhPfMaUrH6AyA6hIxn7I8h2CRZ1XZXfJSTfGWiHUKL44QCBMrIKw0B8DekMeshdnYIoFQUJIO6VOvTKdqL9RULXedUFP03FZ3i0wnTlzDg6ouW20SrBiH9XnfhwmoeK6JBafsCy22UFBK30SCiDJW51IZg1c5Pd7oxUn+eKYuVte8UAPTKwXHK2n4HiQ3r3R60HusxpeQJI65QQhynzGilcqA== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yB7a+axCJWrVm2CuKydyvWjA9Cn3Zs68tIlrHpWnAVo=; b=H0jQNppMSzjr+1MaubAuBPun3vfwXkdra7CLRS6FMJ91+A9BR0Jx28HJS2yPMdu5wx7cdzXT0xD+XELXXHsNJKby+9wYX00W0UPoLXld8kMX0uf7gY22B7ylehq1cnCz58AX6fo+C2RCdLg6wo91Jqb2yFK5uK/mCYndsH3G82BLUcJhk48lOnAYu/f8wP6dHqQPHNbe+wz44VhJFeFhdjt95D0bqYJOQuA2uXgmSfNJZE3tYxJxMQQYcpjL+eKJGDlXl3cLhJ95Fyl9xmAmi+Xi4rTJUAPdxfvBfHlZpMb6bOKvd/N50M3BN92Ox9OCuaNch+Io0lU0YahTbQ2Jnw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by DBAPR04MB7462.eurprd04.prod.outlook.com (2603:10a6:10:1a0::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8422.19; Mon, 10 Feb 2025 21:00:08 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%6]) with mapi id 15.20.8422.012; Mon, 10 Feb 2025 21:00:08 +0000 From: Frank Li <Frank.Li@nxp.com> Date: Mon, 10 Feb 2025 15:59:23 -0500 Subject: [PATCH v3 04/12] media: nxp: imx8-isi: Allow num_sources to be greater than num_sink Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20250210-8qxp_camera-v3-4-324f5105accc@nxp.com> References: <20250210-8qxp_camera-v3-0-324f5105accc@nxp.com> In-Reply-To: <20250210-8qxp_camera-v3-0-324f5105accc@nxp.com> To: Rob Herring <robh@kernel.org>, Krzysztof Kozlowski <krzk+dt@kernel.org>, Conor Dooley <conor+dt@kernel.org>, Dong Aisheng <aisheng.dong@nxp.com>, Philipp Zabel <p.zabel@pengutronix.de>, Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix Kernel Team <kernel@pengutronix.de>, Fabio Estevam <festevam@gmail.com>, Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Mauro Carvalho Chehab <mchehab@kernel.org>, Rui Miguel Silva <rmfrfs@gmail.com>, Martin Kepplinger <martink@posteo.de>, Purism Kernel Team <kernel@puri.sm> Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, Robert Chiras <robert.chiras@nxp.com>, "Guoniu.zhou" <guoniu.zhou@nxp.com>, Frank Li <Frank.Li@nxp.com> X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1739221181; l=2071; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=Ip5M/e71q+Ga2McCkdT3MDC241p4b75hE0vPlSEpQ1I=; b=rbAxdMs1Bj1tn5HYKw8GUPdn+YbiwOvl59t7ywy0NM05A6APLhiPeAXLstINFe94ve+IUe7Kr /J/JOUBqpAgAUfFZkWLfa+g3wTQnjg4PpV1M7x8UIjryW7O/anzn5q+ X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BY3PR03CA0009.namprd03.prod.outlook.com (2603:10b6:a03:39a::14) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: <imx.lists.linux.dev> List-Subscribe: <mailto:imx+subscribe@lists.linux.dev> List-Unsubscribe: <mailto:imx+unsubscribe@lists.linux.dev> MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|DBAPR04MB7462:EE_ X-MS-Office365-Filtering-Correlation-Id: 4933386a-5479-4244-9ca5-08dd4a15e69e X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|52116014|366016|1800799024|38350700014|921020; X-Microsoft-Antispam-Message-Info: =?utf-8?q?E62UV3pf6nF9uU4TTTH0TLSGlsjccXG?= =?utf-8?q?1cQfsvY+Lcaslq247qzWkoe+Si2GbIpC0zxYvVnEK++6Bm9ODGFa6fAg+yi1bQ4/N?= =?utf-8?q?YgWr+tHTcwhIwGgDnwlkOdDt6MbSEMsSHZ1zgeVYt0WBflZlP59qulo1SyKnwtLfK?= =?utf-8?q?mmxWhsfgvcTHlUbEfMPXVvLXTg+Zapnf+96vSQNfnKIaAhSmBEGsCG75ozq7z6Xbp?= =?utf-8?q?qW9NrQjqhPf4aR9EU+FRi2YIMjB5CGMaRH5h/47+udT+ZrO95Mtqtl68un9q9MxgE?= =?utf-8?q?EUIjxiTzaZl5W26rW3RYXz9w6xapSpmQpA8ONhatq4st9x82+sAoROFt1TjqrGHaV?= =?utf-8?q?cL5tA1nmDa+5Rk1Ly70o/0Ag9J7z+473hkbM/ufX3SikKue65J/84lo1647KCcICt?= =?utf-8?q?WuXqtssoHvI061vZtAUbOPw6pnCBY1sJwfqNoHC+ftEhRS2/p3uHHvNPvAHt54KQh?= =?utf-8?q?7Q9FVTK5CcEOP1wnv1BP7Qyfz76KATXv1eCgY0ZlK8GWSxY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A68JUldnWHEJznNlTbtMtjJ?= =?utf-8?q?A09Gnh4YQ+8A3QuByboDTP1C7sB2upDyw=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(7416014)(52116014)(366016)(1800799024)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?8eI+O8bGdGoy7qqN36JRYESKPgcs?= =?utf-8?q?yYu2khlMkhvUb7eSSjtmUsr2qCT/AJeIPxV5rDusUDqe9C4I0XXaVwLgaSAO73A0p?= =?utf-8?q?cr8nr7byg+O9+Vf2tsl/L785dBmrqR4tFTvEqaytOAN3RP3iCSWQSp3k8Fjv+c5MZ?= =?utf-8?q?DI+RbgXDz1i9CpiX46mD1ZlNJeMx5mCxko/wwK+WK19WG0g/PRD5CGNRnLWpKyShm?= =?utf-8?q?+hlP5T/qqr6ZeFGw0nOzoX1kCqFq+32/HI/OSlp2Xzde9gQXMtc5MGh5tL925iMcS?= =?utf-8?q?r3Qt/tFQ/LT7WsrBDmoOdbEIFOVVBGXaO8kUMVX2oYRWqNG8YdODzPeyPvHfwgc/y?= =?utf-8?q?5xIQixI0XvZuqARhYE28377ZxXQFHDh+awDaOnofe8ycRQ1bxf61FfG4dWEjrqnYd?= =?utf-8?q?gPuenXEDw6r7os7oNl3sIZskOc8f25lvqdt0rSMX8OcpZTf4B/vVOkd9bEm2e3527?= =?utf-8?q?tOfwkuyQhWcfV0io4Z2yZjNQ1FKSgt7FjrivWqkaMJVJeJy4EIUvkx82T8GsL+vmn?= =?utf-8?q?kTSJePulsYKURMg3/+YhU8vMaLfx70d+B6RjY4er87+TEy1mBnEBsD7vaG3pe5yPT?= =?utf-8?q?eWG8pQ/VAdZJJgQjEJtbiQcyZRr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uanjrznX9nHz9/+vTrhiZIJ7lnhWbHmlazM5OK?= =?utf-8?q?RyGKqBy5Te/6?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4933386a-5479-4244-9ca5-08dd4a15e69e X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Feb 2025 21:00:08.1479 (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: sxnVAfgT/tyeXWtzF/xwZ9tKclNTZ56syLvqCb2AAZkjqVEHerSDvjFQG8fouoG2FCx49OFoq/giSwsIIZ+WOg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR04MB7462 |
Series |
media: imx8: add camera support
|
expand
|
diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c index 93a55c97cd173..ba5b2d3617a23 100644 --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c @@ -188,11 +188,11 @@ static int mxc_isi_crossbar_init_state(struct v4l2_subdev *sd, * Create a 1:1 mapping between pixel link inputs and outputs to * pipelines by default. */ - routes = kcalloc(xbar->num_sources, sizeof(*routes), GFP_KERNEL); + routes = kcalloc(xbar->num_sinks - 1, sizeof(*routes), GFP_KERNEL); if (!routes) return -ENOMEM; - for (i = 0; i < xbar->num_sources; ++i) { + for (i = 0; i < xbar->num_sinks - 1; ++i) { struct v4l2_subdev_route *route = &routes[i]; route->sink_pad = i; @@ -200,7 +200,7 @@ static int mxc_isi_crossbar_init_state(struct v4l2_subdev *sd, route->flags = V4L2_SUBDEV_ROUTE_FL_ACTIVE; } - routing.num_routes = xbar->num_sources; + routing.num_routes = xbar->num_sinks - 1; routing.routes = routes; ret = __mxc_isi_crossbar_set_routing(sd, state, &routing); @@ -453,7 +453,7 @@ int mxc_isi_crossbar_init(struct mxc_isi_dev *isi) * the memory input. */ xbar->num_sinks = isi->pdata->num_ports + 1; - xbar->num_sources = isi->pdata->num_ports; + xbar->num_sources = isi->pdata->num_channels; num_pads = xbar->num_sinks + xbar->num_sources; xbar->pads = kcalloc(num_pads, sizeof(*xbar->pads), GFP_KERNEL);
Allow num_sources (drvdata: num_channels) to be greater than num_sink (drvdata: num_ports + 1). ISI support stream multiplexing, such as differentiates multiple cameras from a single 2-lane MIPI input, or duplicates input stream into multiple outputs. So num_channels may be greater than num_ports at some platform. Signed-off-by: Frank Li <Frank.Li@nxp.com> --- change from v1 to v3 - none --- drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)