public inbox for rust-for-linux@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] drm/tyr: replace fixed sleeps with read_poll_timeout
       [not found] <20260307204708.60398-1-iprintercanon@gmail.com>
@ 2026-03-09  9:58 ` Alice Ryhl
  0 siblings, 0 replies; only message in thread
From: Alice Ryhl @ 2026-03-09  9:58 UTC (permalink / raw)
  To: Artem Lytkin
  Cc: dri-devel, daniel.almeida, dakr, airlied, simona, rust-for-linux,
	boris.brezillon

Cc'ing rust-for-linux list.

On Sat, Mar 07, 2026 at 11:47:08PM +0300, Artem Lytkin wrote:
> The Tyr driver uses fixed 100ms sleeps followed by manual register
> checks in l2_power_on() and issue_soft_reset(). Both functions have
> TODO comments noting that read_poll_timeout() was not yet available
> in Rust.
> 
> read_poll_timeout() has since been implemented in the kernel (at
> rust/kernel/io/poll.rs) and is actively used by other Rust drivers.
> 
> Replace the fixed sleeps with proper read_poll_timeout() calls:
>   - l2_power_on: 100us poll interval, 20ms timeout (matches the C
>     panthor driver)
>   - issue_soft_reset: 1ms poll interval, 100ms timeout (the C driver
>     uses interrupt-driven wait_event_timeout; polling is used here as
>     the Tyr driver does not yet have IRQ support)
> 
> This also changes the error code on timeout from EIO to ETIMEDOUT,
> which better reflects the nature of the failure. No callers in the
> driver inspect the specific error code.
> 
> Signed-off-by: Artem Lytkin <iprintercanon@gmail.com>

I thought we already had a patch fixing these? Did it get lost
somewhere?

Alice

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-03-09  9:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20260307204708.60398-1-iprintercanon@gmail.com>
2026-03-09  9:58 ` [PATCH] drm/tyr: replace fixed sleeps with read_poll_timeout Alice Ryhl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox