57343cbb | 16-Aug-2024 |
Ricardo Ribalda <ribalda@chromium.org> |
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.
Fa
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>
show more ...
|