Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp2196371iob; Thu, 5 May 2022 18:41:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwgUbKVeg+WPHk+V38QR3NUURzXidYbNbH+Jl7A9Fm3fNHG9BPnJ8r9bpLmAXwjZcNV7r4X X-Received: by 2002:a17:907:8a1f:b0:6f4:b5fb:e1c8 with SMTP id sc31-20020a1709078a1f00b006f4b5fbe1c8mr905301ejc.240.1651801308658; Thu, 05 May 2022 18:41:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651801308; cv=none; d=google.com; s=arc-20160816; b=kPI982aZ9EYjvgbQ0/JHPlhcFROI4uZi0vPZmAtZd/fSFtR1uLwm+9rqmM70Wh52X6 4dtIT7ldX2Dht8FdlnOFdL2FtXxcCdsCOvuRUUBUdyAYOZn0ecnDVXihNX4JPMNUGyoj z9hNvzRfP0xAc/uV9IuohFfuGTZW7dTtt99qupMpd1dsSFboGccQ+2KrnDwkSS7BSyDD wOF8B8U58ZKH2BJSvOpl6s+DI943hFv/x6qJ4MVcU1qzVbsTgNGLXI8q3/MODui/4nxW kHAlv4NDNq8z/5dfjmcrRcBbZH/jc3zG2g3nglo6btnqt9o5iYiol7rVW+U6TL6Cb1cM s/6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=YXeq/XPiJwEkXU3dI75Tl8dYba/oZ3LQ1VjEhaH9Vwg=; b=lkMKUkTqIqOMCgwvLZeAJ4JcSfbDzjAJl9vX+CO51+NEeMlRjpsC8useC4svTF/9zt sdCv/spmLSYRJABTMYsQujhYYG62GetULf+fyWsrK6zZwFKpnpSPmIQKInojaR1N6R2l ThJtc6N6xCIEW/lkzaLNjhKdlGbXDurCq5axb2rXdomi5Bb9O2XTm5w/ArpZs3/zMlux JP0LJqCYgsKuorF/JRYL9rzhrghMvb7UtHdd/5nPSEXsLLtRMAn4EZoejP2j0rmWls+d 75Cj+AtMZsxS8/3bRLiFKL41Sp9DG7l7sl7NUSNx/ytBIEAfdYFyvfTCmODJ8V17E5gO 9B7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=F8ZAHz6W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ay23-20020a170907901700b006e8c13a7938si3218848ejc.108.2022.05.05.18.41.26; Thu, 05 May 2022 18:41:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=F8ZAHz6W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350055AbiEDXsG (ORCPT + 99 others); Wed, 4 May 2022 19:48:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1381861AbiEDXlq (ORCPT ); Wed, 4 May 2022 19:41:46 -0400 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36B8D614F for ; Wed, 4 May 2022 16:38:09 -0700 (PDT) Received: by mail-ej1-x633.google.com with SMTP id i27so5687663ejd.9 for ; Wed, 04 May 2022 16:38:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YXeq/XPiJwEkXU3dI75Tl8dYba/oZ3LQ1VjEhaH9Vwg=; b=F8ZAHz6WSgNmgenOXICnR5VtLZmMglppgmbrbMqwX6PNKEjGhmfLbTITzRwZBewfUH /b5EfJyVCZr6ehKbYwB5lu3juAduuJ9CSsx6et/o9QODUmwNkM5rS8cqpMUwF6jSf0r6 C//ckdHWg9VL4W9ByKAQIt66nwfQW6b5QZvls= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YXeq/XPiJwEkXU3dI75Tl8dYba/oZ3LQ1VjEhaH9Vwg=; b=GO4NW5rX2c+QLFC/X3hWTj0+eQbb8r+xQf9x1Xtqf+iL6F8EEea2e8o2VcpRM/mszY l3iXuIiVxc82d90o1//JNpjOjfbK3GW5jffE8A9gtRxr7LobXir39p8mvqbpT9KiK2qm CuGBzcgAhCbMQ0KT5EK86uvabYKX+k+5FZhKvGqiainr3Wd2m0jiHG1pll7GAyDBlU5n JN5W+fTaaBOJ6/jUH6w72dGZA5ShvO7Z1NeD0HqSrWS4C/F+XX6UA6SgpzdjS9UfYxry TISNgEl/O5Dx08R5x3O+xQV3mddwN+7BOQaBAOKSrHusCxVk+4ctK7j8PcTnrDYyf4fW 7Jvw== X-Gm-Message-State: AOAM5328QlsLNEQq0poqnTkqSIXJh6flIYTJTxxYRQwPt2+yGz1sunMV 52rtm47VJYyLKnuzZdfEqA1Deh5fSNiya7RJ1jg= X-Received: by 2002:a17:907:9812:b0:6da:aaaf:7713 with SMTP id ji18-20020a170907981200b006daaaaf7713mr22197728ejc.163.1651707487545; Wed, 04 May 2022 16:38:07 -0700 (PDT) Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com. [209.85.221.45]) by smtp.gmail.com with ESMTPSA id rb48-20020a170907693000b006f3ef214deesm101195ejc.84.2022.05.04.16.38.06 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 04 May 2022 16:38:06 -0700 (PDT) Received: by mail-wr1-f45.google.com with SMTP id e2so3939715wrh.7 for ; Wed, 04 May 2022 16:38:06 -0700 (PDT) X-Received: by 2002:a05:6000:c7:b0:20a:d8c1:d044 with SMTP id q7-20020a05600000c700b0020ad8c1d044mr18472545wrx.422.1651707485535; Wed, 04 May 2022 16:38:05 -0700 (PDT) MIME-Version: 1.0 References: <20220504154909.1.Iaebd35e60160fc0f2a50fac3a0bf3b298c0637c8@changeid> In-Reply-To: From: Doug Anderson Date: Wed, 4 May 2022 16:37:52 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] drm/msm: Fix shutdown To: Dmitry Baryshkov Cc: Rob Clark , Abhinav Kumar , Stephen Boyd , AngeloGioacchino Del Regno , Bjorn Andersson , Daniel Vetter , David Airlie , Lv Ruyi , Sean Paul , Vinod Polimera , Xu Wang , dri-devel , freedreno , linux-arm-msm , LKML Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Wed, May 4, 2022 at 4:29 PM Dmitry Baryshkov wrote: > > On Thu, 5 May 2022 at 01:49, Douglas Anderson wrote: > > > > When rebooting on my sc7280-herobrine based device, I got a > > crash. Upon debugging, I found that I was in msm_drv_shutdown() and my > > "pdev" was the one associated with mdss_probe(). > > > > From source, I found that mdss_probe() has the line: > > platform_set_drvdata(pdev, mdss); > > ...where "mdss" is of type "struct msm_mdss *".msm_drv_probe > > > > Also from source, I saw that in msm_drv_shutdown() we have the line: > > struct msm_drm_private *priv = platform_get_drvdata(pdev); > > > > This is a mismatch and is the root of the problem. > > > > Further digging made it apparent that msm_drv_shutdown() is only > > supposed to be used for parts of the msm display framework that also > > call msm_drv_probe() but mdss_probe() doesn't call > > msm_drv_probe(). Let's remove the shutdown functon from msm_mdss.c. > > > > Digging a little further, code inspection found that two drivers that > > use msm_drv_probe() weren't calling msm_drv_shutdown(). Let's add it > > to them. > > > > Fixes: ecb23f2e3009 ("drm/msm: split the main platform driver") > > More likely: > Fixes: 6874f48bb8b0 ("drm/msm: make mdp5/dpu devices master components") Oh, I see! The commit I tagged is the one that set the shutdown in msm_mdss.c, but at the time of that commit it actually _did_ call msm_drv_probe(). v2 coming right up. -Doug