All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/3] media: qcom: camss: V4L2_CID_PIXEL_RATE/LINK_FREQ fixes
@ 2021-03-03 17:42 Andrey Konovalov
  2021-03-03 17:42 ` [PATCH v3 1/3] v4l: common: v4l2_get_link_freq: add printing a warning Andrey Konovalov
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Andrey Konovalov @ 2021-03-03 17:42 UTC (permalink / raw)
  To: junak.pub, robert.foss, sakari.ailus
  Cc: todor.too, agross, bjorn.andersson, mchehab, laurent.pinchart,
	jacopo, linux-media, linux-arm-msm, linux-kernel

The first patch adds printing a warning in v4l2_get_link_freq() if
V4L2_CID_LINK_FREQ isn't implemented (this is a mandatory control for
CSI-2 transmitter drivers [1], but many sensor drivers don't have it
currently).

The second patch is the start of the work discussed in the "[RFC] Repurpose
V4L2_CID_PIXEL_RATE for the sampling rate in the pixel array" thread [2].
I'll send the similar patches for the rest of CSI receiver drivers which
use V4L2_CID_PIXEL_RATE to calculate the link frequency as a separate
patchset following this one: I don't have the hardware to test the changes
to these drivers, so the second patchset will be build tested only.

The third patch in this series is the patch by Vladimir Lypak [3] rebased
onto the changes done by the second patch. By replacing getting the pixel
clock with v4l2_get_link_freq() the second patch also fixes the integer
overflow which Vladimir's patch addresses. So the third patch only needs
to fix drivers/media/platform/qcom/camss/camss-vfe.c which the second patch
doesn't touch.

The resulting patchset is free from the "undefined reference to `__udivdi3'"
issue [4] as the u64 value is only divided by a power of 2, which doesn't
need do_div().

This patchset has been tested on db410c board with imx219 and ov5647
sensors (RPi camera modules v2 and v1) attached to AISTARVISION MIPI
Adapter V2.0.

[1] https://linuxtv.org/downloads/v4l-dvb-apis-new/driver-api/csi2.html
[2] https://www.spinics.net/lists/linux-media/msg183183.html
[3] https://www.spinics.net/lists/linux-media/msg186875.html
[4] https://www.spinics.net/lists/linux-media/msg186918.html

Changes in v2:

* Added [PATCH 1/3] v4l: common: v4l2_get_link_freq: add printing a warning

* camss_get_link_freq() changed to take the actual number of lanes as the
  third arg vs the number of lanes multiplied by 2 in the first version

* Fixed checkpatch warnings and bad indentation

Changes in v3:

* The warning message in v4l2_get_link_freq() improved as suggested by
  Jacopo Mondi



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-05-26 19:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-03 17:42 [PATCH v3 0/3] media: qcom: camss: V4L2_CID_PIXEL_RATE/LINK_FREQ fixes Andrey Konovalov
2021-03-03 17:42 ` [PATCH v3 1/3] v4l: common: v4l2_get_link_freq: add printing a warning Andrey Konovalov
2021-03-03 17:42 ` [PATCH v3 2/3] media: camss: use v4l2_get_link_freq() to calculate the relevant clocks Andrey Konovalov
2021-03-03 17:42 ` [PATCH v3 3/3] media: qcom: camss: Fix overflows in clock rate calculations Andrey Konovalov
2021-05-26 19:03 ` [PATCH v3 0/3] media: qcom: camss: V4L2_CID_PIXEL_RATE/LINK_FREQ fixes patchwork-bot+linux-arm-msm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.