public inbox for rust-for-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Alice Ryhl <aliceryhl@google.com>
To: Artem Lytkin <iprintercanon@gmail.com>
Cc: dri-devel@lists.freedesktop.org, daniel.almeida@collabora.com,
	 dakr@kernel.org, airlied@gmail.com, simona@ffwll.ch,
	 rust-for-linux@vger.kernel.org, boris.brezillon@collabora.com
Subject: Re: [PATCH] drm/tyr: replace fixed sleeps with read_poll_timeout
Date: Mon, 9 Mar 2026 09:58:14 +0000	[thread overview]
Message-ID: <aa6Ztn4Sul7Os1nL@google.com> (raw)
In-Reply-To: <20260307204708.60398-1-iprintercanon@gmail.com>

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

           reply	other threads:[~2026-03-09  9:58 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20260307204708.60398-1-iprintercanon@gmail.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aa6Ztn4Sul7Os1nL@google.com \
    --to=aliceryhl@google.com \
    --cc=airlied@gmail.com \
    --cc=boris.brezillon@collabora.com \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=iprintercanon@gmail.com \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=simona@ffwll.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox