linux/drivers/media
Bryan O'Donoghue ec162546a7 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:10:37 +01:00
..
cec media: cec: meson: always include meson sub-directory in Makefile 2023-11-20 11:52:15 +01:00
common media: vb2: frame_vector.c: replace WARN_ONCE with a comment 2023-10-06 14:56:56 +02:00
dvb-core media: dvb-core: Fix use-after-free due to race condition at dvb_ca_en50221 2023-06-09 10:34:13 +02:00
dvb-frontends media: dvb: symbol fixup for dvb_attach() 2023-09-13 09:43:01 +02:00
firewire media: Makefiles: remove extra spaces 2022-03-12 16:59:52 +01:00
i2c media: ccs: Correctly initialise try compose rectangle 2023-11-28 17:07:19 +00:00
mc media: mc: Get media_device directly from pad 2023-03-10 09:33:42 +01: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:07:02 +00:00
platform media: qcom: camss: Comment CSID dt_id field 2024-01-10 17:10:37 +01:00
radio media: radio-shark: Add endpoint checks 2023-05-30 14:03:20 +01:00
rc media: sharp: fix sharp encoding 2023-11-28 17:07:19 +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:07:02 +00:00
tuners media: tuners: qt1010: replace BUG_ON with a regular error 2023-09-23 11:11:06 +02:00
usb media: gspca: cpia1: shift-out-of-bounds in set_flicker 2023-11-28 17:07:02 +00:00
v4l2-core media: v4l2-core: Fix a potential resource leak in v4l2_fwnode_parse_link() 2023-09-13 09:42:49 +02:00
Kconfig media: remove reference to CONFIG_EMBEDDED in MEDIA_SUPPORT_FILTER 2022-09-08 18:19:29 +02:00
Makefile media: Makefiles: remove extra spaces 2022-03-12 16:59:52 +01:00