[PATCH 1/1 v2] drm/rockchip: dw-mipi-dsi: fix possible un-balanced runtime PM enable

Sandy Huang hjc at rock-chips.com
Sun Nov 26 18:21:37 PST 2017


Thanks, pushed to drm-misc-fixes.

在 2017/11/15 16:24, Mirza Krak 写道:
> In the case where the bind gets deferred we would end up with a
> un-balanced runtime PM enable call.
>
> Fix this by simply moving the pm_runtime_enable call to the end of
> the bind function when all paths have succeeded.
>
> Signed-off-by: Mirza Krak <mirza.krak at endian.se>
> ---
>
> Changes in v2:
> - typos in commit message
>
>   drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c
> index 9a20b9d..f7fc652 100644
> --- a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c
> +++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c
> @@ -1275,8 +1275,6 @@ static int dw_mipi_dsi_bind(struct device *dev, struct device *master,
>           goto err_pllref;
>       }
>
> -    pm_runtime_enable(dev);
> -
>       dsi->dsi_host.ops = &dw_mipi_dsi_host_ops;
>       dsi->dsi_host.dev = dev;
>       ret = mipi_dsi_host_register(&dsi->dsi_host);
> @@ -1291,6 +1289,7 @@ static int dw_mipi_dsi_bind(struct device *dev, struct device *master,
>       }
>
>       dev_set_drvdata(dev, dsi);
> +    pm_runtime_enable(dev);
>       return 0;
>
>   err_mipi_dsi_host:
>





More information about the Linux-rockchip mailing list