lkml.org 
[lkml]   [2021]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.13 377/800] PM / devfreq: passive: Fix get_target_freq when not using required-opp
    Date
    From: Chanwoo Choi <cw00.choi@samsung.com>

    [ Upstream commit 8c37d01e1a86073d15ea7084390fba58d9a1665f ]

    The 86ad9a24f21e ("PM / devfreq: Add required OPPs support to passive governor")
    supported the required-opp property for using devfreq passive governor.
    But, 86ad9a24f21e has caused the problem on use-case when required-opp
    is not used such as exynos-bus.c devfreq driver. So that fix the
    get_target_freq of passive governor for supporting the case of when
    required-opp is not used.

    Fixes: 86ad9a24f21e ("PM / devfreq: Add required OPPs support to passive governor")
    Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/devfreq/governor_passive.c | 3 ++-
    1 file changed, 2 insertions(+), 1 deletion(-)

    diff --git a/drivers/devfreq/governor_passive.c b/drivers/devfreq/governor_passive.c
    index b094132bd20b..fc09324a03e0 100644
    --- a/drivers/devfreq/governor_passive.c
    +++ b/drivers/devfreq/governor_passive.c
    @@ -65,7 +65,7 @@ static int devfreq_passive_get_target_freq(struct devfreq *devfreq,
    dev_pm_opp_put(p_opp);

    if (IS_ERR(opp))
    - return PTR_ERR(opp);
    + goto no_required_opp;

    *freq = dev_pm_opp_get_freq(opp);
    dev_pm_opp_put(opp);
    @@ -73,6 +73,7 @@ static int devfreq_passive_get_target_freq(struct devfreq *devfreq,
    return 0;
    }

    +no_required_opp:
    /*
    * Get the OPP table's index of decided frequency by governor
    * of parent device.
    --
    2.30.2


    \
     
     \ /
      Last update: 2021-07-12 10:35    [W:4.021 / U:0.388 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site