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: 9818255 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 9CD8B603F2 for ; Fri, 30 Jun 2017 01:18:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8C0B128484 for ; Fri, 30 Jun 2017 01:18:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 801E728534; Fri, 30 Jun 2017 01:18:55 +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 1E2B028484 for ; Fri, 30 Jun 2017 01:18:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E9ABE6E742; Fri, 30 Jun 2017 01:18:24 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x233.google.com (mail-wm0-x233.google.com [IPv6:2a00:1450:400c:c09::233]) by gabe.freedesktop.org (Postfix) with ESMTPS id EBA176E6FC for ; Thu, 29 Jun 2017 20:56:44 +0000 (UTC) Received: by mail-wm0-x233.google.com with SMTP id i127so27153460wma.0 for ; Thu, 29 Jun 2017 13:56:44 -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=eg6ZQIM7HAZmV0HNO/P2QDrO6OGBuOz9bmMtoGpjjaVhBvQzp8DYIrs9KdMx6OysbJ /O0dIMKRe74MYMciqQXlLC8TDT1HI1+4yeijPRgJZZUTts2MKT2/mWc2YBVmdp5duiTT t5GoqlOcpdaYPC9hdX/s6l+zb1hgOzxRI7cRq4wrdhsCixgbZJwOXWR28eQlFHx+7jFG pQ6aedZnskr5sjAr9iCGY983s8cZ476jzo2s8kEpUpFjsoSw3xfjJuYRcrmI/Ac5OMOj navALb1nq6vsrvHzeb7NWFgTzSALge9JLk7XeaO5SKmH6zM3K26UV15LdHIA/Sn9IQZ8 MPZw== X-Gm-Message-State: AKS2vOz+XaLT3ENuDFd6SQUkZl3B+Xbq3W2gFa+J9MhGVxvspqXTTEVe VNmECbHC2HzunFJu 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-Mailman-Approved-At: Fri, 30 Jun 2017 01:18:21 +0000 Cc: dri-devel@lists.freedesktop.org, Peter Griffin , stable@vger.kernel.org, fathi.boudra@linaro.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 --- 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,