[PATCH] drm: kirin: Fix missing clk_disable_unprepare in ade_power_up()
John Stultz
jstultz at google.com
Fri Dec 2 18:05:57 UTC 2022
On Fri, Dec 2, 2022 at 12:22 AM Shang XiaoJing <shangxiaojing at huawei.com> wrote:
>
> The clk_disable_unprepare() should be called in the error handling of
> ade_power_up(). So as reset_control_assert().
>
> Fixes: 783ad972c9a0 ("drm/hisilicon: Add crtc driver for ADE")
> Signed-off-by: Shang XiaoJing <shangxiaojing at huawei.com>
Looks reasonable to me. Thanks for sending this out!
CC'ing YongQin and Sumit as they have hardware to test against.
Acked-by: John Stultz <jstultz at google.com>
> ---
> drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
> index 871f79a6b17e..439e87923bcf 100644
> --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
> +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
> @@ -229,12 +229,15 @@ static int ade_power_up(struct ade_hw_ctx *ctx)
> ret = reset_control_deassert(ctx->reset);
> if (ret) {
> DRM_ERROR("failed to deassert reset\n");
> + clk_disable_unprepare(ctx->media_noc_clk);
> return ret;
> }
>
> ret = clk_prepare_enable(ctx->ade_core_clk);
> if (ret) {
> DRM_ERROR("failed to enable ade_core_clk (%d)\n", ret);
> + reset_control_assert(ctx->reset);
> + clk_disable_unprepare(ctx->media_noc_clk);
> return ret;
> }
>
> --
> 2.17.1
>
More information about the dri-devel
mailing list