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: 106655 Delivered-To: patches@linaro.org Received: by 10.140.101.44 with SMTP id t41csp1539113qge; Thu, 29 Jun 2017 13:56:44 -0700 (PDT) X-Received: by 10.223.135.68 with SMTP id 4mr14953357wrz.141.1498769803959; Thu, 29 Jun 2017 13:56:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498769803; cv=none; d=google.com; s=arc-20160816; b=KWyCmjFMp6Rt8VMDT198nl6k5Gl1cAWWnRdV+W6to/NC6qZFCmO4pHgVnNrOx3EklX XIFDUjLulns75Fp0keJOj+heLkBOoY62ygm+GzE3q5UIwvEOOt8rifIs8MmS1kY6Ssuv LolWUhYQVpmdZjuubYJzWKFoWSG8oP0eutx7NJ9hrVV/LB0GeDPnY4mtQltTaHk5IQZO K6gh6nbDGn7HUZxhxTEatEPMqMWs7s90TFeswPoWJu+Nqy/l1ay6yjxV6nt1DXs8QVAv zPsYrBMdSo4likcCtksNvvk0i4fb/ypX0gBZAKObDojKwjaEU+akrj2e7VmzvaiMlUXU Pu0g== 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=qGXGsRuToxfA/XY55nkToLLHGDKDWmxOqhq49dOviiE=; b=g9ZogU/+1qUo9cifOdmJ2QRfIA4HQtaNP+TTgrZ+0RN6II1sliTRYCazaF9nHrOL0K Stf5/X0H1DBI4wNT1/xNrd6stNj6VJzTv7Nega+JEFVmEkmtAxfQKddMwwYDUSe6R1ga WZNAOvFCbxTNfJCexkUi2CCa7E/hDZYvltO1xYG56g+CdNiBll+SgKtzDadqPjWaEmwL D/8DbPDWGD6NNW+wyDiivtOE2Go51RlVFl5YL4/An9an0LA8vntsQqrfG15He2pywSmw 93Rehrq/0ssgYbcwULby2PFQ/b8sUvh56aVdCDmDcbgxTPRz0E6ocYqechJHvuWxd+c0 LtQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=bQ8WasmB; spf=pass (google.com: domain of peter.griffin@linaro.org designates 2a00:1450:400c:c09::22b 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-x22b.google.com (mail-wm0-x22b.google.com. [2a00:1450:400c:c09::22b]) by mx.google.com with ESMTPS id j43si5006135wra.339.2017.06.29.13.56.43 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Jun 2017 13:56:43 -0700 (PDT) Received-SPF: pass (google.com: domain of peter.griffin@linaro.org designates 2a00:1450:400c:c09::22b as permitted sender) client-ip=2a00:1450:400c:c09::22b; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.b=bQ8WasmB; spf=pass (google.com: domain of peter.griffin@linaro.org designates 2a00:1450:400c:c09::22b 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-x22b.google.com with SMTP id i127so27153464wma.0 for ; Thu, 29 Jun 2017 13:56:43 -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=oqn6CwPKY1ByVFiGp2lyjzozPkAMlY7x6IIZjQqJbnUQahq8fFMIRlrDRZ5TX3hIU7 TGWnTxAm+k0FRS5JTiu9tmnWwgGmUxQ8g/udPBuwT8QJ8V7ii96oNnAP2JcjxNuxz4lE TDk4/PQSAT7hnMKhSJYPSJ1il7EKau9Podt8safSFdNez8EzSKqstoAWHGa/i6kdKZYY oan+C29dECKA+PlRy6iCZ1BXGNeLX+QPxf0OxPqdLoAw/xSgg9HcwirsP748G5I4/JKA Vok6pS8pZnAJ98oWtKSAMy75oh9pD5LfEtUlaUT7fVg4WoZMoyAS88oN6/gjcm9my8sJ BCIw== X-Gm-Message-State: AKS2vOxc39a1jnfo4TaeV2TcHm7AAc7dIAbJBK8EXGvHyrCHQ42kEwM+ 7Luf/1Fx729SPF6VQzk= X-Received: by 10.28.57.197 with SMTP id g188mr13368168wma.13.1498769803605; Thu, 29 Jun 2017 13:56:43 -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 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 Cc: stable@vger.kernel.org, john.stultz@linaro.org, dri-devel@lists.freedesktop.org, andrey.konovalov@linaro.org, fathi.boudra@linaro.org, Peter Griffin 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 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 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,