public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 00/15] media: qcom: camss: Add parameter passing to remove several outstanding bugs
@ 2023-08-23 10:44 Bryan O'Donoghue
  2023-08-23 10:44 ` [PATCH v3 01/15] media: qcom: camss: Amalgamate struct resource with struct resource_ispif Bryan O'Donoghue
                   ` (14 more replies)
  0 siblings, 15 replies; 63+ messages in thread
From: Bryan O'Donoghue @ 2023-08-23 10:44 UTC (permalink / raw)
  To: rfoss, todor.too, bryan.odonoghue, agross, andersson,
	konrad.dybcio, mchehab, hverkuil-cisco, laurent.pinchart,
	sakari.ailus, andrey.konovalov
  Cc: linux-media, linux-arm-msm, linux-kernel

V3:
- Adds RB/AB as indicated - Konrad
- Replaces >= SDM845 with helper function per discussion - bod/Konrad
- Leaves out constraining VFE clock names sizes. A full pass for resource strings will happen later. - bod
- Clarifies commit log resulting in updated patch title also
  "Add support for setting CSIPHY clock name csiphyX"
  ->
  "Fix support for setting CSIPHY clock name csiphyX"
- Adds patch to remove dead integer return type in vfe_disable()
- Adds patch to comment CSID dt_id meanining which I personally find non-obvious right now - bod

Link: https://git.codelinaro.org/bryan.odonoghue/kernel/-/commits/09e7805a733b488c5dc19b301eb3b77cb0fad3d6

V2:
- Replaces &camss->res with pointer to res - Konrad
- Squashes patch for NULL removal - Konrad
- Left suggestion on ICC initialisation points alone, doesn't seem to fit Konrad/bod

Link: https://git.codelinaro.org/bryan.odonoghue/kernel/-/tree/linux-next-23-08-07-db410c-rb3-camss-dts-v3+maintenance-bugfixes-v2

V1:
- I forgot to include patch # 14 in V0 of this series.
  This patch leverages previous changes to unwind the fixed polling of
  RDI[0..2] allowing driver data to articulate on a per-VFE basis how many
  RDIs to poll.

Link: https://git.codelinaro.org/bryan.odonoghue/kernel/-/tree/linux-next-23-08-07-db410c-rb3-camss-dts-v3+maintenance-bugfixes-v1

V0:
This second series of bugfixes stacks ontop of the Fixes series sent earlier.

Link: https://lore.kernel.org/linux-arm-msm/20230814141007.3721197-1-bryan.odonoghue@linaro.org/T/#t

Rather than send both series as one giant series, I opted to send a pure
Fixes series above, with this second series a non-backport series i.e. no
Fixes tags in this series.

The existing CAMSS code relies on some hard-coded parameters buried inside
of the driver, instead of passed via compat .data as arguably ought to be
the case.

This brittle model is an extending morass of spaghetti code. More than that
in CAMSS Video Front Ends (VFEs) and the number of Raw Data Interfaces
(RDIs) per VFE can vary from SoC to SoC. Indeed sm8250 has VFE and VFE Lite
blocks which have a different number of RDIs per block.

The use of defines as opposed to per-compat parameters inside of ISRs leads
to either under-polling or over-polling the number of RDIs.

On top of all of that we have some hard-coded statements for clock names
which breaks easily.

We can solve the under/over polling loop problem by transitioning loop
controls from macros to parameters passed via probe().

Similarly and unsurprisingly we can also solve the hard-coded clock problem
by adding some string processing routines that take passed arguments.

There is still some additional maintenance work to be done in this driver
but before adding one more SoC the code needs to be made more extensible
and less brittle.

Link: https://git.codelinaro.org/bryan.odonoghue/kernel/-/commits/dc346c7f46c0680bcfb84fded6db97497fffe49a

Bryan O'Donoghue (15):
  media: qcom: camss: Amalgamate struct resource with struct
    resource_ispif
  media: qcom: camss: Start to move to module compat matched resources
  media: qcom: camss: Pass icc bandwidth table as a platform parameter
  media: qcom: camss: Pass remainder of variables as resources
  media: qcom: camss: Pass line_num from compat resources
  media: qcom: camss: Assign the correct number of RDIs per VFE
  media: qcom: camss: Capture VFE CSID dependency in a helper function
  media: qcom: camss: Untangle if/else spaghetti in camss
  media: qcom: camss: Improve error printout on icc_get fail
  media: qcom: camss: Allow clocks vfeN vfe_liteN or vfe_lite
  media: qcom: camss: Functionally decompose CSIPHY clock lookups
  media: qcom: camss: Fix support for setting CSIPHY clock name csiphyX
  media: qcom: camss: Support RDI3 for VFE 17x
  media: qcom: camss: Convert vfe_disable() from int to void
  media: qcom: camss: Comment CSID dt_id field

 .../platform/qcom/camss/camss-csid-gen2.c     |   5 +
 .../media/platform/qcom/camss/camss-csid.c    |  40 ++-
 .../qcom/camss/camss-csiphy-3ph-1-0.c         |   8 +-
 .../media/platform/qcom/camss/camss-csiphy.c  |  67 ++--
 .../media/platform/qcom/camss/camss-ispif.c   |  32 +-
 .../media/platform/qcom/camss/camss-ispif.h   |   4 +-
 .../media/platform/qcom/camss/camss-vfe-170.c |  22 +-
 .../media/platform/qcom/camss/camss-vfe-4-1.c |   2 -
 .../media/platform/qcom/camss/camss-vfe-4-7.c |   2 -
 .../media/platform/qcom/camss/camss-vfe-4-8.c |   2 -
 .../media/platform/qcom/camss/camss-vfe-480.c |  10 +-
 .../platform/qcom/camss/camss-vfe-gen1.c      |   5 +-
 .../platform/qcom/camss/camss-vfe-gen1.h      |   3 +-
 drivers/media/platform/qcom/camss/camss-vfe.c |  83 +++--
 drivers/media/platform/qcom/camss/camss-vfe.h |   2 +-
 .../media/platform/qcom/camss/camss-video.c   |  16 +-
 drivers/media/platform/qcom/camss/camss.c     | 293 +++++++++---------
 drivers/media/platform/qcom/camss/camss.h     |  31 +-
 18 files changed, 352 insertions(+), 275 deletions(-)

-- 
2.41.0


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

end of thread, other threads:[~2023-09-04 19:33 UTC | newest]

Thread overview: 63+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-23 10:44 [PATCH v3 00/15] media: qcom: camss: Add parameter passing to remove several outstanding bugs Bryan O'Donoghue
2023-08-23 10:44 ` [PATCH v3 01/15] media: qcom: camss: Amalgamate struct resource with struct resource_ispif Bryan O'Donoghue
2023-08-26  9:55   ` Konrad Dybcio
2023-08-28 17:30   ` Laurent Pinchart
2023-08-23 10:44 ` [PATCH v3 02/15] media: qcom: camss: Start to move to module compat matched resources Bryan O'Donoghue
2023-08-28 17:33   ` Laurent Pinchart
2023-08-23 10:44 ` [PATCH v3 03/15] media: qcom: camss: Pass icc bandwidth table as a platform parameter Bryan O'Donoghue
2023-08-28 17:35   ` Laurent Pinchart
2023-08-23 10:44 ` [PATCH v3 04/15] media: qcom: camss: Pass remainder of variables as resources Bryan O'Donoghue
2023-08-26  9:57   ` Konrad Dybcio
2023-08-28 17:51   ` Laurent Pinchart
2023-08-23 10:44 ` [PATCH v3 05/15] media: qcom: camss: Pass line_num from compat resources Bryan O'Donoghue
2023-08-28 18:36   ` Laurent Pinchart
2023-08-28 19:31     ` Bryan O'Donoghue
2023-08-23 10:44 ` [PATCH v3 06/15] media: qcom: camss: Assign the correct number of RDIs per VFE Bryan O'Donoghue
2023-08-28 18:43   ` Laurent Pinchart
2023-08-23 10:44 ` [PATCH v3 07/15] media: qcom: camss: Capture VFE CSID dependency in a helper function Bryan O'Donoghue
2023-08-26 10:02   ` Konrad Dybcio
2023-08-26 12:01     ` Bryan O'Donoghue
2023-08-26 12:04       ` Konrad Dybcio
2023-08-26 12:12         ` Bryan O'Donoghue
2023-08-26 12:13           ` Konrad Dybcio
2023-08-26 12:16             ` Bryan O'Donoghue
2023-08-28 18:47   ` Laurent Pinchart
2023-08-28 19:37     ` Bryan O'Donoghue
2023-08-28 19:40       ` Laurent Pinchart
2023-08-28 19:41         ` Bryan O'Donoghue
2023-09-04 10:15         ` Bryan O'Donoghue
2023-08-23 10:44 ` [PATCH v3 08/15] media: qcom: camss: Untangle if/else spaghetti in camss Bryan O'Donoghue
2023-08-26 10:03   ` Konrad Dybcio
2023-08-28 18:51   ` Laurent Pinchart
2023-08-28 19:43     ` Bryan O'Donoghue
2023-09-04 12:24     ` Bryan O'Donoghue
2023-08-23 10:44 ` [PATCH v3 09/15] media: qcom: camss: Improve error printout on icc_get fail Bryan O'Donoghue
2023-08-26 10:05   ` Konrad Dybcio
2023-08-26 12:01     ` Bryan O'Donoghue
2023-08-23 10:44 ` [PATCH v3 10/15] media: qcom: camss: Allow clocks vfeN vfe_liteN or vfe_lite Bryan O'Donoghue
2023-08-26 10:08   ` Konrad Dybcio
2023-08-26 12:05     ` Bryan O'Donoghue
2023-08-28 18:55   ` Laurent Pinchart
2023-08-23 10:44 ` [PATCH v3 11/15] media: qcom: camss: Functionally decompose CSIPHY clock lookups Bryan O'Donoghue
2023-08-26 10:12   ` Konrad Dybcio
2023-08-26 12:07     ` Bryan O'Donoghue
2023-08-26 12:11       ` Konrad Dybcio
2023-08-26 12:14         ` Bryan O'Donoghue
2023-08-26 12:48           ` Konrad Dybcio
2023-08-28 18:59   ` Laurent Pinchart
2023-08-23 10:44 ` [PATCH v3 12/15] media: qcom: camss: Fix support for setting CSIPHY clock name csiphyX Bryan O'Donoghue
2023-08-26 10:13   ` Konrad Dybcio
2023-08-26 12:08     ` Bryan O'Donoghue
2023-08-26 12:12       ` Konrad Dybcio
2023-09-04 19:11         ` Bryan O'Donoghue
2023-09-04 19:32           ` Konrad Dybcio
2023-09-04 19:33             ` Bryan O'Donoghue
2023-08-23 10:44 ` [PATCH v3 13/15] media: qcom: camss: Support RDI3 for VFE 17x Bryan O'Donoghue
2023-08-28 19:03   ` Laurent Pinchart
2023-08-23 10:44 ` [PATCH v3 14/15] media: qcom: camss: Convert vfe_disable() from int to void Bryan O'Donoghue
2023-08-26 10:16   ` Konrad Dybcio
2023-08-23 10:44 ` [PATCH v3 15/15] media: qcom: camss: Comment CSID dt_id field Bryan O'Donoghue
2023-08-26 10:18   ` Konrad Dybcio
2023-08-28 15:34     ` Bryan O'Donoghue
2023-08-28 15:38       ` Konrad Dybcio
2023-08-28 15:43         ` Bryan O'Donoghue

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox