]> www.infradead.org Git - users/jedix/linux-maple.git/commit
media: meson: vdec: hevc: Refactor vdec_hevc_start and vdec_hevc_stop
authorRicardo Ribalda <ribalda@chromium.org>
Fri, 16 Aug 2024 12:32:04 +0000 (12:32 +0000)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Sat, 31 Aug 2024 07:40:43 +0000 (09:40 +0200)
commit57343cbb09a3ae489c584b2d6039804c2d4d298d
treeb7f11f1de14f9f9efd464cc8a392720cfd3c4890
parentbc24a85d41272c6fac77c07da46882df7cd81799
media: meson: vdec: hevc: Refactor vdec_hevc_start and vdec_hevc_stop

Make a new function __vdec_hevc_start(), that does all the
initialization, except the clock initialization for G12A and SM1.

Factor out all the stop logic, except the clk_disable_unprepare(), to a
new function __vdec_hevc_stop. This allows vdec_hevc_start() to
explicitly celan-out the clock during the error-path.

The following smatch warnings are fixed:

drivers/staging/media/meson/vdec/vdec_hevc.c:227 vdec_hevc_start() warn: 'core->vdec_hevc_clk' from clk_prepare_enable() not released on lines: 227.
drivers/staging/media/meson/vdec/vdec_hevc.c:227 vdec_hevc_start() warn: 'core->vdec_hevcf_clk' from clk_prepare_enable() not released on lines: 227.

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/staging/media/meson/vdec/vdec_hevc.c