Skip to content

media: atomisp: remove the circbuf library

Rareș-Mihai Vladu linux-media linux-staging lkml 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest5 patches 3 repliesIn review
  2. v35 patches 4 repliesSuperseded
  3. v24 patches 2 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v14 patches5 repliesSuperseded

Changes in v4 from the cover letter

- Patch 2: tidy up the moved code: drop redundant parentheses and '!= 0' comparisons, use !ptr instead of comparing to NULL, and return the final ia_css_queue_store() call directly, as Andy suggested
- Add Andy's Reviewed-by to patches 2-4, thanks!

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5media: atomisp: sh_css_mipi: include assert_support.h directlydrivers/staging/media/atomisp/pci/sh_css_mipi.c+1 -00 replies
2/5media: atomisp: queue: move remote queue handling into helpersdrivers/staging/media/atomisp/pci/runtime/queue/src/queue.c+226 -1761 reply
3/5media: atomisp: queue: remove unused local queue supportdrivers/staging/media/atomisp/pci/runtime/queue/interface/ia_css_queue.h drivers/staging/media/atomisp/pci/runtime/queue/interface/ia_css_queue_comm.h drivers/staging/media/atomisp/pci/runtime/queue/src/queue.c +1 more+8 -2340 replies
4/5media: atomisp: queue: move circbuf types and helpers to queue_comm.hdrivers/staging/media/atomisp/pci/runtime/queue/interface/ia_css_queue_comm.h drivers/staging/media/atomisp/pci/runtime/queue/src/queue.c drivers/staging/media/atomisp/pci/runtime/queue/src/queue_access.c +2 more+130 -60 replies
5/5media: atomisp: remove unused circbuf librarydrivers/staging/media/atomisp/Makefile drivers/staging/media/atomisp/pci/base/circbuf/interface/ia_css_circbuf.h drivers/staging/media/atomisp/pci/base/circbuf/interface/ia_css_circbuf_comm.h +2 more+0 -8930 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchAndy Shevchenko
1/5R-b
2/5R-b
3/5R-b
4/5R-b
5/5R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/5] media: atomisp: remove the circbuf library

Thanks to Andy for suggesting, in review of my earlier typedef patch [1], that I look at converting the custom circbuf code to circ_buf or kfifo, and for reviewing the previous versions.

While looking into it, I found that the circbuf API is only used by the local queue path, and ia_css_queue_local_init() has no callers, so as far as I can tell that path is unused. The remote queues only need the descriptor and element layout shared with the SP firmware and a few small helpers.

So this series first moves the remote queue handling into helpers, then removes the unused local path together with the queue type that no longer seems to serve a purpose, moves the few remaining pieces into ia_css_queue_comm.h and drops base/circbuf/.

checkpatch warns about new typedefs in patch 4 and about MAINTAINERS in patch 5. The typedefs are only moved from ia_css_circbuf_comm.h, which patch 5 deletes, and MAINTAINERS has no entries for the removed files.

Compile-tested only.

This supersedes the typedef patch [1].

Changes in v4:
- Patch 2: tidy up the moved code: drop redundant parentheses and '!= 0' comparisons, use !ptr instead of comparing to NULL, and return the final ia_css_queue_store() call directly, as Andy suggested
- Add Andy's Reviewed-by to patches 2-4, thanks!

Changes in v3:
- New patch 2: move the remote branches into helpers first, so that patch 3 mostly removes code, as Andy suggested
- Generate the patches with --histogram, as Andy suggested
- Patch 1: add Andy's Reviewed-by

Changes in v2 (patch numbers as in v2):
- Patch 1: keep the includes ordered by name, as Andy suggested
- Patch 2: also remove IA_CSS_QUEUE_TYPE_REMOTE, the type field and the type checks, as Andy suggested, and describe in the commit message how the queue handles are initialized and why the struct ia_css_queue size change on 64-bit should not matter
- Patch 3: use u8/u32 and the usual function declaration style in the moved code, as Andy suggested
- Patch 4: add Andy's Reviewed-by

v3: https://lore.kernel.org/all/[email protected]/
v2: https://lore.kernel.org/all/[email protected]/
v1: https://lore.kernel.org/all/[email protected]/

[1] https://lore.kernel.org/all/[email protected]/

Rareș-Mihai Vladu (5):
media: atomisp: sh_css_mipi: include assert_support.h directly
media: atomisp: queue: move remote queue handling into helpers
media: atomisp: queue: remove unused local queue support
media: atomisp: queue: move circbuf types and helpers to queue_comm.h
media: atomisp: remove unused circbuf library

 drivers/staging/media/atomisp/Makefile        |   2 -
 .../base/circbuf/interface/ia_css_circbuf.h   | 363 -----------------
 .../circbuf/interface/ia_css_circbuf_comm.h   |  56 ---
 .../circbuf/interface/ia_css_circbuf_desc.h   | 160 --------
 .../atomisp/pci/base/circbuf/src/circbuf.c    | 312 --------------
 .../runtime/queue/interface/ia_css_queue.h    |  29 --
 .../queue/interface/ia_css_queue_comm.h       | 135 ++++++-
 .../atomisp/pci/runtime/queue/src/queue.c     | 382 ++++++------------
 .../pci/runtime/queue/src/queue_access.c      |   1 -
 .../pci/runtime/queue/src/queue_access.h      |   3 -
 .../media/atomisp/pci/sh_css_internal.h       |   2 +-
 .../staging/media/atomisp/pci/sh_css_mipi.c   |   1 +
 12 files changed, 251 insertions(+), 1195 deletions(-)
 delete mode 100644 drivers/staging/media/atomisp/pci/base/circbuf/interface/ia_css_circbuf.h
 delete mode 100644 drivers/staging/media/atomisp/pci/base/circbuf/interface/ia_css_circbuf_comm.h
 delete mode 100644 drivers/staging/media/atomisp/pci/base/circbuf/interface/ia_css_circbuf_desc.h
 delete mode 100644 drivers/staging/media/atomisp/pci/base/circbuf/src/circbuf.c
Signature · 1 line
2.43.0