From nobody Sun Feb 8 08:48:57 2026 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0EC8137F0E4 for ; Fri, 30 Jan 2026 12:50:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769777403; cv=none; b=mo+ionfsUSoCewEBdixgNITEHDeWYNJvewwczfuPavkigC/pI+5CBwC0waENtdjtflf7vTGUJsQwTmBi6c8F4AgteAYGPCN5k/c1fBt59g+U8wIDgxT+1uewx3UIjaNHCgkM0rq41ZuHBSwkPvFHi8ZQHDb+Qaz/gSthodSugrE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769777403; c=relaxed/simple; bh=4Y6GlT1FtG8VTSEqElibSSfmV/oqQEBBF3NI80Dhu3w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=s49782BFdZGSVLJbCIoVnotKqKX6RxzAz9j0MCeMCb2jp/KuKXrQQtf+DolUd8xVpTBHrfv3FIAKODEeOXhK+TEuPO8IoaGzWRAXhYldC+bwMVK90xRrb7JAZZ4TwdVjyVNwBc9J1tKkyNvFhFeBFJLocu4/5TSmmTWC/Pj2/uI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=LyJ/9VxK; arc=none smtp.client-ip=209.85.128.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LyJ/9VxK" Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-48068127f00so17705105e9.3 for ; Fri, 30 Jan 2026 04:50:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769777399; x=1770382199; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5ZTvAgzsdLyPVb7r9icvoh5jhK/kCdwgL9RfYNjUTH0=; b=LyJ/9VxKH8qG4HIkajVqD+yx8jJ34L/TPUKCDM5oTP8QdBExhQ2HFUfNkzvM/ynTLQ Nc/GG1r0L8w5mOwzDzCMSa05SI87FacWcIdEi51vGRQGTopwyrUb6DsXZMEVso4ge6l0 pDB0vz6r6GAY8L2RE70H7a2OcoBnv4rKz5ewy3eUq8fck92eF9sKoaq9lrocFk3NzdkZ 95FdMhhVi0Fg+glk3Ac7uldmaAnNFwv3GnxhkZjP2iYrEyG7PWS9rl0zcB8LA1VlR1iR gov8P3jrWxWNX5mV9Gl0LatjHECTNa6R2cMwZX1ZIKGxx/2dPyRWQGQaszTDRX1slLw3 OinQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769777399; x=1770382199; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=5ZTvAgzsdLyPVb7r9icvoh5jhK/kCdwgL9RfYNjUTH0=; b=fFiTm+UPPpLwVKzbm62lQlgPBcPMd3cPDhod5r139v4vTXJukyLDua//6m32dt2ETD AukqcoZ/+IsXhlHxwpo6M2p3410+jjfhynsFN86905x8O3a0lGlu93a3AWTgvfSFmgAr MAJsw87bYHUx50BHt3eVKYiJ88ougtDrovCE6qoLFTLsKOS/D10oPmJI2UVnksY9SXRp VIXnb2GWpV4U7QcSqqiDX17VbdCd/pOjel7z2/i4sjFYNpNpFjvoKDx6wyprxmP5tR2a Vdol0ynOdYfdUHsfvXUu6sk5XYB2DVzoWw6RBdoIyTMttWKs49YzRyzsUVgJTgp0C5VV C11A== X-Gm-Message-State: AOJu0YzcwiDvbaXm+aHbhGsqOQrJ5rqq2H7iY6d9Ax2wBzAcQiqDqbAa a6HnpVBuy6SqR/PWJVZaWdiq7efNEmx1dh/ADYLjHB1QeLem0kVmb9af X-Gm-Gg: AZuq6aKuKA2bSZeaIv1IH46vvoRrBfHFh0HGPQebuW1U7hcDcrIHnXdQEX/mo8Cs1LR /JD/4Fnf2PsgYY/Nycy6lu8Yx8ZoraagK+wsyRJ+tMHYglhWXgKWRDOcE1IG9eWmXD/fw94GmYl r1AyzBsQ2WjOqFChtMPQzGcsaA5lVmWA5AR3y36Wrn6xlsB5OvCKfl+ir5ZHp+/gUCaO0RxSVD0 DXFP9Uhnwou7SVQQlqlD8/H5bTNpNc0S1P3A95HjMHUmmZVYcitAYrp7PcbuymT/T9KLDcwm0CZ s0+mNatLM2x7uTMkesQ2HQu1ksNLd4z3Xjs6HQw5Ub2nLtmKisO86AMIOGBEzSwOWEy/6YoWeQL Yp3xkpAkDG+qAS/yrbI6kiOaQW04Fnq0LuXpI4/mFo+WVV+5WWQG9cUuamUvnOLDtSESl5IxcDq 6H X-Received: by 2002:a05:600c:a08c:b0:477:6374:6347 with SMTP id 5b1f17b1804b1-482db491ef7mr36328755e9.22.1769777398808; Fri, 30 Jan 2026 04:49:58 -0800 (PST) Received: from xeon ([188.163.112.49]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-435e10e4757sm22738783f8f.5.2026.01.30.04.49.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Jan 2026 04:49:58 -0800 (PST) From: Svyatoslav Ryhel To: Thierry Reding , Mikko Perttunen , David Airlie , Simona Vetter , Jonathan Hunter , Sowjanya Komatineni , Luca Ceresoli , Mauro Carvalho Chehab , Greg Kroah-Hartman , Hans Verkuil , Svyatoslav Ryhel Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH v6 04/15] staging: media: tegra-video: csi: move CSI helpers to header Date: Fri, 30 Jan 2026 14:49:21 +0200 Message-ID: <20260130124932.351328-5-clamor95@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260130124932.351328-1-clamor95@gmail.com> References: <20260130124932.351328-1-clamor95@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Move CSI helpers into the header for easier access from SoC-specific video driver parts. Tested-by: Luca Ceresoli # tegra20, parallel ca= mera Signed-off-by: Svyatoslav Ryhel --- drivers/staging/media/tegra-video/csi.c | 11 ----------- drivers/staging/media/tegra-video/csi.h | 10 ++++++++++ 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/staging/media/tegra-video/csi.c b/drivers/staging/medi= a/tegra-video/csi.c index 3c3f6e3fd1ec..894583d48b35 100644 --- a/drivers/staging/media/tegra-video/csi.c +++ b/drivers/staging/media/tegra-video/csi.c @@ -20,17 +20,6 @@ =20 #define MHZ 1000000 =20 -static inline struct tegra_csi * -host1x_client_to_csi(struct host1x_client *client) -{ - return container_of(client, struct tegra_csi, client); -} - -static inline struct tegra_csi_channel *to_csi_chan(struct v4l2_subdev *su= bdev) -{ - return container_of(subdev, struct tegra_csi_channel, subdev); -} - /* * CSI is a separate subdevice which has 6 source pads to generate * test pattern. CSI subdevice pad ops are used only for TPG and diff --git a/drivers/staging/media/tegra-video/csi.h b/drivers/staging/medi= a/tegra-video/csi.h index 609c5952e050..2b4d586d3845 100644 --- a/drivers/staging/media/tegra-video/csi.h +++ b/drivers/staging/media/tegra-video/csi.h @@ -155,6 +155,16 @@ struct tegra_csi { struct list_head csi_chans; }; =20 +static inline struct tegra_csi *host1x_client_to_csi(struct host1x_client = *client) +{ + return container_of(client, struct tegra_csi, client); +} + +static inline struct tegra_csi_channel *to_csi_chan(struct v4l2_subdev *su= bdev) +{ + return container_of(subdev, struct tegra_csi_channel, subdev); +} + void tegra_csi_error_recover(struct v4l2_subdev *subdev); void tegra_csi_calc_settle_time(struct tegra_csi_channel *csi_chan, u8 csi_port_num, --=20 2.51.0