]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
media: rcar-csi2: Simplify rcsi2_calc_mbps()
authorTomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
Thu, 15 Jan 2026 10:07:00 +0000 (12:07 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 11 Mar 2026 00:05:31 +0000 (01:05 +0100)
commit21bcc9355cae73637e42865ee2c61d48d209a91d
tree2cf1f635cb7ed0ac3e11d227aea0ab4518afa53d
parent0ffd7f4c4c3b4ab55b34d6f27b15e65ba75c10ea
media: rcar-csi2: Simplify rcsi2_calc_mbps()

Instead of taking the bpp and the number of lanes as parameters to
rcsi2_calc_mbps(), change the function to get those parameters inside
the function. This centralizes the code a bit and makes it easier to add
streams support.

Also, in the future when the legacy (non-link-freq) code is removed,
there will be no need to change rcsi2_calc_mbps() parameters.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/renesas/rcar-csi2.c