linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm: sti: sti_hqvdp: undo preparation of a clock source.
@ 2017-06-21 10:15 Arvind Yadav
  2017-06-21 13:55 ` Benjamin Gaignard
  0 siblings, 1 reply; 2+ messages in thread
From: Arvind Yadav @ 2017-06-21 10:15 UTC (permalink / raw)
  To: benjamin.gaignard, vincent.abriou, airlied; +Cc: dri-devel, linux-kernel

Undo preparation of a clock source, if sti_hqvdp_start_xp70 and
sti_hqvdp_atomic_check are not successful.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/gpu/drm/sti/sti_hqvdp.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/sti/sti_hqvdp.c b/drivers/gpu/drm/sti/sti_hqvdp.c
index 075802d..8dbb34d 100644
--- a/drivers/gpu/drm/sti/sti_hqvdp.c
+++ b/drivers/gpu/drm/sti/sti_hqvdp.c
@@ -959,6 +959,7 @@ static void sti_hqvdp_start_xp70(struct sti_hqvdp *hqvdp)
 	}
 	if (i == POLL_MAX_ATTEMPT) {
 		DRM_ERROR("Could not reset\n");
+		clk_disable_unprepare(hqvdp->clk);
 		goto out;
 	}
 
@@ -995,6 +996,7 @@ static void sti_hqvdp_start_xp70(struct sti_hqvdp *hqvdp)
 	}
 	if (i == POLL_MAX_ATTEMPT) {
 		DRM_ERROR("Could not boot\n");
+		clk_disable_unprepare(hqvdp->clk);
 		goto out;
 	}
 
@@ -1082,6 +1084,7 @@ static int sti_hqvdp_atomic_check(struct drm_plane *drm_plane,
 					    &hqvdp->vtg_nb,
 					    crtc)) {
 			DRM_ERROR("Cannot register VTG notifier\n");
+			clk_disable_unprepare(hqvdp->clk_pix_main);
 			return -EINVAL;
 		}
 		hqvdp->vtg_registered = true;
-- 
1.9.1

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

* Re: [PATCH] drm: sti: sti_hqvdp: undo preparation of a clock source.
  2017-06-21 10:15 [PATCH] drm: sti: sti_hqvdp: undo preparation of a clock source Arvind Yadav
@ 2017-06-21 13:55 ` Benjamin Gaignard
  0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Gaignard @ 2017-06-21 13:55 UTC (permalink / raw)
  To: Arvind Yadav
  Cc: Vincent Abriou, David Airlie, dri-devel, Linux Kernel Mailing List

2017-06-21 12:15 GMT+02:00 Arvind Yadav <arvind.yadav.cs@gmail.com>:
> Undo preparation of a clock source, if sti_hqvdp_start_xp70 and
> sti_hqvdp_atomic_check are not successful.
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>

Applied on drm-misc-next, thanks,

Benjamin

> ---
>  drivers/gpu/drm/sti/sti_hqvdp.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/sti/sti_hqvdp.c b/drivers/gpu/drm/sti/sti_hqvdp.c
> index 075802d..8dbb34d 100644
> --- a/drivers/gpu/drm/sti/sti_hqvdp.c
> +++ b/drivers/gpu/drm/sti/sti_hqvdp.c
> @@ -959,6 +959,7 @@ static void sti_hqvdp_start_xp70(struct sti_hqvdp *hqvdp)
>         }
>         if (i == POLL_MAX_ATTEMPT) {
>                 DRM_ERROR("Could not reset\n");
> +               clk_disable_unprepare(hqvdp->clk);
>                 goto out;
>         }
>
> @@ -995,6 +996,7 @@ static void sti_hqvdp_start_xp70(struct sti_hqvdp *hqvdp)
>         }
>         if (i == POLL_MAX_ATTEMPT) {
>                 DRM_ERROR("Could not boot\n");
> +               clk_disable_unprepare(hqvdp->clk);
>                 goto out;
>         }
>
> @@ -1082,6 +1084,7 @@ static int sti_hqvdp_atomic_check(struct drm_plane *drm_plane,
>                                             &hqvdp->vtg_nb,
>                                             crtc)) {
>                         DRM_ERROR("Cannot register VTG notifier\n");
> +                       clk_disable_unprepare(hqvdp->clk_pix_main);
>                         return -EINVAL;
>                 }
>                 hqvdp->vtg_registered = true;
> --
> 1.9.1

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

end of thread, other threads:[~2017-06-21 13:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-21 10:15 [PATCH] drm: sti: sti_hqvdp: undo preparation of a clock source Arvind Yadav
2017-06-21 13:55 ` Benjamin Gaignard

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).