On Thu, Nov 06, 2025 at 05:43:12PM +0200, Jani Nikula wrote:
> On Thu, 06 Nov 2025, Ville Syrjala <[email protected]> wrote:
> > From: Ville Syrjälä <[email protected]>
> >
> > Get rid of all the custom fast vs. slow intel_de_wait_custom()
> > timeouts that have started to spread like a cancer recently.
> >
> > The eventual aim is to get rid of the fast vs. slow timeout
> > stuff entirely and switch over to poll_timeout_us()...
>
> Are you planning on still having intel_de_wait_something_something, or
> do you mean using poll_timeout_us() directly?
>
> I think I like the intel_de_* wait helpers, but just a coherent small
> set, and everything beyond that should use poll_timeout_us() instead of
> adding obscure helpers for one-off cases.
Yeah, I think the helpers are fairly nice for the common stuff so
I guess we should keep them. But not too many, so probably just
intel_de_wait_{,for_set,for_clear}_us().
My current branch has both _us() and _ms() versions of those, but
as discussed in the meeting we should probably just go for _us()
eventually. I think I'll want to have the _ms() stuff around for
a while though since it makes some of the mechanical conversions
easier.
I also haven't quite figured out is what to do about the poll
interval for poll_timeout_us(). I was thinking of starting with
something simple like 'interval=max(timeout/8+1,100)' and then
try to capture some data on how many iterations we end up in
at least some of the more important places (eg. AUX, PPS, etc).
I suppose in the worst case we might need custom intervals in
some places, but I'm hoping some kind of generic approach works
well enough for most stuff.
--
Ville Syrjälä
Intel