From patchwork Tue Aug 15 14:14:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 9902647 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B4160602C9 for ; Wed, 16 Aug 2017 00:26:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A72852891E for ; Wed, 16 Aug 2017 00:26:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9BFD22894E; Wed, 16 Aug 2017 00:26:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 12D022891E for ; Wed, 16 Aug 2017 00:26:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A5ED56E3A3; Wed, 16 Aug 2017 00:26:16 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x232.google.com (mail-wm0-x232.google.com [IPv6:2a00:1450:400c:c09::232]) by gabe.freedesktop.org (Postfix) with ESMTPS id 375586E2CC for ; Tue, 15 Aug 2017 14:16:32 +0000 (UTC) Received: by mail-wm0-x232.google.com with SMTP id i66so10946288wmg.0 for ; Tue, 15 Aug 2017 07:16:31 -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=b+Fk0jEi+gDguhABQP279cWLTvXM+wrVW7+lgmWPObD+DqE5JUq9oFwVVVwSW2agw0 H8BQI1tyAguGHBpt3J/gy/LDT2gtHBCVbyHAuTsph8wbF1F/eKviurqG1JcTAEzFQzaP z32ZT5smwj9QI85+2yxkM/q+pPA0vjlj9gOVjj7cC/pc4VZhjVAN60Z7is+xf2Hzskjl zyZQv6tpQoDFPjTJiCUg3jYhLzhlwtU0eLsO1wYUOB5VImWcOESYpreXlNv6yMS8S7OF 9XnlusMG77HbzXESEqTewBrEF9GGcVbdgLP8gwAscCjmvsj7kr1uowblyjAQ3OLP+/sY oA4g== X-Gm-Message-State: AHYfb5g6ejXqUZMu1GV7D8GhxLhGb3L3MwOZCI+DWsVy7GThUsVuu+05 R/otX6bdmCcgh+CW X-Received: by 10.28.196.138 with SMTP id u132mr1383928wmf.104.1502806590614; Tue, 15 Aug 2017 07:16:30 -0700 (PDT) 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 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 X-Mailman-Approved-At: Wed, 16 Aug 2017 00:26:15 +0000 Cc: guodong.xu@linaro.org, dri-devel@lists.freedesktop.org, Peter Griffin , stable@vger.kernel.org, andrey.konovalov@linaro.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Xinliang Liu ​ --- 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,