mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] media: camss: three fixes for the CSID power and VFE streaming paths
@ 2026-10-29 12:31 Qianhui Xu
  2026-10-29 12:31 ` [PATCH 1/3] media: camss: csid: unwind the power-on path through a single error label Qianhui Xu
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Qianhui Xu @ 2026-10-29 12:31 UTC (permalink / raw)
  To: linux-media
  Cc: Mauro Carvalho Chehab, Bryan O'Donoghue, Vladimir Zapolskiy,
	Loic Poulain, linux-arm-msm, linux-kernel

These three patches are fixes found while bringing camss up on a new SoC,
but none of them depends on that new SoC support: each one is against code
that already exists in mainline and can be reviewed on its own.

As posted earlier, the SM8750 specific patches of the previous series are
withdrawn and that work stays with the existing upstream series:
<179325717815.489400.16602455641444097904@mail.ustc.edu.cn>.

1/3 csid: the power-on path repeats its cleanup sequence in every error
    branch and gets the first one wrong: when pm_runtime_resume_and_get()
    fails, the parent device reference taken by parent_dev_ops->get() is
    never dropped, so the VFE stays powered.  Fold the four open-coded
    blocks into a single label chain and route the pm_runtime failure
    through the parent put as well.

2/3 video: the write master of the newer VFE generations can only be
    programmed with a physically contiguous payload, because the frame
    increment registers describe one linear address range.  A buffer whose
    plane was not contiguous was silently written past the end of the
    first scatterlist entry.  Reject such buffers instead, and add a
    prepare_buffer() video operation so SoC code can add its own
    alignment requirements after the generic checks.

    For the contiguity requirement that Bryan asked to see cited: the
    downstream write master driver (camera-kernel
    drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_bus/cam_vfe_bus_ver3.c)
    programs each write master with a single frame increment of
    stride * height (line 3865) and aligns it to 256 bytes (line 3908),
    with no per-fragment addressing.  If this citation is not considered
    sufficient, patch 2/3 will be dropped.

3/3 video: when one subdevice fails to start, the ones already started
    further up the pipeline were left streaming and the next start tried
    to start them again.  Factor the teardown loop out of
    video_stop_streaming() and run it from the error path; also keep
    stopping the remaining subdevices when one of them fails to stop
    instead of returning early.

All three are build tested with W=1 on drivers/media/platform/qcom/camss/
and apply cleanly on v7.3-rc7.  They touch only camss-csid.c and
camss-video.c, which no patch of the Kaanapali series (v23) or of the
SM8450 series changes, so they apply independently of both.

This series intentionally contains no SoC enablement, no DT binding and no
CSIPHY change; those are being discussed in separate threads.

Qianhui Xu (3):
  media: camss: csid: unwind the power-on path through a single error
    label
  media: camss: video: check that a buffer is DMA contiguous and add a
    prepare hook
  media: camss: video: stop the subdevices already started when a start
    fails

 .../media/platform/qcom/camss/camss-csid.c    | 45 +++++------
 .../media/platform/qcom/camss/camss-video.c   | 78 +++++++++++--------
 .../media/platform/qcom/camss/camss-video.h   |  1 +
 3 files changed, 68 insertions(+), 56 deletions(-)

-- 
2.53.0


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

end of thread, other threads:[~2026-10-29 15:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-29 12:31 [PATCH 0/3] media: camss: three fixes for the CSID power and VFE streaming paths Qianhui Xu
2026-10-29 12:31 ` [PATCH 1/3] media: camss: csid: unwind the power-on path through a single error label Qianhui Xu
2026-10-29 12:31 ` [PATCH 2/3] media: camss: video: check that a buffer is DMA contiguous and add a prepare hook Qianhui Xu
2026-10-29 13:01   ` Loic Poulain
2026-10-29 14:02   ` Bryan O'Donoghue
2026-10-29 12:31 ` [PATCH 3/3] media: camss: video: stop the subdevices already started when a start fails Qianhui Xu
2026-10-29 15:00   ` Loic Poulain

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

all inboxes | Powered by JetHome®