Re: [PATCH 07/23] drm/i915: add forcewake functions that don't touch runtime PM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2014-02-28 5:44 GMT-03:00 Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>:
> On Thu, Feb 27, 2014 at 07:26:34PM -0300, Paulo Zanoni wrote:
>> From: Paulo Zanoni <paulo.r.zanoni@xxxxxxxxx>
>>
>> To solve a chicken-and-egg problem. Currently when we get/put
>> forcewake we also get/put runtime PM and this works fine because the
>> runtime PM code doesn't need forcewake. But we're going to merge PC8
>> and runtime PM into a single feature, and the PC8 code (the LCPLL
>> code) does need the forcewake, so that specific piece of code needs to
>> call the _no_rpm version so it doesn't try to get runtime PM in the
>> code that gets runtime PM.
>>
>> For now the new functions are unused, we'll use them on the patch that
>> merges PC8 with runtime PM.
>>
>> Also notice that, so simplify things, the put() function doesn't use
>> the workqueue, since the workqueue also puts runtime PM.
>
> Where are these routines called? The names are awful but not quite awful
> enough to avoid confusion. Is it possible to hide these to a single .c?

They are called on patch 09/23, inside function hsw_restore_lcpll(),
from intel_display.c.

I'm always open to naming suggestions. I could try
gen6_gt_force_wake_get_no_runtime_pm.

I could also just try to put all this code inline in the caller, but
IMHO that wouldn't be an improvement over this.

Another thing worth mentioning, is that at hsw_restore_lcpll we expect
the forcewake count to be always zero. So we could do some other kind
of trick relying on that, but I don't think it's very future-proof.

>
> The workqueue doesn't touch rpm here, so there routines could be
> simplified if they remain in intel_uncore.c.

I don't understand what you mean with the sentence above. Could you
please clarify?

Thanks for the review!
Paulo

> -Chris
>
> --
> Chris Wilson, Intel Open Source Technology Centre



-- 
Paulo Zanoni
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux