From patchwork Thu Jun 29 20:54:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 9817927 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 4682D6020A for ; Thu, 29 Jun 2017 20:57:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 39C37283BD for ; Thu, 29 Jun 2017 20:57:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2BDEA2841C; Thu, 29 Jun 2017 20:57:14 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID 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 822DE283BD for ; Thu, 29 Jun 2017 20:57:13 +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=mPj7mxPufEmE+OqG7AwMhHrJG74Ja7sYrr/yBvY9EjA=; b=WgG 4/k4rFBfSyzxGRODdU/pho2BhG6kjy8O+wQL1hLaGAFbGPuZ0RrxrcVF2ydj7adNN45cDBF3XRlOe Da5hEoWNf3Ijm6HGEkPDR+E3qVbTfsmC2xJs/9oX0pl2dWOkSCNeArijGio0fhbdKmvabtg74taGG FTD6JvwtcPJdDr6D8LGPvNUEEsc2kSN7GqEf3AmPVtJOq1yW7AH1E7rbAzgl4ILX0X9wmAkXMnqhJ e2z9twFdv6dLCnaeTLKGN0MPc2XLTHyjhBHxNxk0MV1VuwnPvs2wemdPONg7QR8ShDJRPWDRvXXY4 eJCawp295xjyvcgrRXXghhAVbr0FMgg==; 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 1dQgUw-0006Gt-O4; Thu, 29 Jun 2017 20:57:10 +0000 Received: from mail-wm0-x22e.google.com ([2a00:1450:400c:c09::22e]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dQgUr-00068R-FD for linux-arm-kernel@lists.infradead.org; Thu, 29 Jun 2017 20:57:08 +0000 Received: by mail-wm0-x22e.google.com with SMTP id w126so93055010wme.0 for ; Thu, 29 Jun 2017 13:56:45 -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=qGXGsRuToxfA/XY55nkToLLHGDKDWmxOqhq49dOviiE=; b=bQ8WasmBDAlRUt4HHTpeAcnru2GEouNELAI2cELAty/tXsuQrNyMwb8B35uOD8fYWA rdSbStK8jEdexXfSE5l1T3naA3LR5u0j6FHMLI8lb8q1vGbR00o0/4cMotXz8eossVnc ZJn/3MIivTc2eQygAQXfe04XJwupzklg2edzY= 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=qGXGsRuToxfA/XY55nkToLLHGDKDWmxOqhq49dOviiE=; b=dM0BpNqCW+AA0x4tfhVpRmIj+11VvSyryj0SsI2TiFI/oUn+0LMv9DO9dB7Udeva6J WZnA9lwQAoHIDNUdqleTq62XTPZasL2Mns3kEpSQSVQPyRbGzDbaiyLDg8fViwUj+qvA hbbq0C9cvNfnG3oreMEj8mJ0xyHM0LmqgLUkSnlVtsJg4AaIIQTGOinL/NwiIcbTy/DB ZB3tq50IIEMCs9421O5r8xT1OMO21wLt3E0Ahs/71aYdx0EALHRPD+GE5iEIMfgjR2i9 Qly2Zgt6YnAefvs6fw7CqVe1XC5xeR7dnW7qGCxSNVWlEczK1ZA/CiSCIJUys137ZnJV fhig== X-Gm-Message-State: AKS2vOy5Ex55t95AGSVohUB/ASjniHnKAONJDkPt7eu0PIEfRgvuJzZo PE7G0tnB9psDA1/z6KKqLA== X-Received: by 10.28.57.197 with SMTP id g188mr13368168wma.13.1498769803605; Thu, 29 Jun 2017 13:56:43 -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 137sm9880127wmm.29.2017.06.29.13.56.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 29 Jun 2017 13:56:43 -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: Thu, 29 Jun 2017 21:54:38 +0100 Message-Id: <1498769678-12155-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-20170629_135706_723982_3364E41D X-CRM114-Status: GOOD ( 10.61 ) 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: dri-devel@lists.freedesktop.org, Peter Griffin , john.stultz@linaro.org, stable@vger.kernel.org, fathi.boudra@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 --- 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,