[Nouveau] [PATCH V2 1/4] clk: allow non-blocking for nouveau_clock_astate()
Ben Skeggs
skeggsb at gmail.com
Wed Jan 7 03:22:04 PST 2015
On Wed, Jan 7, 2015 at 3:10 PM, Vince Hsu <vinceh at nvidia.com> wrote:
> Hello Ben and Martin,
>
> Any comments for this series?
Hey Vince,
Ah sorry, I thought my comment on the other patch indicated I was fine
with it. I'll merge them now so they don't get lost :)
Thanks,
Ben.
>
> Thanks,
> Vince
>
>
> On 12/22/2014 05:11 PM, Vince Hsu wrote:
>>
>> There might be some callers of nouveau_clock_astate(), and they are from
>> inetrrupt context. So we must ensure that this function can be atomic in
>> that condition. This patch adds one parameter which is subsequently passed
>> to nouveau_pstate_calc(). Therefore we can choose whether we want to wait
>> for the pstate work's completion or not.
>>
>> Signed-off-by: Vince Hsu <vinceh at nvidia.com>
>> ---
>>
>> v2: none. (v1 is the RFC actually)
>>
>> nvkm/include/subdev/clock.h | 2 +-
>> nvkm/subdev/clock/base.c | 4 ++--
>> 2 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/nvkm/include/subdev/clock.h b/nvkm/include/subdev/clock.h
>> index 36ed035d4d42..6c36f0e4385b 100644
>> --- a/nvkm/include/subdev/clock.h
>> +++ b/nvkm/include/subdev/clock.h
>> @@ -159,7 +159,7 @@ int nva3_clock_pll_calc(struct nouveau_clock *, struct
>> nvbios_pll *,
>> int clk, struct nouveau_pll_vals *);
>> int nouveau_clock_ustate(struct nouveau_clock *, int req, int pwr);
>> -int nouveau_clock_astate(struct nouveau_clock *, int req, int rel);
>> +int nouveau_clock_astate(struct nouveau_clock *, int req, int rel, bool
>> wait);
>> int nouveau_clock_dstate(struct nouveau_clock *, int req, int rel);
>> int nouveau_clock_tstate(struct nouveau_clock *, int req, int rel);
>> diff --git a/nvkm/subdev/clock/base.c b/nvkm/subdev/clock/base.c
>> index e51b72d47129..b1bbe764fa35 100644
>> --- a/nvkm/subdev/clock/base.c
>> +++ b/nvkm/subdev/clock/base.c
>> @@ -430,13 +430,13 @@ nouveau_clock_ustate(struct nouveau_clock *clk, int
>> req, int pwr)
>> }
>> int
>> -nouveau_clock_astate(struct nouveau_clock *clk, int req, int rel)
>> +nouveau_clock_astate(struct nouveau_clock *clk, int req, int rel, bool
>> wait)
>> {
>> if (!rel) clk->astate = req;
>> if ( rel) clk->astate += rel;
>> clk->astate = min(clk->astate, clk->state_nr - 1);
>> clk->astate = max(clk->astate, 0);
>> - return nouveau_pstate_calc(clk, true);
>> + return nouveau_pstate_calc(clk, wait);
>> }
>> int
>
>
>
> -----------------------------------------------------------------------------------
> This email message is for the sole use of the intended recipient(s) and may
> contain
> confidential information. Any unauthorized review, use, disclosure or
> distribution
> is prohibited. If you are not the intended recipient, please contact the
> sender by
> reply email and destroy all copies of the original message.
> -----------------------------------------------------------------------------------
>
> _______________________________________________
> Nouveau mailing list
> Nouveau at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/nouveau
More information about the Nouveau
mailing list