dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/bridge: nwl-dsi: Fix PM disable depth imbalance in nwl_dsi_probe
@ 2022-01-05 10:48 Miaoqian Lin
  2022-01-05 17:51 ` Robert Foss
  0 siblings, 1 reply; 2+ messages in thread
From: Miaoqian Lin @ 2022-01-05 10:48 UTC (permalink / raw)
  Cc: linmq006, Jernej Skrabec, dri-devel, Jonas Karlman, David Airlie,
	Sam Ravnborg, Guido Günther, Neil Armstrong, linux-kernel,
	Robert Foss, Andrzej Hajda, Laurent Pinchart, Robert Chiras

The pm_runtime_enable will increase power disable depth.
Thus a pairing decrement is needed on the error handling
path to keep it balanced according to context.

Fixes: 44cfc62 ("drm/bridge: Add NWL MIPI DSI host controller support")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
---
 drivers/gpu/drm/bridge/nwl-dsi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/bridge/nwl-dsi.c b/drivers/gpu/drm/bridge/nwl-dsi.c
index a7389a0facfb..fc3ad9fab867 100644
--- a/drivers/gpu/drm/bridge/nwl-dsi.c
+++ b/drivers/gpu/drm/bridge/nwl-dsi.c
@@ -1206,6 +1206,7 @@ static int nwl_dsi_probe(struct platform_device *pdev)
 
 	ret = nwl_dsi_select_input(dsi);
 	if (ret < 0) {
+		pm_runtime_disable(dev);
 		mipi_dsi_host_unregister(&dsi->dsi_host);
 		return ret;
 	}
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/bridge: nwl-dsi: Fix PM disable depth imbalance in nwl_dsi_probe
  2022-01-05 10:48 [PATCH] drm/bridge: nwl-dsi: Fix PM disable depth imbalance in nwl_dsi_probe Miaoqian Lin
@ 2022-01-05 17:51 ` Robert Foss
  0 siblings, 0 replies; 2+ messages in thread
From: Robert Foss @ 2022-01-05 17:51 UTC (permalink / raw)
  To: Miaoqian Lin
  Cc: dri-devel, Jonas Karlman, David Airlie, Sam Ravnborg,
	Guido Günther, Neil Armstrong, linux-kernel, Jernej Skrabec,
	Andrzej Hajda, Laurent Pinchart, Robert Chiras

Hey Miaoqian,

Thanks for submitting this patch!

On Wed, 5 Jan 2022 at 11:48, Miaoqian Lin <linmq006@gmail.com> wrote:
>
> The pm_runtime_enable will increase power disable depth.
> Thus a pairing decrement is needed on the error handling
> path to keep it balanced according to context.
>
> Fixes: 44cfc62 ("drm/bridge: Add NWL MIPI DSI host controller support")

In the future, please use 12 chars of the hash. I'll fix it this time,
but please use 12 characters going forward.

> Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
> ---
>  drivers/gpu/drm/bridge/nwl-dsi.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/bridge/nwl-dsi.c b/drivers/gpu/drm/bridge/nwl-dsi.c
> index a7389a0facfb..fc3ad9fab867 100644
> --- a/drivers/gpu/drm/bridge/nwl-dsi.c
> +++ b/drivers/gpu/drm/bridge/nwl-dsi.c
> @@ -1206,6 +1206,7 @@ static int nwl_dsi_probe(struct platform_device *pdev)
>
>         ret = nwl_dsi_select_input(dsi);
>         if (ret < 0) {
> +               pm_runtime_disable(dev);
>                 mipi_dsi_host_unregister(&dsi->dsi_host);
>                 return ret;
>         }
> --
> 2.17.1
>

Fixed commit hash length, added my r-b and applied to drm-misc-next.

Reviewed-by: Robert Foss <robert.foss@linaro.org>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-05 17:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-05 10:48 [PATCH] drm/bridge: nwl-dsi: Fix PM disable depth imbalance in nwl_dsi_probe Miaoqian Lin
2022-01-05 17:51 ` Robert Foss

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).