linux/drivers/media
Bryan O'Donoghue e53b78e3cf media: qcom: camss: Comment CSID dt_id field
commit f910d3ba78 upstream.

Digging into the documentation we find that the DT_ID bitfield is used to
map the six bit DT to a two bit ID code. This value is concatenated to the
VC bitfield to create a CID value. DT_ID is the two least significant bits
of CID and VC the most significant bits.

Originally we set dt_id = vc * 4 in and then subsequently set dt_id = vc.

commit 3c4ed72a16 ("media: camss: sm8250: Virtual channels for CSID")
silently fixed the multiplication by four which would give a better
value for the generated CID without mentioning what was being done or why.

Next up I haplessly changed the value back to "dt_id = vc * 4" since there
didn't appear to be any logic behind it.

Hans asked what the change was for and I honestly couldn't remember the
provenance of it, so I dug in.

Link: https://lore.kernel.org/linux-arm-msm/edd4bf9b-0e1b-883c-1a4d-50f4102c3924@xs4all.nl/

Add a comment so the next hapless programmer doesn't make this same
mistake.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2024-01-10 17:17:02 +01:00
..
cec media: cec: meson: always include meson sub-directory in Makefile 2023-11-20 11:59:33 +01:00
common media: vb2: frame_vector.c: replace WARN_ONCE with a comment 2023-09-14 23:31:55 +02:00
dvb-core lib/math: Move dvb_math.c into lib/math/int_log.c 2023-07-09 22:47:48 +01:00
dvb-frontends media: dvb: symbol fixup for dvb_attach() 2023-09-09 08:15:11 +01:00
firewire media: firewire: firedtv-avc.c: replace BUG with proper, error return 2023-08-10 07:58:37 +02:00
i2c media: ccs: Correctly initialise try compose rectangle 2023-11-28 17:20:12 +00:00
mc media: mc: Make media_get_pad_index() use pad type flag 2023-05-25 16:21:22 +02:00
mmc media: media/*/Kconfig: sort entries 2022-03-18 05:58:35 +01:00
pci media: cobalt: Use FIELD_GET() to extract Link Width 2023-11-28 17:19:47 +00:00
platform media: qcom: camss: Comment CSID dt_id field 2024-01-10 17:17:02 +01:00
radio media: wl128x: Fix spelling mistake "Transfered" -> "Transferred" 2023-07-19 12:57:48 +02:00
rc media: sharp: fix sharp encoding 2023-11-28 17:20:12 +00:00
spi media updates for v5.18-rc1 2022-03-23 14:51:35 -07:00
test-drivers media: vivid: avoid integer overflow 2023-11-28 17:19:46 +00:00
tuners media: dvb: symbol fixup for dvb_attach() 2023-09-09 08:15:11 +01:00
usb media: gspca: cpia1: shift-out-of-bounds in set_flicker 2023-11-28 17:19:46 +00:00
v4l2-core media: subdev: Don't report V4L2_SUBDEV_CAP_STREAMS when the streams API is disabled 2023-10-11 14:52:57 +02:00
Kconfig media: Kconfig: Make DVB_CORE=m possible when MEDIA_SUPPORT=y 2022-12-07 17:58:46 +01:00
Makefile media: Makefiles: remove extra spaces 2022-03-12 16:59:52 +01:00