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: 9901953 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 24A3560244 for ; Tue, 15 Aug 2017 14:17:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1581F28775 for ; Tue, 15 Aug 2017 14:17:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 07F37287C1; Tue, 15 Aug 2017 14:17:08 +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=-2.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8A2EC28775 for ; Tue, 15 Aug 2017 14:17:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=JpGOQEpDr0VRc1JIdHtXn7kEpvNlGXty21k79oNe1HY=; b=m2Y ZqFhfDghAtREhe9VStMzm0CFxxEBAzmGecdl+WR6IvhetmCe9AofGFE+jT4dkceQ313M54a4T8eOL Y8KJ+7yW0KkS0m2Bl8+f6GwotYpWgSq8MfOls+RFjE8sxb4vHxt1eCFYUDDO+GqwplM8rf8OFccN6 x6gIh3l8ERCz7KMRsM68PoMBUeBQaoOY2kbeXteCS0WMgJ3R+hHgotvEYXLvj4BglGUb2EES0dYDO DTb0mPmIwR88o9cf8cCbviuWBizYE8A+xJWZBUnr7GZmFHjMnIW7E9s+0Z5rbeEUJiaIK9T4zYONb 3W55NQ6iUnDp15AhxT0KtpZxl+p8QnA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dhceP-0002kN-JN; Tue, 15 Aug 2017 14:16:57 +0000 Received: from mail-wm0-x22b.google.com ([2a00:1450:400c:c09::22b]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dhceK-0002Nv-Si for linux-arm-kernel@lists.infradead.org; Tue, 15 Aug 2017 14:16:55 +0000 Received: by mail-wm0-x22b.google.com with SMTP id t201so9796431wmt.1 for ; Tue, 15 Aug 2017 07:16:32 -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=c8ynP0MHZo1CokCqWSeFSOFgCgggzosbBfJaUy4+hbdSILkd/j1G3mh5Mk7LKvVwe5 I0bXcPsVNS6ZjVyGhaZP+KAX1D+F5VTlw7J4flRJcZljqqLeDga98bqrHvSbrd9khf2W kn7Vaz2ZHqbSTPNceLw3dv3QdpBgZuYCgFjUdVz+KjgrVSTBZfdT2QPUGsLTlllaj+Zo EzC1MDLvv7P/oPN0RLIgBA9nco9Rt93KYrIoDYRl7H8oeuU61+yCHJVzvCK2HhuNOTcF dX+qo/oa0n7DMxZdSYU5yO8LJfgL1nxTouy8JGLWdZvHrTcaZNvBTfg3/rUn/+2CSVAc 1SKA== X-Gm-Message-State: AHYfb5jRTiES21w+gyiY+f53IoZnR1YJuQs4oNcKPvhJybO1ybm5/Zqw X0A/ezYoUcxzcIelQHG+fw== 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170815_071653_091165_1E83AA16 X-CRM114-Status: GOOD ( 10.45 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guodong.xu@linaro.org, dri-devel@lists.freedesktop.org, Peter Griffin , john.stultz@linaro.org, stable@vger.kernel.org, shawn.guo@linaro.org, andrey.konovalov@linaro.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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 --- 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,