Skip to content

media: chips-media: wave5: Handle decoder runtime resume failures

Guangshuo Li linux-media lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 3 repliesIn review
  2. v11 patch 1 replySuperseded

Changes in v2 from the cover letter

- Check all four pm_runtime_resume_and_get() call sites in wave5-vpu-dec.c, as suggested by Nicolas.
- Split the changes into two patches according to the commits that introduced the affected calls.
- Add callback-specific cleanup for runtime resume failures.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2media: chips-media: wave5: Check decoder qbuf runtime resumedrivers/media/platform/chips-media/wave5/wave5-vpu-dec.c+7 -11 reply
2/2media: chips-media: wave5: Check decoder runtime resume errorsdrivers/media/platform/chips-media/wave5/wave5-vpu-dec.c+33 -32 replies

Reviews trailers per patch

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

PatchNicolas Dufresne
1/2R-b
2/2R-b

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

Read the v2 thread

Cover letter [PATCH v2 0/2] media: chips-media: wave5: Handle decoder runtime resume failures

This series checks the return value from every pm_runtime_resume_and_get() call in wave5-vpu-dec.c.

The first patch fixes the capture-buffer queue path introduced by cbb9c0d50e47. The second patch fixes the start-streaming, stop-streaming and device-run paths introduced by 2092b3833487.

On a runtime resume failure, the decoder must not continue accessing VPU registers. Since pm_runtime_resume_and_get() does not retain a runtime PM usage reference on failure, these paths must also avoid calling an unmatched pm_runtime_put_autosuspend().

Each callback now handles the failure according to its interface by returning or completing queued buffers, cleaning up the stop-streaming path without touching hardware, or finishing the current mem2mem job.

v2:
- Check all four pm_runtime_resume_and_get() call sites in wave5-vpu-dec.c, as suggested by Nicolas.
- Split the changes into two patches according to the commits that introduced the affected calls.
- Add callback-specific cleanup for runtime resume failures.

Guangshuo Li (2):
media: chips-media: wave5: Check decoder qbuf runtime resume
media: chips-media: wave5: Check decoder runtime resume errors

.../chips-media/wave5/wave5-vpu-dec.c | 44 +++++++++++++++++--

1 file changed, 40 insertions(+), 4 deletions(-)

--
2.43.0