All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Griffin <peter.griffin@linaro.org>
To: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, z.liuxinliang@hisilicon.com,
	zourongrong@gmail.com, kong.kongxinwei@hisilicon.com,
	puck.chen@hisilicon.com, airlied@linux.ie
Cc: stable@vger.kernel.org, john.stultz@linaro.org,
	dri-devel@lists.freedesktop.org, andrey.konovalov@linaro.org,
	fathi.boudra@linaro.org, Peter Griffin <peter.griffin@linaro.org>
Subject: [RESEND PATCH] drm/hisilicon: Ensure LDI regs are properly configured.
Date: Thu, 29 Jun 2017 21:54:38 +0100	[thread overview]
Message-ID: <1498769678-12155-1-git-send-email-peter.griffin@linaro.org> (raw)

This patch fixes the following soft lockup:
  BUG: soft lockup - CPU#0 stuck for 23s! [weston:307]

On weston idle-timeout the IP is powered down and reset
asserted. On weston resume we get a massive vblank
IRQ storm due to the LDI registers having lost some state.

This state loss is caused by ade_crtc_atomic_begin() not
calling ade_ldi_set_mode(). With this patch applied
resuming from Weston idle-timeout works well.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
---
 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 c96c228..72c6357 100644
--- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
+++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
@@ -519,9 +519,12 @@ static void ade_crtc_atomic_begin(struct drm_crtc *crtc,
 {
 	struct ade_crtc *acrtc = to_ade_crtc(crtc);
 	struct ade_hw_ctx *ctx = acrtc->ctx;
+	struct drm_display_mode *mode = &crtc->state->mode;
+	struct drm_display_mode *adj_mode = &crtc->state->adjusted_mode;
 
 	if (!ctx->power_on)
 		(void)ade_power_up(ctx);
+	ade_ldi_set_mode(acrtc, mode, adj_mode);
 }
 
 static void ade_crtc_atomic_flush(struct drm_crtc *crtc,
-- 
2.7.4

WARNING: multiple messages have this Message-ID (diff)
From: peter.griffin@linaro.org (Peter Griffin)
To: linux-arm-kernel@lists.infradead.org
Subject: [RESEND PATCH] drm/hisilicon: Ensure LDI regs are properly configured.
Date: Thu, 29 Jun 2017 21:54:38 +0100	[thread overview]
Message-ID: <1498769678-12155-1-git-send-email-peter.griffin@linaro.org> (raw)

This patch fixes the following soft lockup:
  BUG: soft lockup - CPU#0 stuck for 23s! [weston:307]

On weston idle-timeout the IP is powered down and reset
asserted. On weston resume we get a massive vblank
IRQ storm due to the LDI registers having lost some state.

This state loss is caused by ade_crtc_atomic_begin() not
calling ade_ldi_set_mode(). With this patch applied
resuming from Weston idle-timeout works well.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
---
 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 c96c228..72c6357 100644
--- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
+++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
@@ -519,9 +519,12 @@ static void ade_crtc_atomic_begin(struct drm_crtc *crtc,
 {
 	struct ade_crtc *acrtc = to_ade_crtc(crtc);
 	struct ade_hw_ctx *ctx = acrtc->ctx;
+	struct drm_display_mode *mode = &crtc->state->mode;
+	struct drm_display_mode *adj_mode = &crtc->state->adjusted_mode;
 
 	if (!ctx->power_on)
 		(void)ade_power_up(ctx);
+	ade_ldi_set_mode(acrtc, mode, adj_mode);
 }
 
 static void ade_crtc_atomic_flush(struct drm_crtc *crtc,
-- 
2.7.4

             reply	other threads:[~2017-06-29 20:56 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-29 20:54 Peter Griffin [this message]
2017-06-29 20:54 ` [RESEND PATCH] drm/hisilicon: Ensure LDI regs are properly configured Peter Griffin
2017-06-29 21:10 ` John Stultz
2017-06-29 21:10   ` John Stultz
2017-06-29 21:10   ` John Stultz
2017-06-29 21:10   ` John Stultz
2017-06-30  5:55 ` Greg KH
2017-06-30  5:55   ` Greg KH
2017-06-30  5:55   ` Greg KH
2017-08-15 14:14 Peter Griffin
2017-08-15 14:14 ` Peter Griffin
2017-08-28  8:44 ` Xinliang Liu
2017-08-28  8:51   ` Daniel Vetter
2017-08-28  8:51     ` Daniel Vetter
2017-08-28  8:51     ` Daniel Vetter
2017-08-28  9:27     ` Xinliang Liu
2017-08-28  9:27       ` Xinliang Liu
2017-10-23 17:34       ` Peter Griffin
2017-10-25  1:00         ` liuxinliang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1498769678-12155-1-git-send-email-peter.griffin@linaro.org \
    --to=peter.griffin@linaro.org \
    --cc=airlied@linux.ie \
    --cc=andrey.konovalov@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=fathi.boudra@linaro.org \
    --cc=john.stultz@linaro.org \
    --cc=kong.kongxinwei@hisilicon.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=puck.chen@hisilicon.com \
    --cc=stable@vger.kernel.org \
    --cc=z.liuxinliang@hisilicon.com \
    --cc=zourongrong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.