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 X-Spam-Level: X-Spam-Status: No, score=-17.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1FD5AC433E9 for ; Tue, 22 Dec 2020 09:00:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DAE8E2253A for ; Tue, 22 Dec 2020 09:00:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726061AbgLVJAY (ORCPT ); Tue, 22 Dec 2020 04:00:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726024AbgLVJAY (ORCPT ); Tue, 22 Dec 2020 04:00:24 -0500 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02CAAC06179C for ; Tue, 22 Dec 2020 00:59:43 -0800 (PST) Received: by mail-pj1-x102e.google.com with SMTP id f14so975044pju.4 for ; Tue, 22 Dec 2020 00:59:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=RHvyko5iU5xg8Cz45AVBchwM4SDGk3Y/8Etp7zQo/0E=; b=LfPP06TVJTEK4xWL0o4Uusz6IXwXzk8z3S6CPrE/vyZ9qoOMFRUyzQJWUKQxWhuG/E wY5edJUerDgkww2zd4lzbce6lRCficFwzejWrQiDZi/xwHlgy96zpj6C8ioFq0ZrQXBk mSOkM2U+2pDJWLqA+j7R2srsKaCnOdyMwev89OKW8IKEfkAPs6AL+3xqznBpqvwnQ0NT fjm9Rb+Xfn10diw8TlqXQy8/GkenTeXEg9jbL1dOeVHP/+gjymWREs9O4mMhUSRkCgx+ FWO4nhtVc54saAG5QAt6VsqTuAXLPGXWUixoDkMsUGzE1xB0aRN/Z6i4X+no1fBNw+u5 gkcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=RHvyko5iU5xg8Cz45AVBchwM4SDGk3Y/8Etp7zQo/0E=; b=g2pTuDCrGTe9j8Q7FY592zII62nmOiNyhQkPskguF283INDjnlmluiqfcis5yyoeFS HFSvm6dxMRa+hpzOiS3ihVXZR3GhUVeePH8HgGVHK/gf6DZkE+YSpPvvGilE3zJuk+HM 6yHI3axg4NGScYQpvB4O1LL+/AjIFaidYtQMyannVbsYsHMkGJSScB5nN3IJB/Z5rkz7 yvEtvnSRmZccoD7rq3O2vgVa5qSaFOsSbUjDFMWG6n7B/MY3L20PCsbodDKc12YFEGf2 PkicdmsIrxWAy4zsFgtcz/x4Xypz6Bb1H6kT1QMnOuGcUJPXJXDey59wC7nn77987nrU JdEw== X-Gm-Message-State: AOAM531/IGm9ig9O310PSFSw9USttXhFHkwTwDKfhomJX1cCmsqTyXmM 11gE6jFKB8QPRqw443LEZTqzAg== X-Google-Smtp-Source: ABdhPJykL54UnjW4ciN4fGRWEBJgf6zWsJDjMds2/uHeESPpVfQNNcqkwOSZPGazCeKG973ySyugcg== X-Received: by 2002:a17:902:c584:b029:da:cc62:22f1 with SMTP id p4-20020a170902c584b02900dacc6222f1mr20408042plx.54.1608627583415; Tue, 22 Dec 2020 00:59:43 -0800 (PST) Received: from localhost ([122.172.20.109]) by smtp.gmail.com with ESMTPSA id x4sm19796659pgg.94.2020.12.22.00.59.42 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Dec 2020 00:59:42 -0800 (PST) Date: Tue, 22 Dec 2020 14:29:40 +0530 From: Viresh Kumar To: Dmitry Osipenko Cc: Thierry Reding , Jonathan Hunter , Mark Brown , Liam Girdwood , Ulf Hansson , Mauro Carvalho Chehab , Rob Herring , Peter Geis , Nicolas Chauvet , Krzysztof Kozlowski , "Rafael J. Wysocki" , Kevin Hilman , Peter De Schrijver , Viresh Kumar , Stephen Boyd , Michael Turquette , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, linux-tegra@vger.kernel.org, linux-clk@vger.kernel.org Subject: Re: [PATCH v2 14/48] opp: Filter out OPPs based on availability of a required-OPP Message-ID: <20201222085940.y625zxee4tevbqm5@vireshk-i7> References: <20201217180638.22748-1-digetx@gmail.com> <20201217180638.22748-15-digetx@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201217180638.22748-15-digetx@gmail.com> User-Agent: NeoMutt/20180716-391-311a52 Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org On 17-12-20, 21:06, Dmitry Osipenko wrote: > A required OPP may not be available, and thus, all OPPs which are using > this required OPP should be unavailable too. > > Signed-off-by: Dmitry Osipenko > --- > drivers/opp/core.c | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) Please send a separate patchset for fixes, as these can also go to 5.11 itself. > diff --git a/drivers/opp/core.c b/drivers/opp/core.c > index d9feb7639598..3d02fe33630b 100644 > --- a/drivers/opp/core.c > +++ b/drivers/opp/core.c > @@ -1588,7 +1588,7 @@ int _opp_add(struct device *dev, struct dev_pm_opp *new_opp, > struct opp_table *opp_table, bool rate_not_available) > { > struct list_head *head; > - int ret; > + int i, ret; > > mutex_lock(&opp_table->lock); > head = &opp_table->opp_list; > @@ -1615,6 +1615,15 @@ int _opp_add(struct device *dev, struct dev_pm_opp *new_opp, > __func__, new_opp->rate); > } > > + for (i = 0; i < opp_table->required_opp_count && new_opp->available; i++) { > + if (new_opp->required_opps[i]->available) > + continue; > + > + new_opp->available = false; > + dev_warn(dev, "%s: OPP not supported by required OPP %pOF (%lu)\n", > + __func__, new_opp->required_opps[i]->np, new_opp->rate); Why not just break from here ? > + } > + > return 0; > } > > -- > 2.29.2 -- viresh 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 X-Spam-Level: X-Spam-Status: No, score=-15.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 26304C433E0 for ; Tue, 22 Dec 2020 08:59:47 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (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 789142253A for ; Tue, 22 Dec 2020 08:59:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 789142253A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=driverdev-devel-bounces@linuxdriverproject.org Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 186288682D; Tue, 22 Dec 2020 08:59:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lijE5WlHrCYV; Tue, 22 Dec 2020 08:59:45 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 6A81F8679A; Tue, 22 Dec 2020 08:59:45 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 54CF01BF280 for ; Tue, 22 Dec 2020 08:59:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 50E9685EFB for ; Tue, 22 Dec 2020 08:59:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kcCCQ4wBKlsK for ; Tue, 22 Dec 2020 08:59:43 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) by fraxinus.osuosl.org (Postfix) with ESMTPS id C83DE85DFD for ; Tue, 22 Dec 2020 08:59:43 +0000 (UTC) Received: by mail-pl1-f181.google.com with SMTP id s15so2677810plr.9 for ; Tue, 22 Dec 2020 00:59:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=RHvyko5iU5xg8Cz45AVBchwM4SDGk3Y/8Etp7zQo/0E=; b=LfPP06TVJTEK4xWL0o4Uusz6IXwXzk8z3S6CPrE/vyZ9qoOMFRUyzQJWUKQxWhuG/E wY5edJUerDgkww2zd4lzbce6lRCficFwzejWrQiDZi/xwHlgy96zpj6C8ioFq0ZrQXBk mSOkM2U+2pDJWLqA+j7R2srsKaCnOdyMwev89OKW8IKEfkAPs6AL+3xqznBpqvwnQ0NT fjm9Rb+Xfn10diw8TlqXQy8/GkenTeXEg9jbL1dOeVHP/+gjymWREs9O4mMhUSRkCgx+ FWO4nhtVc54saAG5QAt6VsqTuAXLPGXWUixoDkMsUGzE1xB0aRN/Z6i4X+no1fBNw+u5 gkcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=RHvyko5iU5xg8Cz45AVBchwM4SDGk3Y/8Etp7zQo/0E=; b=RGNPF1aBKH+KcLo7V86QvjfKHjor1VbvqmdDbHttv1Iv7ZL77c6te/G+nuqzkxuBbE uuP2X+t4HtAAbMqMBg6S8LnZWq+KCVOyiw3t4VvXybCB839FK+VhZjAlEI8iejjF4z5H btYp/XGQCJQlOK87mz1hvFJY39hs+Gi2/lgxayQYU5/hPEdgUPA1BAc7VW13gvAwf0vM XDUXk5aEKRDb3yGLGrAoPwoTeri5VTdEMOlBC2127ihI5D9CcTNnHQHgDLc2cXbY6H4z uUTgAFcYZInyJo8QMU0Ufr6gmu+1IORUnszeetm45BKkox9XG0XsiZycY2Ej6nH+PWC9 cRuw== X-Gm-Message-State: AOAM530a4Y4fo2lQ6tfoHZRQ+3CMt6UNG4c6/RLElF6LzFhtb3XYi8s1 N4UR6fJuE5WDMrRIVScCRTQpUw== X-Google-Smtp-Source: ABdhPJykL54UnjW4ciN4fGRWEBJgf6zWsJDjMds2/uHeESPpVfQNNcqkwOSZPGazCeKG973ySyugcg== X-Received: by 2002:a17:902:c584:b029:da:cc62:22f1 with SMTP id p4-20020a170902c584b02900dacc6222f1mr20408042plx.54.1608627583415; Tue, 22 Dec 2020 00:59:43 -0800 (PST) Received: from localhost ([122.172.20.109]) by smtp.gmail.com with ESMTPSA id x4sm19796659pgg.94.2020.12.22.00.59.42 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Dec 2020 00:59:42 -0800 (PST) Date: Tue, 22 Dec 2020 14:29:40 +0530 From: Viresh Kumar To: Dmitry Osipenko Subject: Re: [PATCH v2 14/48] opp: Filter out OPPs based on availability of a required-OPP Message-ID: <20201222085940.y625zxee4tevbqm5@vireshk-i7> References: <20201217180638.22748-1-digetx@gmail.com> <20201217180638.22748-15-digetx@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201217180638.22748-15-digetx@gmail.com> User-Agent: NeoMutt/20180716-391-311a52 X-BeenThere: driverdev-devel@linuxdriverproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Driver Project Developer List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ulf Hansson , Michael Turquette , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Thierry Reding , linux-clk@vger.kernel.org, devel@driverdev.osuosl.org, Kevin Hilman , Nicolas Chauvet , Viresh Kumar , Krzysztof Kozlowski , Jonathan Hunter , linux-media@vger.kernel.org, devicetree@vger.kernel.org, Rob Herring , linux-tegra@vger.kernel.org, Mauro Carvalho Chehab , Stephen Boyd , Peter De Schrijver , "Rafael J. Wysocki" , Liam Girdwood , Mark Brown , Peter Geis Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" On 17-12-20, 21:06, Dmitry Osipenko wrote: > A required OPP may not be available, and thus, all OPPs which are using > this required OPP should be unavailable too. > > Signed-off-by: Dmitry Osipenko > --- > drivers/opp/core.c | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) Please send a separate patchset for fixes, as these can also go to 5.11 itself. > diff --git a/drivers/opp/core.c b/drivers/opp/core.c > index d9feb7639598..3d02fe33630b 100644 > --- a/drivers/opp/core.c > +++ b/drivers/opp/core.c > @@ -1588,7 +1588,7 @@ int _opp_add(struct device *dev, struct dev_pm_opp *new_opp, > struct opp_table *opp_table, bool rate_not_available) > { > struct list_head *head; > - int ret; > + int i, ret; > > mutex_lock(&opp_table->lock); > head = &opp_table->opp_list; > @@ -1615,6 +1615,15 @@ int _opp_add(struct device *dev, struct dev_pm_opp *new_opp, > __func__, new_opp->rate); > } > > + for (i = 0; i < opp_table->required_opp_count && new_opp->available; i++) { > + if (new_opp->required_opps[i]->available) > + continue; > + > + new_opp->available = false; > + dev_warn(dev, "%s: OPP not supported by required OPP %pOF (%lu)\n", > + __func__, new_opp->required_opps[i]->np, new_opp->rate); Why not just break from here ? > + } > + > return 0; > } > > -- > 2.29.2 -- viresh _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel 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 X-Spam-Level: X-Spam-Status: No, score=-15.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E3BB9C433E0 for ; Tue, 22 Dec 2020 09:22:38 +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 AEB3623103 for ; Tue, 22 Dec 2020 09:22:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AEB3623103 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1D58B6E86D; Tue, 22 Dec 2020 09:21:54 +0000 (UTC) Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by gabe.freedesktop.org (Postfix) with ESMTPS id D53606E19A for ; Tue, 22 Dec 2020 08:59:43 +0000 (UTC) Received: by mail-pj1-x102f.google.com with SMTP id v1so980841pjr.2 for ; Tue, 22 Dec 2020 00:59:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=RHvyko5iU5xg8Cz45AVBchwM4SDGk3Y/8Etp7zQo/0E=; b=LfPP06TVJTEK4xWL0o4Uusz6IXwXzk8z3S6CPrE/vyZ9qoOMFRUyzQJWUKQxWhuG/E wY5edJUerDgkww2zd4lzbce6lRCficFwzejWrQiDZi/xwHlgy96zpj6C8ioFq0ZrQXBk mSOkM2U+2pDJWLqA+j7R2srsKaCnOdyMwev89OKW8IKEfkAPs6AL+3xqznBpqvwnQ0NT fjm9Rb+Xfn10diw8TlqXQy8/GkenTeXEg9jbL1dOeVHP/+gjymWREs9O4mMhUSRkCgx+ FWO4nhtVc54saAG5QAt6VsqTuAXLPGXWUixoDkMsUGzE1xB0aRN/Z6i4X+no1fBNw+u5 gkcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=RHvyko5iU5xg8Cz45AVBchwM4SDGk3Y/8Etp7zQo/0E=; b=KBC0ZGyyvQ4rFE7QcTJ1UTEudJJlEI7yU58E40ss3oPa1000TuMW/d0ziT/xDsnILR hsmzF9/Egvx3NiYXCOX2c4ZBKB2Bvjvgg2CEzU66rpYzTnXUtxx4qdX603BVQaUe4+vl Ho6TRDDZUU7etuIEGhpfl4AJwR6TrS+UDn+uuzBb/lpJghUGINVnvYU5T6DiG3rW0Di+ Sob8z8cTmSMsNfQvRAetEXCsDoMXb0biAoz5qy4v3y56IySlf5HH/tWG1B4kk7rXScbG XfgTV6u1LJuYrqqiLytwFAPK4RLbRF2nEJ9NnHbvjiCyFcFEFNUfktVfwYTCH5Z9fv8n Hh/Q== X-Gm-Message-State: AOAM530Q5LivcBzIj2aPPj1k1kS/K4266Jw+OEDQ1V6JiTpe6Vl7Nf9q c++Ep02UpbPUMPzIYA9q68v1PA== X-Google-Smtp-Source: ABdhPJykL54UnjW4ciN4fGRWEBJgf6zWsJDjMds2/uHeESPpVfQNNcqkwOSZPGazCeKG973ySyugcg== X-Received: by 2002:a17:902:c584:b029:da:cc62:22f1 with SMTP id p4-20020a170902c584b02900dacc6222f1mr20408042plx.54.1608627583415; Tue, 22 Dec 2020 00:59:43 -0800 (PST) Received: from localhost ([122.172.20.109]) by smtp.gmail.com with ESMTPSA id x4sm19796659pgg.94.2020.12.22.00.59.42 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Dec 2020 00:59:42 -0800 (PST) Date: Tue, 22 Dec 2020 14:29:40 +0530 From: Viresh Kumar To: Dmitry Osipenko Subject: Re: [PATCH v2 14/48] opp: Filter out OPPs based on availability of a required-OPP Message-ID: <20201222085940.y625zxee4tevbqm5@vireshk-i7> References: <20201217180638.22748-1-digetx@gmail.com> <20201217180638.22748-15-digetx@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201217180638.22748-15-digetx@gmail.com> User-Agent: NeoMutt/20180716-391-311a52 X-Mailman-Approved-At: Tue, 22 Dec 2020 09:21:48 +0000 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: Ulf Hansson , Michael Turquette , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Thierry Reding , linux-clk@vger.kernel.org, devel@driverdev.osuosl.org, Kevin Hilman , Nicolas Chauvet , Viresh Kumar , Krzysztof Kozlowski , Jonathan Hunter , linux-media@vger.kernel.org, devicetree@vger.kernel.org, Rob Herring , linux-tegra@vger.kernel.org, Mauro Carvalho Chehab , Stephen Boyd , Peter De Schrijver , "Rafael J. Wysocki" , Liam Girdwood , Mark Brown , Peter Geis Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 17-12-20, 21:06, Dmitry Osipenko wrote: > A required OPP may not be available, and thus, all OPPs which are using > this required OPP should be unavailable too. > > Signed-off-by: Dmitry Osipenko > --- > drivers/opp/core.c | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) Please send a separate patchset for fixes, as these can also go to 5.11 itself. > diff --git a/drivers/opp/core.c b/drivers/opp/core.c > index d9feb7639598..3d02fe33630b 100644 > --- a/drivers/opp/core.c > +++ b/drivers/opp/core.c > @@ -1588,7 +1588,7 @@ int _opp_add(struct device *dev, struct dev_pm_opp *new_opp, > struct opp_table *opp_table, bool rate_not_available) > { > struct list_head *head; > - int ret; > + int i, ret; > > mutex_lock(&opp_table->lock); > head = &opp_table->opp_list; > @@ -1615,6 +1615,15 @@ int _opp_add(struct device *dev, struct dev_pm_opp *new_opp, > __func__, new_opp->rate); > } > > + for (i = 0; i < opp_table->required_opp_count && new_opp->available; i++) { > + if (new_opp->required_opps[i]->available) > + continue; > + > + new_opp->available = false; > + dev_warn(dev, "%s: OPP not supported by required OPP %pOF (%lu)\n", > + __func__, new_opp->required_opps[i]->np, new_opp->rate); Why not just break from here ? > + } > + > return 0; > } > > -- > 2.29.2 -- viresh _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel