Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2749248pxb; Tue, 9 Mar 2021 09:52:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJxzqqc/Tu3++nZso+2+8XK61rbQDqtIl4JSw9g+Gt0TdM7iiQVFwUStdtKdg5snzaYGTa/a X-Received: by 2002:a05:6402:704:: with SMTP id w4mr5727515edx.175.1615312365382; Tue, 09 Mar 2021 09:52:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615312365; cv=none; d=google.com; s=arc-20160816; b=WC624tJdKLTkytfDTUEuGU6+oLGHaoO+PZPtJf+xcP1lIZKZyacbwEGHWBvkPPD+53 xYKp50PxG5iXnWkSuGce4FkDbQscBkNxWimBlcsCP3fCDBdd6//58gT+XMvUeJVYeYQK xHgjG5JfR9xHeCqaaEBOH1BGdPDsqUqqG3L8/MywZAisiwm4Dgx5Kv0KOgJGpHwyeo2I 9pN41jxxTaYvvWVmKQ1OAN/BHX5A3EgRoRGtH+Em/Qg07iKEENUIkTEICyYrWUwsQr5R OTDw4Vvo/MTYHpLWidPxpg6luZ15irU+aE7Jz+/fjjRoq1mMlh4EHwCg26oIFmwuK8Iz JM3w== 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=PSGONzx2Ya+di7nElWWfqOMSTg8+wvD3eIGbn+Kjutk=; b=0JECC3WLQP0D8jt0V8Revxaqj/v+7xF9AKj7K95fM6/+C8TtQ54HhkEZaeolfUHhKV uoBx9a5uy/NZtUC6iawpfE38hF+xREn95N3Y65XVI0gk74Gga4qmuqQVAkLKMp92veA4 m1Z1pHP2vPmqlTIK5SsYdR2lY+fHRrO+wfzkXyrK7Wguc48u0Lixct5Me2KJMBxeZFDJ lRd5GQ78M0LUmdOjiKDaoeMg1Z6ylaCKIbRlMNtoTH2L3TYYPf/5h9RkZZoe98+9Cej9 +WLzln/LKFQvqhNndGBW/YQfzx8cpX2AOZqQrB/39mqI8mZQRtKYY+nyvPgz1F5yqcnO miEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=xQYm8NA5; 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 f11si9948754edu.40.2021.03.09.09.52.22; Tue, 09 Mar 2021 09:52: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=xQYm8NA5; 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 S231410AbhCIRvF (ORCPT + 99 others); Tue, 9 Mar 2021 12:51:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231438AbhCIRu7 (ORCPT ); Tue, 9 Mar 2021 12:50:59 -0500 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5455FC06174A for ; Tue, 9 Mar 2021 09:50:59 -0800 (PST) Received: by mail-wr1-x433.google.com with SMTP id l12so17383684wry.2 for ; Tue, 09 Mar 2021 09:50:59 -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=PSGONzx2Ya+di7nElWWfqOMSTg8+wvD3eIGbn+Kjutk=; b=xQYm8NA5H7xR0Mb/UnWTUAqPBBTN8AGqoPttojus/GNCJws2+bpQ9yNGNu/0AxSNO+ 0wui42n9GgfEW2bMQ4prZM6EsW6SXP7mibj9cP7VwgB4Jds2ts9cLMwU7R3cjLsUcEXv msZCftTl2tT4sLHrTfVYUbPfWTGrNfqzzrte2A9RpIuM1xJAiu2IDWLkL1fvIO+mlZ6f 5ztWF0gqafsJpHa4+pN4cbYnKaEbh3rCzehR9f+8Iue4sA8+NKHwkYmchYy5ELF//4UR 39mzQUbHx88gsoAdqKuQ3qPLus/cUYbLrksvGevzTafRuN3TxGqYjk/+tL6qrQKaRXTl ikrg== 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=PSGONzx2Ya+di7nElWWfqOMSTg8+wvD3eIGbn+Kjutk=; b=bDcoLFpchgRSFFdDybLsVwp2+vs0cFdNGIw66Zisb08EmmGIL49Qr8k2JHIIUqcs0C St/O9r99LVdTDrOOAaaOsOo+eiw0SX5ht8/9fVFi+F7MUBbNuI6fLQ8Zl9s2U+mbhCmw UitvbUrPqbIzli6vWodu5xjUZd4Tr+kjwc1ciENdne6BP/OJh2uLL98cYXOaJVXYuPqU TGRboeqrh9ihFqk1eD0K4yf6q64r2zh4DVneQZsBcym4RdKerEKYUVrdu5aaMkAAKyQ6 Yubk2WydgmEvfy4y4X3rvZbTnFUvRiwQBM2n43zVyMqBw3x9Kx6SVv/afB4NlO3aQrd8 yW2w== X-Gm-Message-State: AOAM531RBjKEmmyi34n/qW7UIWfgNCOKWGNFeTCsbUUVgZuGoPCriWHL wtOQoE3YaX1zr2qd9iHa9OdR7Q== X-Received: by 2002:adf:de92:: with SMTP id w18mr29187690wrl.217.1615312258048; Tue, 09 Mar 2021 09:50:58 -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 u23sm5155822wmn.26.2021.03.09.09.50.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Mar 2021 09:50:57 -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: <875c606f-baf9-f92a-4820-39d3d7312607@baylibre.com> References: <20210302042202.3728113-1-art@khadas.com> <7h35x42qtt.fsf@baylibre.com> <875c606f-baf9-f92a-4820-39d3d7312607@baylibre.com> Date: Tue, 09 Mar 2021 09:50:55 -0800 Message-ID: <7hsg541aio.fsf@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Neil Armstrong writes: > On 09/03/2021 18:13, Kevin Hilman wrote: >> 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? > > It should be done automagically since I added the Fixes tag Oh, I didn't see the fixes tag, sorry. Thanks! Kevin