From patchwork Tue Aug 15 14:14:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 110167 Delivered-To: patches@linaro.org Received: by 10.140.95.78 with SMTP id h72csp5728915qge; Tue, 15 Aug 2017 07:16:31 -0700 (PDT) X-Received: by 10.80.143.101 with SMTP id 92mr27606181edy.68.1502806591043; Tue, 15 Aug 2017 07:16:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502806591; cv=none; d=google.com; s=arc-20160816; b=CJovHNuh8dpCgt5kOjszTfZgKhrV+iv7WzEMsp8KnFoLm2BAwl3gn5sd2yOaAonsG6 5nPHaITRpfuNK6K0MitZZv82fNfmv/9H3dNmqWyXrx9swjJQfMox8r/ZBxsojzJ3B6go l9BeAw+DTEbVUnwUdM2e74YSdz8gyLeHFCAK8hU0fLcjH5WdAP0EQg3mqJ0N7ufOKmUW wENUoVjuo/1DWThd0CLmvCOMcemnvGDezTINj9CP2mICOOLQl6czpJWm5kpXrDlvCsvD lUqu2OI72bFMocf8N/QrHAKrAfecR3Cs1nYq5YqYIFtvWMs4lyKOthi5gfbYFzb4Dq5H TapQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=KQOoZlv2dMqtK2bM2R7BfLpeX7ORA33DufpA/U3ZdpE=; b=yjd98HBdOcreFsO7RkFa96+1iAcKhTTdiawDIVEpXAOLFDMd1fMV+FAeBuZf+gFqU8 0Ns3xDOyqAXkw+gqH+6nkW9k4tb3c7njNEis9Wt/to8plylnF0nHiPZNew1lV46v5hoF hYd5tNsk3jFVEviUJqQAIMeQuyEjpwT3DmAeIecvegAxWDxQ4zXqsHG8/vqDcIB/MUSO Wunl9MaIPGzVNwmRyvyJ8wPMBBodHxqJ26eFR+d+porUrVKB7+hhjxyVjkoPUq76A2xZ Aj+dh+9KrIpNaW4xpGZJbs2BPQoMuG10OukJQveqnIehdXlljyRxW5VNfCFb12HSWPn2 Bhnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IUi7doxq; spf=pass (google.com: domain of peter.griffin@linaro.org designates 2a00:1450:400c:c09::229 as permitted sender) smtp.mailfrom=peter.griffin@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-wm0-x229.google.com (mail-wm0-x229.google.com. [2a00:1450:400c:c09::229]) by mx.google.com with ESMTPS id i6si8174291ede.98.2017.08.15.07.16.30 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Aug 2017 07:16:31 -0700 (PDT) Received-SPF: pass (google.com: domain of peter.griffin@linaro.org designates 2a00:1450:400c:c09::229 as permitted sender) client-ip=2a00:1450:400c:c09::229; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IUi7doxq; spf=pass (google.com: domain of peter.griffin@linaro.org designates 2a00:1450:400c:c09::229 as permitted sender) smtp.mailfrom=peter.griffin@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by mail-wm0-x229.google.com with SMTP id f15so10916122wmg.1 for ; Tue, 15 Aug 2017 07:16:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=KQOoZlv2dMqtK2bM2R7BfLpeX7ORA33DufpA/U3ZdpE=; b=IUi7doxqo65l/crGjWnHUutLUkGRkabjJvrE1aSnPZxkk3Ht8sB+AG9rYrIvPOM0Ku y+51gfpbOkC9vQYLUKoAVTtsBogZN/QQ9tPsuwapS0zWAIIDgrP7PbV5/DJ28QHmN/6s DQ22wVrIUkTSIcwSGimbxYtGXLWm+x8qqAhio= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=KQOoZlv2dMqtK2bM2R7BfLpeX7ORA33DufpA/U3ZdpE=; b=pbHgtWPE5roHw0jZyY6Vmk6Ekyur6mBXeOEktS4J46rgR7VPOeMMACJVJEvbBTUoYg lb75C/z9IyIXR7JI9qBfGlZHVZhwjVqlzbyMboCZ0UWG78CUchFrHifXbQEuPI+pGVaA JnuhaRUhESI1pL818004sRH5pbkWGN6D5zu9GT66eg4H2oRTNivioN7kH6B/vrzERVUd VfEgkdcjqfY2m9a2sCsXVaEJJlY2ZLOKFQzjqSjmaxB5JUmZd819/BgFNDDU0/OKsF+B ToZDA1T9oEvkUUoSWL23oi9L6Ds1GdowBTmsG1Emf1xR+LF8ZuAwWy41PzkskadYnIkR bbvA== X-Gm-Message-State: AHYfb5gVgPZTccKTEJ/I7uIjk2KAXyALJRkSIaOF6N1wYIsP28yWqidB 5vCfY0MCU7tl3ZNRTqA= X-Received: by 10.28.196.138 with SMTP id u132mr1383928wmf.104.1502806590614; Tue, 15 Aug 2017 07:16:30 -0700 (PDT) Return-Path: Received: from localhost.localdomain (cpc89244-aztw30-2-0-cust4998.18-1.cable.virginm.net. [86.31.179.135]) by smtp.gmail.com with ESMTPSA id 36sm8745712wrh.77.2017.08.15.07.16.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 15 Aug 2017 07:16:29 -0700 (PDT) From: Peter Griffin 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: john.stultz@linaro.org, dri-devel@lists.freedesktop.org, andrey.konovalov@linaro.org, guodong.xu@linaro.org, shawn.guo@linaro.org, Peter Griffin , stable@vger.kernel.org Subject: [RESEND PATCH] drm/hisilicon: Ensure LDI regs are properly configured. Date: Tue, 15 Aug 2017 15:14:25 +0100 Message-Id: <1502806465-17772-1-git-send-email-peter.griffin@linaro.org> X-Mailer: git-send-email 2.7.4 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 Tested-by: John Stultz Cc: stable@vger.kernel.org --- drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.7.4 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,