From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DD3F1C433F5 for ; Thu, 11 Nov 2021 16:25:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C4AEB6124C for ; Thu, 11 Nov 2021 16:25:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234203AbhKKQ2o (ORCPT ); Thu, 11 Nov 2021 11:28:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233987AbhKKQ2l (ORCPT ); Thu, 11 Nov 2021 11:28:41 -0500 Received: from mail-io1-xd32.google.com (mail-io1-xd32.google.com [IPv6:2607:f8b0:4864:20::d32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4A6DC061766 for ; Thu, 11 Nov 2021 08:25:52 -0800 (PST) Received: by mail-io1-xd32.google.com with SMTP id r8so7613741iog.7 for ; Thu, 11 Nov 2021 08:25:52 -0800 (PST) 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=VRqJqxxlJwIYS/ddfWmMHHNu+A1m8d9KAG8ft6WQNF0=; b=XqMsalAhGNfKo2UQ15NOwdV10LFRX/uoJ6VsXV+BlFHTzxtfrp+8eIku4RA5nHMVXx 9jvaPrDxo/eWbMVFOawlms6+NaGXadnzwLg6FXzlSSlmL4UjUZRUAsI9kymDAMNy/K8a 8g9ksjnXnM+dZWUP+yDsT+8fZzkaeNl0xqZEg= 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=VRqJqxxlJwIYS/ddfWmMHHNu+A1m8d9KAG8ft6WQNF0=; b=wv9z/YkRMgzYNgR0Rp64cSkmVgnFRqspvoyrlqIuNIOBXmTkTJzr0pKS6QUf0l0dBO EZus2wKPjkQzQ/F/gfEW/8bqcAf2GrIHsA9T8cIECEVWkRB4o06MzQ2/N+4hYRWdlo6r JKnpqMtPXSd/L+57qNeF/JWydEcf3k3QQf/uj2k0T9XeFxEV+VGas/acxXhYJIJazxr3 NyFE5dQ4HhCyMGa6HNIkc2w6iPVdlLMBKJXX8amMG+tTIJGfZzhXPfXxO5ITeLanztLH RhcUSDzPg6dE/d+D6avIQKEhHN+CsisJmBXmMkwu9rzqrqT4onhBaK5lkB0OyzKmi7CO X/xw== X-Gm-Message-State: AOAM530EGhTkyy2Tnr3+DliWjKAEVjexjctxt+DyFfzFHMmHB3KwEVWR eK+b+DYfjF83cubaGWpgKDlHsG2MDf2lLA== X-Google-Smtp-Source: ABdhPJzsfwLABH0noL5eiV01ZCcXd1vU3redIx6vTOtHyy3jUKtg3HsPm3Cfp7t+ZcCwEWla7TExHg== X-Received: by 2002:a05:6602:2d81:: with SMTP id k1mr5912023iow.112.1636647952012; Thu, 11 Nov 2021 08:25:52 -0800 (PST) Received: from mail-io1-f49.google.com (mail-io1-f49.google.com. [209.85.166.49]) by smtp.gmail.com with ESMTPSA id i4sm2169496ilv.15.2021.11.11.08.25.51 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 11 Nov 2021 08:25:51 -0800 (PST) Received: by mail-io1-f49.google.com with SMTP id c3so7629108iob.6 for ; Thu, 11 Nov 2021 08:25:51 -0800 (PST) X-Received: by 2002:a05:6602:2d84:: with SMTP id k4mr5635223iow.168.1636647950862; Thu, 11 Nov 2021 08:25:50 -0800 (PST) MIME-Version: 1.0 References: <20211028105754.v5.1.I828f5db745535fb7e36e8ffdd62d546f6d08b6d1@changeid> In-Reply-To: From: Doug Anderson Date: Thu, 11 Nov 2021 08:25:38 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v5 1/2] drm/bridge: parade-ps8640: Enable runtime power management To: Philip Chen Cc: LKML , Stephen Boyd , Daniel Vetter , David Airlie , Jernej Skrabec , Jonas Karlman , Laurent Pinchart , Neil Armstrong , Robert Foss , dri-devel , Sam Ravnborg , Andrzej Hajda Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Thu, Oct 28, 2021 at 12:39 PM Doug Anderson wrote: > > Hi, > > On Thu, Oct 28, 2021 at 11:02 AM Philip Chen wrote: > > > > Add "Sam Ravnborg " to cc list for vis. > > Remove "Andrzej Hajda " from cc list as the > > address can't be found. > > Looking at , > it should be Andrzej Hajda . I've added. > > > > On Thu, Oct 28, 2021 at 10:58 AM Philip Chen wrote: > > > > > > Fit ps8640 driver into runtime power management framework: > > > > > > First, break _poweron() to 3 parts: (1) turn on power and wait for > > > ps8640's internal MCU to finish init (2) check panel HPD (which is > > > proxied by GPIO9) (3) the other configs. As runtime_resume() can be > > > called before panel is powered, we only add (1) to _resume() and leave > > > (2)(3) to _pre_enable(). We also add (2) to _aux_transfer() as we want > > > to ensure panel HPD is asserted before we start AUX CH transactions. > > > > > > Second, the original driver has a mysterious delay of 50 ms between (2) > > > and (3). Since Parade's support can't explain what the delay is for, > > > and we don't see removing the delay break any boards at hand, remove > > > the delay to fit into this driver change. > > > > > > In addition, rename "powered" to "pre_enabled" and don't check for it > > > in the pm_runtime calls. The pm_runtime calls are already refcounted > > > so there's no reason to check there. The other user of "powered", > > > _get_edid(), only cares if pre_enable() has already been called. > > > > > > Lastly, change some existing DRM_...() logging to dev_...() along the > > > way, since DRM_...() seem to be deprecated in [1]. > > > > > > [1] https://patchwork.freedesktop.org/patch/454760/ > > > > > > Signed-off-by: Philip Chen > > > Reviewed-by: Douglas Anderson > > > Reviewed-by: Stephen Boyd > > > --- > > > In v3, I added pm_suspend_ignore_children() in ps8640_probe(). > > > Also, I moved the change of "put_sync_suspend" from patch 2/2 to here. > > > But I forgot to mention both changes. So edit v3 change log retroactively. > > > > > > In v4, I moved the change of "ps8640_ensure_hpd" return data type > > > from patch 2/2 to here. But I forgot to mention it. So edit v4 change log > > > retroactively. > > > > > > Changes in v5: > > > - Move the implementation of _runtime_disable() around to resolve merge > > > conflict when rebasing. > > > - Improve the document for how autosuspend_delay is picked. > > The new text looks good to me, thanks! > > Since this is from @chromium.org and only reviewed-by @chromium.org > people, I'll plan to give it a 2-week snooze to give others ample time > to comment on these two patches. If 2 weeks pass w/ no comments then > I'll land to drm-misc-next. If someone gives an Ack and/or Reviewed-by > then I'll likely land sooner. My 2-week snooze went off, so this is now pushed to drm-misc-next fixing a small whitespace warning that the dim tool complained about. e9d9f9582c3d drm/bridge: parade-ps8640: Populate devices on aux-bus 826cff3f7ebb drm/bridge: parade-ps8640: Enable runtime power management -Doug From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BA277C433EF for ; Thu, 11 Nov 2021 16:25:55 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 841756124D for ; Thu, 11 Nov 2021 16:25:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 841756124D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9D7506E980; Thu, 11 Nov 2021 16:25:54 +0000 (UTC) Received: from mail-il1-x130.google.com (mail-il1-x130.google.com [IPv6:2607:f8b0:4864:20::130]) by gabe.freedesktop.org (Postfix) with ESMTPS id 355CD6E980 for ; Thu, 11 Nov 2021 16:25:53 +0000 (UTC) Received: by mail-il1-x130.google.com with SMTP id h23so6366543ila.4 for ; Thu, 11 Nov 2021 08:25:53 -0800 (PST) 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=VRqJqxxlJwIYS/ddfWmMHHNu+A1m8d9KAG8ft6WQNF0=; b=XqMsalAhGNfKo2UQ15NOwdV10LFRX/uoJ6VsXV+BlFHTzxtfrp+8eIku4RA5nHMVXx 9jvaPrDxo/eWbMVFOawlms6+NaGXadnzwLg6FXzlSSlmL4UjUZRUAsI9kymDAMNy/K8a 8g9ksjnXnM+dZWUP+yDsT+8fZzkaeNl0xqZEg= 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=VRqJqxxlJwIYS/ddfWmMHHNu+A1m8d9KAG8ft6WQNF0=; b=6EbZaE+iq+pyyJlXPtScKUvo9bIxREnaBXdabuaM2Xkgzkjs+LjIyK0PT3sp6cdGeb FhdCFNNJLuP+UQ4t+45GVSSoMxt9imzqACLdexVFZHLUQU2vLQAquCS+ay3a21DaMnne 6yvEgLJgKlCRgJ/f7ShdrWPDRLWDfTjmftctf/rvZhVjrcVWVqfHbWpfVzS9uuoZRhXp BMEncdD0fQr3sfCDcYHaEKkuaxKdhxG6VQk/tLhTxP+eM/Jbs3uraJqJDmP3m4vpn0L5 AFq8sHi5euDLKhxZ7muWbtsx7INP6fSCSLIKMYff75e2fdVm/FU9a9zjTFr3IV1CI0lQ RQdQ== X-Gm-Message-State: AOAM532+70PdhvDyrxc77Xg16f9vQtg+21XKCH8uHA7ZOKqjV7hzFbFT qwcDA/P/nLvGJae6l6l+NmZrqeSKbcz5gg== X-Google-Smtp-Source: ABdhPJxCtRHLS55q5UaqwHmUXSw6IlfMQV1w7tdUGV3mTRWJ2a29ShLdCZD/Ygzni3Zmv+uxXo3qGw== X-Received: by 2002:a05:6e02:b2a:: with SMTP id e10mr4815440ilu.186.1636647952155; Thu, 11 Nov 2021 08:25:52 -0800 (PST) Received: from mail-io1-f45.google.com (mail-io1-f45.google.com. [209.85.166.45]) by smtp.gmail.com with ESMTPSA id k8sm2004499ils.79.2021.11.11.08.25.51 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 11 Nov 2021 08:25:51 -0800 (PST) Received: by mail-io1-f45.google.com with SMTP id k22so7540427iol.13 for ; Thu, 11 Nov 2021 08:25:51 -0800 (PST) X-Received: by 2002:a05:6602:2d84:: with SMTP id k4mr5635223iow.168.1636647950862; Thu, 11 Nov 2021 08:25:50 -0800 (PST) MIME-Version: 1.0 References: <20211028105754.v5.1.I828f5db745535fb7e36e8ffdd62d546f6d08b6d1@changeid> In-Reply-To: From: Doug Anderson Date: Thu, 11 Nov 2021 08:25:38 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v5 1/2] drm/bridge: parade-ps8640: Enable runtime power management To: Philip Chen Content-Type: text/plain; charset="UTF-8" X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrzej Hajda , Jonas Karlman , David Airlie , Robert Foss , dri-devel , Neil Armstrong , LKML , Jernej Skrabec , Stephen Boyd , Laurent Pinchart , Sam Ravnborg Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi, On Thu, Oct 28, 2021 at 12:39 PM Doug Anderson wrote: > > Hi, > > On Thu, Oct 28, 2021 at 11:02 AM Philip Chen wrote: > > > > Add "Sam Ravnborg " to cc list for vis. > > Remove "Andrzej Hajda " from cc list as the > > address can't be found. > > Looking at , > it should be Andrzej Hajda . I've added. > > > > On Thu, Oct 28, 2021 at 10:58 AM Philip Chen wrote: > > > > > > Fit ps8640 driver into runtime power management framework: > > > > > > First, break _poweron() to 3 parts: (1) turn on power and wait for > > > ps8640's internal MCU to finish init (2) check panel HPD (which is > > > proxied by GPIO9) (3) the other configs. As runtime_resume() can be > > > called before panel is powered, we only add (1) to _resume() and leave > > > (2)(3) to _pre_enable(). We also add (2) to _aux_transfer() as we want > > > to ensure panel HPD is asserted before we start AUX CH transactions. > > > > > > Second, the original driver has a mysterious delay of 50 ms between (2) > > > and (3). Since Parade's support can't explain what the delay is for, > > > and we don't see removing the delay break any boards at hand, remove > > > the delay to fit into this driver change. > > > > > > In addition, rename "powered" to "pre_enabled" and don't check for it > > > in the pm_runtime calls. The pm_runtime calls are already refcounted > > > so there's no reason to check there. The other user of "powered", > > > _get_edid(), only cares if pre_enable() has already been called. > > > > > > Lastly, change some existing DRM_...() logging to dev_...() along the > > > way, since DRM_...() seem to be deprecated in [1]. > > > > > > [1] https://patchwork.freedesktop.org/patch/454760/ > > > > > > Signed-off-by: Philip Chen > > > Reviewed-by: Douglas Anderson > > > Reviewed-by: Stephen Boyd > > > --- > > > In v3, I added pm_suspend_ignore_children() in ps8640_probe(). > > > Also, I moved the change of "put_sync_suspend" from patch 2/2 to here. > > > But I forgot to mention both changes. So edit v3 change log retroactively. > > > > > > In v4, I moved the change of "ps8640_ensure_hpd" return data type > > > from patch 2/2 to here. But I forgot to mention it. So edit v4 change log > > > retroactively. > > > > > > Changes in v5: > > > - Move the implementation of _runtime_disable() around to resolve merge > > > conflict when rebasing. > > > - Improve the document for how autosuspend_delay is picked. > > The new text looks good to me, thanks! > > Since this is from @chromium.org and only reviewed-by @chromium.org > people, I'll plan to give it a 2-week snooze to give others ample time > to comment on these two patches. If 2 weeks pass w/ no comments then > I'll land to drm-misc-next. If someone gives an Ack and/or Reviewed-by > then I'll likely land sooner. My 2-week snooze went off, so this is now pushed to drm-misc-next fixing a small whitespace warning that the dim tool complained about. e9d9f9582c3d drm/bridge: parade-ps8640: Populate devices on aux-bus 826cff3f7ebb drm/bridge: parade-ps8640: Enable runtime power management -Doug