Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2722255pxb; Tue, 9 Mar 2021 09:15:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJyFBbzI8VaRwZ3XCcp8ahtoL7ibtS9NpeUCG6ck/lCk0s7JMnBA2E7a9UGvB5GwrsrteLU+ X-Received: by 2002:a17:906:150f:: with SMTP id b15mr12464866ejd.363.1615310145322; Tue, 09 Mar 2021 09:15:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615310145; cv=none; d=google.com; s=arc-20160816; b=qFLN/3RLAYpOChM6C2G3iPSegApM/56ki23iFQW/JY+V6jVAP2faHqdFWgdo1bSDv5 zRo1FHVUBIGpTYa4IwSibvhzC1oEKggTQUQJVJ8zU2saxF58k/bv+gIzEoJ03vAfsL96 YgFfGhYL1ReYwIiJtHyq5usCzpFHjQy/LdrtkCtZKKBUs+XaDRIHSb9hlIlAqCI0t2nY ougCJLnQ/gTUs7j15xIkHjETiQckw2zd44TF/9F8OYPP9Y6MV+CElTrXs1rIqMXqTS1m uz7sz27rkoDNBFVwRSOW+ywFq+kEhZLsY+doteNKfjt9ybXMttD/vIHXJarsvUNgLzDH Yj5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=4E4B2xlaHTkAbKCLQY2tzB0M/UIewZVxgvZlKvBiH3c=; b=RDuuCC6krsQRH5/i8//hbRVpMsqK3o/jDngXnmRIK3d/MEXY3shyS5t8K2OzDv19tu F56nB7oNMTG6A2QvD9jEL+CBlfRZX0Ifa7ToK7lT5OFx/YYV/QTBNrjAZTgc8LXVLVkb ykhROdKXO5z1l8uMgRiu/NOZoqSLlKRvxPFQh7TZJx6QxNXvLph/UR5vqUZt0Kzz2olL vPIpExuQyP54jaXF0eVNxtOORFYQ0WtKDb6JIIp4MRHm0J5Fl1U7ldDOaopWFNpdEsC/ 5EzW5VuPmdUNhMsTHyG7MOd/GW5TeXGXsCp1uwd7kA/1lKIgpkHjKMl8hOn7nO6Jltal rv/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=RVsnzzQT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g2si10089925edb.398.2021.03.09.09.15.22; Tue, 09 Mar 2021 09:15:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=RVsnzzQT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231703AbhCIRNj (ORCPT + 99 others); Tue, 9 Mar 2021 12:13:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230435AbhCIRNX (ORCPT ); Tue, 9 Mar 2021 12:13:23 -0500 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D40FC06174A for ; Tue, 9 Mar 2021 09:13:23 -0800 (PST) Received: by mail-wr1-x434.google.com with SMTP id v15so17169316wrx.4 for ; Tue, 09 Mar 2021 09:13:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=4E4B2xlaHTkAbKCLQY2tzB0M/UIewZVxgvZlKvBiH3c=; b=RVsnzzQTkYEgUiAsEVrcRaREJuZFvSe4TRwZIDnUXyIkpZK49/ZplAaPJC7OfFBVq2 Z2IMQVsOZmxMf4GKRU0ZhAyP1m4Xw6WaNYixtf9mTvY5XNqsgc8Lyf2skbyUga2Tazxj 5cbaY85hQ+NFkOLU9Cs8W0y0s5OWQnAQrGXWxk3gYfPV/4fUE55OFJ8LFWTDid1Zn2Cb aMr22NDluvqyYBd1hEjx6/o7l5yXk5pYNZhW2l/RXHx9iHo3Thpwt78EyVxuxkTRRtF6 wgXEBShh1YZvfuzOgf7m22JRcpvybK7LcVtUYJ78S0Gki1CNNvnftxipXzzMg4na1rvK DQGA== 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:in-reply-to:references:date :message-id:mime-version; bh=4E4B2xlaHTkAbKCLQY2tzB0M/UIewZVxgvZlKvBiH3c=; b=DsnrO43DJuMB0lshd578EW2wBPSywaTOgGahxDHPR2Tc6kow5FjBehTl0XSUdejakO hvGejA7E3vi5WrilIMySmGP/oSUlNIefZErnt1NnapQ24PTvftIRauyrkcwQSbvcD3Qg qCB6p9Vm7xrmrUM4vLAty/Z03R5BAxyP40afe7xyYy7Qaf5cuG38arURFKvSYPf7uDjS exO2gPvn/9aa30MHSXxqXM6F0ph2yAmN9rzkY3kyc+Emn3c9wChPspJfexEqek22bUBU Z2GGXGTSvCaPii6XibwEqm5FCZFcILkkP0AFcdDBAFiAIpCaMaOLKBaCLf6CLeQDlrt5 8yBA== X-Gm-Message-State: AOAM532Uh3YXW3usuBNCq6JJ7fbZHM/1XRQIYuskFZjSN9HW+Y60wuH7 b/x7TrMniqEPyVX67YjACmoi5g== X-Received: by 2002:a5d:548c:: with SMTP id h12mr29519223wrv.46.1615310002233; Tue, 09 Mar 2021 09:13:22 -0800 (PST) Received: from localhost (c-71-197-186-152.hsd1.wa.comcast.net. [71.197.186.152]) by smtp.gmail.com with ESMTPSA id f7sm4751268wmh.39.2021.03.09.09.13.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Mar 2021 09:13:21 -0800 (PST) From: Kevin Hilman To: Neil Armstrong , Artem Lapkin Cc: jbrunet@baylibre.com, martin.blumenstingl@googlemail.com, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, christianshewitt@gmail.com, art@khadas.com, nick@khadas.com, gouwa@khadas.com Subject: Re: [PATCH] drm: meson_drv add shutdown function In-Reply-To: References: <20210302042202.3728113-1-art@khadas.com> Date: Tue, 09 Mar 2021 09:13:18 -0800 Message-ID: <7h35x42qtt.fsf@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Neil, Neil Armstrong writes: > On 02/03/2021 05:22, Artem Lapkin wrote: >> Problem: random stucks on reboot stage about 1/20 stuck/reboots >> // debug kernel log >> [ 4.496660] reboot: kernel restart prepare CMD:(null) >> [ 4.498114] meson_ee_pwrc c883c000.system-controller:power-controller: shutdown begin >> [ 4.503949] meson_ee_pwrc c883c000.system-controller:power-controller: shutdown domain 0:VPU... >> ...STUCK... >> >> Solution: add shutdown function to meson_drm driver >> // debug kernel log >> [ 5.231896] reboot: kernel restart prepare CMD:(null) >> [ 5.246135] [drm:meson_drv_shutdown] >> ... >> [ 5.259271] meson_ee_pwrc c883c000.system-controller:power-controller: shutdown begin >> [ 5.274688] meson_ee_pwrc c883c000.system-controller:power-controller: shutdown domain 0:VPU... >> [ 5.338331] reboot: Restarting system >> [ 5.358293] psci: PSCI_0_2_FN_SYSTEM_RESET reboot_mode:0 cmd:(null) >> bl31 reboot reason: 0xd >> bl31 reboot reason: 0x0 >> system cmd 1. >> ...REBOOT... >> >> Tested: on VIM1 VIM2 VIM3 VIM3L khadas sbcs - 1000+ successful reboots >> and Odroid boards, WeTek Play2 (GXBB) >> >> Tested-by: Christian Hewitt >> Signed-off-by: Artem Lapkin >> >> --- >> drivers/gpu/drm/meson/meson_drv.c | 11 +++++++++++ >> 1 file changed, 11 insertions(+) >> >> diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c >> index 42c5d3246..693bb1293 100644 >> --- a/drivers/gpu/drm/meson/meson_drv.c >> +++ b/drivers/gpu/drm/meson/meson_drv.c >> @@ -482,6 +482,16 @@ static int meson_probe_remote(struct platform_device *pdev, >> return count; >> } >> >> +static void meson_drv_shutdown(struct platform_device *pdev) >> +{ >> + struct meson_drm *priv = dev_get_drvdata(&pdev->dev); >> + struct drm_device *drm = priv->drm; >> + >> + DRM_DEBUG_DRIVER("\n"); >> + drm_kms_helper_poll_fini(drm); >> + drm_atomic_helper_shutdown(drm); >> +} >> + >> static int meson_drv_probe(struct platform_device *pdev) >> { >> struct component_match *match = NULL; >> @@ -553,6 +563,7 @@ static const struct dev_pm_ops meson_drv_pm_ops = { >> >> static struct platform_driver meson_drm_platform_driver = { >> .probe = meson_drv_probe, >> + .shutdown = meson_drv_shutdown, >> .driver = { >> .name = "meson-drm", >> .of_match_table = dt_match, >> > > Applied to drm-misc-fixes, Could you submit this as a fix to stable (v5.10+) also? Thanks, Kevin