From patchwork Thu May 11 10:09:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 99610 Delivered-To: patches@linaro.org Received: by 10.140.96.100 with SMTP id j91csp651074qge; Thu, 11 May 2017 03:09:59 -0700 (PDT) X-Received: by 10.28.69.73 with SMTP id s70mr4025719wma.36.1494497398977; Thu, 11 May 2017 03:09:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494497398; cv=none; d=google.com; s=arc-20160816; b=MuNxY40WO/lgmetVjbKXMRfsspTDAeGm8Lq9oyliM3fLV7KSvkPpzgg5kRDJy0DHdq mv2nDUfIazZwUMeOuc4IFNhBe1fPXQB0YldjWGxL14I+p6q661ZiTdS8EIDkbS/bd/kR fImvJYloNHX/wuxGlgfDe0m5w6svsqOI+GkIEktyA9zVsMAIh83cok0lFhKvoQG6on8H ZbetNzdk0ati5xy76y+1ysnklpMWDLC021MJ43oah8iQjdrz1ZDwX/jQKD9T5883brhf NKGaC3674UdPP2G4Ml9TDX3Jw6hN1U85LiSfymk7ZBoWNyelG6usLRFCtkV+bAuhLIZn GbLg== 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=m0kfILe9k8AMenpk0OTUSWKs2ujdoOSAu4NfRT7G0PI=; b=IQ2fPrgik0FOZ0S+FxRNuYalkTE/HkLwyrfMikTo2Kvg0jGcUVSPtt5AdB2+A1e13p XjACQwq7s93mesnbGB2rdGID0ibGGa59eEXthBU+3rIqQe2hJ9Ci6ojvZI9xKNuVSINq gMiVO0wb8IbAo5rYWRZpyWbLPl/sBeXu9DKaiC8znosC0VfdV6yTbLFnLSUP7GHqLQnE +FsBsB85ADtvC4TcGQcbQg/e8f/uNS6YhBwpBlGCRM6MKPrRmaVMbWHRqXtMu7KgUN8h yXHbrW7IOR2sAkWMQowpcivUUebB14s1Cx6bjP6n4WcXzW9pUY7S3NC80PYnyzHAtnRu KO3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of peter.griffin@linaro.org designates 2a00:1450:400c:c0c::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-wr0-x229.google.com (mail-wr0-x229.google.com. [2a00:1450:400c:c0c::229]) by mx.google.com with ESMTPS id z141si151336wmd.124.2017.05.11.03.09.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 May 2017 03:09:58 -0700 (PDT) Received-SPF: pass (google.com: domain of peter.griffin@linaro.org designates 2a00:1450:400c:c0c::229 as permitted sender) client-ip=2a00:1450:400c:c0c::229; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of peter.griffin@linaro.org designates 2a00:1450:400c:c0c::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-wr0-x229.google.com with SMTP id l9so16390561wre.1 for ; Thu, 11 May 2017 03:09:58 -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=m0kfILe9k8AMenpk0OTUSWKs2ujdoOSAu4NfRT7G0PI=; b=KNLbVdwyaOP65c6N+rwAAWoB5GTsMD/3vGch08oG3IXsxcgaUoy4l9OZopFGqLZcZv bq/1jNGkboiP6wOQ5s2V4e7V4CIu6e5QCOwaNkGof8vR2WaQlirCw5rN+VkpILvSjGXS fBDxR04BM7SI9UARjnXY3fMiplAtknHO/QDt4= 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=m0kfILe9k8AMenpk0OTUSWKs2ujdoOSAu4NfRT7G0PI=; b=kIa9q4IhrdvbSYm9aRU/I436AXGHCpOGHnAWrJfBw74XXsTk0Es5/yZZ3QM8/EkOou uo8KZqkHLBH7ZsdZQkjjv2LpmkAi0O+cCAfjjf4DWqHfTwG/47HDwXMsHtAjrdu4ICyP RRXZQiNHkGkERh7zviL5vgUc0y1SIoQXfYPUyDxWBpjOi8lSvlhBIujEpHRSLMwKfBQa eSVsj93voiJqdZax8eV3xd6ash2HwAu3Q6SbiRjnURgJgvWW9qk6rHEliTVPr78SkrcR hLEO3GbeTEgiHJ388C7jmPYbcM95w3glFwzqy+Rjj6OLnzhSyvCcLaAPV+xf27plqIMs 4EJw== X-Gm-Message-State: AODbwcDztuxtT/vTNLdbirq4degBgLgCEEIuxCQIcEBvHG1czq2Od1Qf 09R+W1ZjGAqOfw103xk= X-Received: by 10.223.135.50 with SMTP id a47mr7324930wra.138.1494497398548; Thu, 11 May 2017 03:09:58 -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 4sm1742346wrv.33.2017.05.11.03.09.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 11 May 2017 03:09:58 -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 Cc: airlied@linux.ie, dri-devel@lists.freedesktop.org, Peter Griffin Subject: [PATCH] drm/hisilicon: Ensure LDI regs are properly configured. Date: Thu, 11 May 2017 11:09:55 +0100 Message-Id: <1494497395-20594-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 --- 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 9a0678a..c09600c 100644 --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c @@ -521,9 +521,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,