lkml.org 
[lkml]   [2020]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] interconnect: Add helpers for enabling/disabling a path
From
Date
Hi Matthias,

On 4/28/20 18:28, Matthias Kaehlcke wrote:
> Hi Georgi,
>
> On Tue, Apr 28, 2020 at 12:16:50PM +0300, Georgi Djakov wrote:
>> There is a repeated pattern in multiple drivers where they want to switch
>> the bandwidth between zero and some other value. This is happening often
>> in the suspend/resume callbacks. Let's add helper functions to enable and
>> disable the path, so that callers don't have to take care of remembering
>> the bandwidth values and handle this in the framework instead.
>>
>> With this patch the users can call icc_disable() and icc_enable() to lower
>> their bandwidth request to zero and then restore it back to it's previous
>> value.
>>
>> Suggested-by: Evan Green <evgreen@chromium.org>
>> Suggested-by: Bjorn Andersson <bjorn.andersson@linaro.org>
>> Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>

[..]

>> +
>> + return icc_set_bw(path, path->reqs[0].avg_bw,
>> + path->reqs[0].peak_bw);
>> +}
>
> The two functions are identical except for the assignment of the 'enabled'
> flags. You could add a helper _icc_enable(struct icc_path *path, bool enable)
> and call it from icc_enable/disable().
>

Yes, indeed! Will send a v2. Thank you!

BR,
Georgi

\
 
 \ /
  Last update: 2020-04-28 17:50    [W:0.656 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site