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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E09EC74A5B for ; Tue, 21 Mar 2023 13:08:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230416AbjCUNIH (ORCPT ); Tue, 21 Mar 2023 09:08:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229743AbjCUNID (ORCPT ); Tue, 21 Mar 2023 09:08:03 -0400 Received: from mail-yw1-x1133.google.com (mail-yw1-x1133.google.com [IPv6:2607:f8b0:4864:20::1133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBC574D614 for ; Tue, 21 Mar 2023 06:07:46 -0700 (PDT) Received: by mail-yw1-x1133.google.com with SMTP id 00721157ae682-541a05e4124so279856737b3.1 for ; Tue, 21 Mar 2023 06:07:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679404066; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=7OMTf5Ga7cygQE1B9rsS6pN7RAXO/nEzZ4boh/y9Vt0=; b=cmJ8XIdSsNL/DkdwP6cioRpdQEMqyvRHRipv5kDKib1eCTK9r/TTQFkJ591EPAprgW kq+VOaFqG5IX5Y49IJLieVe4Yfzzh0D1CbApAa2dUuBDYA2BQKTHPzVhniNz4VD8TBmW 4BquqEkEWXiF/o+8UKQ02d9YUbI2e0zJzXEUI4h6K9P1ZuDYQusqtbSPZ5a7NSUD26Cv ffegSH5qZRqhh+unOsVNC8HjiZJZe13TQR1kZOv7c/SgoL2Z/zOYub+eld/LVyB/ot02 akzOY70zzgoeGMVkMtWSYvwHdpV3ThAm3o5tWKy9XvO4dfqJnRiN3+TAqeppxewF7dzE iXAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679404066; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=7OMTf5Ga7cygQE1B9rsS6pN7RAXO/nEzZ4boh/y9Vt0=; b=VCZvltOvB/OFaHnB3tjVVKUUWdfYFndWf07pBfI3GzqMBt8vIMshoB+koyNvE/6W43 qzTo4S8Dwk2q3xIUFeSNut0y+WPdip5P8Nwl+RTXMF3QJ05U+Vn1fdNOSAPM/igu240a CXCzjOIEa//TGCYokwpnyYrqtn7TxznP9eyhOFLLLrkSgfZSy57UX/l/UjDwHYMQ3wAX RyU5GZJxfQe0mTbzaQUZlxVw2cmFAdYL0aBvMIzFLpB+phrNLGGKsvAmmmWgXLjAxSpy g04zNE6cYlb2a8bxkC2ezw3B4CzKjpNTolygU7PTb0VGrmD5+JWunuH3278RtgmEg1a8 740g== X-Gm-Message-State: AAQBX9eer87caCnVjAhdWrXsiXAB6xhmM2XT3stWl/ECbOJ1fdQnCjlf SXYznIyBc10WtVd+5qvcokD3wk85CZ42fMxfFBWiow== X-Google-Smtp-Source: AKy350aj0PlWxbSVBeOrBC5vlMmi49wh+264w2jb98dmgSFBHyYGXdbEC1QiSslS+rFn7ARz91359uDeEapA874kEBA= X-Received: by 2002:a81:4305:0:b0:52e:e095:d840 with SMTP id q5-20020a814305000000b0052ee095d840mr1020956ywa.0.1679404065610; Tue, 21 Mar 2023 06:07:45 -0700 (PDT) MIME-Version: 1.0 References: <20230320134217.1685781-1-abel.vesa@linaro.org> In-Reply-To: <20230320134217.1685781-1-abel.vesa@linaro.org> From: Ulf Hansson Date: Tue, 21 Mar 2023 14:07:09 +0100 Message-ID: Subject: Re: [RFC PATCH v2 0/5] Allow genpd providers to power off domains on sync state To: Abel Vesa Cc: "Rafael J. Wysocki" , Kevin Hilman , Pavel Machek , Len Brown , Greg Kroah-Hartman , Bjorn Andersson , Andy Gross , Konrad Dybcio , Mike Turquette , Stephen Boyd , Saravana Kannan , linux-pm@vger.kernel.org, Linux Kernel Mailing List , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, Doug Anderson , Matthias Kaehlcke Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org On Mon, 20 Mar 2023 at 14:42, Abel Vesa wrote: > > There have been already a couple of tries to make the genpd "disable > unused" late initcall skip the powering off of domains that might be > needed until later on (i.e. until some consumer probes). The conclusion > was that the provider could return -EBUSY from the power_off callback > until the provider's sync state has been reached. This patch series tries > to provide a proof-of-concept that is working on Qualcomm platforms. > > I've been doing extensive testing on SM8450, but I've also spinned this > on my X13s (SC8280XP). Both patches that add the sync state callback to > the SC8280XP and SM8450 are here to provide context. Once we agree on > the form, I intend to add the sync state callback to all gdsc providers. > > Currently, some of the gdsc providers might not reach sync state due to > list of consumers not probing yet (or at all). The sync state can be > enforced by writing 1 to the state_synced sysfs attribute of the > provider, thanks to Saravana's commit [1] which has been already merged. > > [1] https://lore.kernel.org/r/20230304005355.746421-3-saravanak@google.com > > V1 of this patchset was here: > https://lore.kernel.org/all/20230315132330.450877-1-abel.vesa@linaro.org/ > > Changes since v1: > * Added the qcom_cc sync state callback which calls in turn the gdsc one > * dropped extra semicolon from pm_domain.h > > Abel Vesa (5): > PM: domains: Allow power off queuing from providers > soc: qcom: rpmhpd: Do proper power off when state synced > clk: qcom: gdsc: Avoid actual power off until sync state > clk: qcom: Add sync state callback to all SC8280XP providers > clk: qcom: Add sync state callback to all SM8450 providers > > drivers/base/power/domain.c | 3 ++- > drivers/clk/qcom/camcc-sm8450.c | 1 + > drivers/clk/qcom/common.c | 19 +++++++++++++++++++ > drivers/clk/qcom/common.h | 2 ++ > drivers/clk/qcom/dispcc-sc8280xp.c | 1 + > drivers/clk/qcom/dispcc-sm8450.c | 1 + > drivers/clk/qcom/gcc-sc8280xp.c | 1 + > drivers/clk/qcom/gcc-sm8450.c | 1 + > drivers/clk/qcom/gdsc.c | 26 ++++++++++++++++++++++++++ > drivers/clk/qcom/gdsc.h | 6 ++++++ > drivers/clk/qcom/gpucc-sc8280xp.c | 1 + > drivers/soc/qcom/rpmhpd.c | 19 +++++++------------ > include/linux/pm_domain.h | 6 ++++++ > 13 files changed, 74 insertions(+), 13 deletions(-) > Besides the minor comments on patch1, this looks good to me! So, feel free to add: Reviewed-by: Ulf Hansson Kind regards Uffe