Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3702737pxj; Tue, 11 May 2021 10:01:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxyRIu5cGiF6opzKkBa+dY1LHKjUcjHI+wnDGAfyyrLbVmCPbo3oZb4bl2FosGef+5V2I8S X-Received: by 2002:a54:4f99:: with SMTP id g25mr4347880oiy.132.1620752504947; Tue, 11 May 2021 10:01:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620752504; cv=none; d=google.com; s=arc-20160816; b=LtzMY3oquyGRuk7On6ZxSAxZ7gI3VMejCnbH2LHOaMQBH7NipSH0/iSy3jyMDEW/OD Vr8YxGC6goJxomWWkDGzTP7+lXe2FR8L8lz9Bs/rSGLXk2zgzxXnP2llPhlptUcOdwca f84jd8NQkt0wK6cw9+EtShucuqXiPsE1Pkac1MnZqihGDwKGsvaiS8ubLSYdta5dHSiE USXKvN7ISAEVTk5Prsbu9JNdo3wPhwcOqQqDRCrZ7G/StRAilF8UHI9P44NN/GkHA5O6 UQxXMUtaWgbUUyaerwhMsQ4+ng5PvvrGFWfySOt/Do5ta7l0xCqy5mPbjTf4faMOjY3U QxrQ== 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:user-agent:from :references:in-reply-to:mime-version:dkim-signature; bh=+kc9oZEJ14VtCjgrFBVdOi9/5rD3BSHSZSNV5GjZufU=; b=ypv7T3v/MJFq6iE/jmyRU0njmDQzEwglePFlkGJg3PDxeXyinHBF3o2QPQVCHHe2pa ZPgUWmyzv/sd3Q4lEvYLL897pupgriYigQ3XPDCUjS9AUs1Ie4Kg54UT/yY6dZ+jK/Q6 rZ0nyqorCSc9HwVhxyp7ZYk8hFWvbbC4Kqs5SzcL17I+RBmNG0t2n978uyvoGeb5GLJ4 cP2DvPgJ8ITClQPB4kORtZjKAKZYTqNa/JY7KkKOlDrEcoubquzIuqJGPKzQo49M1qzJ xjUBZ26kSiyMSbcnpLLgPw3FmctbxsOzK9p92c4yGKUoe84JlpCLNSgp6l2F4dVCn8cd CYrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=PwB1lvev; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y11si21572857oiv.54.2021.05.11.10.01.30; Tue, 11 May 2021 10:01:44 -0700 (PDT) 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=@chromium.org header.s=google header.b=PwB1lvev; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231392AbhEKRBw (ORCPT + 99 others); Tue, 11 May 2021 13:01:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231230AbhEKRBw (ORCPT ); Tue, 11 May 2021 13:01:52 -0400 Received: from mail-ot1-x330.google.com (mail-ot1-x330.google.com [IPv6:2607:f8b0:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBB16C061574 for ; Tue, 11 May 2021 10:00:44 -0700 (PDT) Received: by mail-ot1-x330.google.com with SMTP id q7-20020a9d57870000b02902a5c2bd8c17so18109305oth.5 for ; Tue, 11 May 2021 10:00:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:in-reply-to:references:from:user-agent:date:message-id :subject:to:cc; bh=+kc9oZEJ14VtCjgrFBVdOi9/5rD3BSHSZSNV5GjZufU=; b=PwB1lvevVfB5Kbm7k/H348W91Tj9WxfX+YOZ70lpfrPoOc2vzHtRmS5rzAxstsVpqY Zl0ZnQ2lcLSRGIrkT1mPSfwIH/C9/vw9xKaTCm97G55DwAuj0An0UPbRbckwhMyctHF/ Zgehk3RmB3QlbD21BR0O3H+D2qgTa39u0LNUA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from :user-agent:date:message-id:subject:to:cc; bh=+kc9oZEJ14VtCjgrFBVdOi9/5rD3BSHSZSNV5GjZufU=; b=t0SU2lWcnwejiBy4W4N1IL5nqp7w9YdqwPFEEeE/6xv1oGDsR8HMEOMKgy8u3XfrMM bcTGUjpP2DssLrdTtlthXKhXnTdzTS2y3+0MU83q3P9zBjPEK1cCW3uSpulyQpBv3BJ+ xiKODUzbGxtRrCpVQv9kczGT6cTEzemkJnMoItbw9aSVQnjWGkEmzigp9APCmRW+KMB7 kqD+KP5Gj3l9Hk72GyeqZ3cgpcAREh7VpiHJUbm6/Gr1o5YsQtQMn8VbUktjvbau80Q3 Xi0U0KR1ThyRdPDAel7y/pLeSHWXT7l27YYEA2cXxcLz18abPtvxhXxWsmY2HVWxcW9m vYMA== X-Gm-Message-State: AOAM530dO6MJNIrnjYk7jCYT++YbtM/cWckQcJApBwx9jIVcftSpfUAu gDMExDVrn5pJ16OC//OwCRGZaUjVH197RINPOZkXueMRBwI= X-Received: by 2002:a9d:425:: with SMTP id 34mr27097167otc.25.1620752444214; Tue, 11 May 2021 10:00:44 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 11 May 2021 10:00:43 -0700 MIME-Version: 1.0 In-Reply-To: References: <20210508074118.1621729-1-swboyd@chromium.org> From: Stephen Boyd User-Agent: alot/0.9.1 Date: Tue, 11 May 2021 10:00:43 -0700 Message-ID: Subject: Re: [PATCH] component: Move host device to end of device lists on binding To: "Rafael J. Wysocki" Cc: Daniel Vetter , Greg Kroah-Hartman , Linux Kernel Mailing List , Russell King , Rob Clark , dri-devel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Rafael J. Wysocki (2021-05-11 03:52:06) > On Mon, May 10, 2021 at 9:08 PM Stephen Boyd wrote: > > [cut] > > > > > > > > > > I will try it, but then I wonder about things like system wide > > > > suspend/resume too. The drm encoder chain would need to reimplement the > > > > logic for system wide suspend/resume so that any PM ops attached to the > > > > msm device run in the correct order. Right now the bridge PM ops will > > > > run, the i2c bus PM ops will run, and then the msm PM ops will run. > > > > After this change, the msm PM ops will run, the bridge PM ops will run, > > > > and then the i2c bus PM ops will run. It feels like that could be a > > > > problem if we're suspending the DSI encoder while the bridge is still > > > > active. > > > > > > Yup suspend/resume has the exact same problem as shutdown. > > > > I think suspend/resume has the exact opposite problem. At least I think > > the correct order is to suspend the bridge, then the encoder, i.e. DSI, > > like is happening today. It looks like drm_atomic_helper_shutdown() > > operates from the top down when we want bottom up? I admit I have no > > idea what is supposed to happen here. > > Why would the system-wide suspend ordering be different from the > shutdown ordering? I don't really know. I'm mostly noting that today the order of suspend is to suspend the bridge device first and then the aggregate device. If the suspend of the aggregate device is traversing the devices like drm_atomic_helper_shutdown() then it would operate on the bridge device after it has been suspended, like is happening during shutdown. But it looks like that isn't happening. At least for the msm driver we're suspending the aggregate device after the bridge, and there are some weird usages of prepare and complete in there (see msm_pm_prepare() and msm_pm_complete) which makes me think that it's all working around this component code. The prepare phase is going to suspend the display pipeline, and then the bridge device will run its suspend hooks, and then the aggregate driver will run its suspend hooks. If we had a proper device for the aggregate device instead of the bind/unbind component hooks we could clean this up.