Rust for Linux List
 help / color / mirror / Atom feed
From: Beata Michalska <beata.michalska@arm.com>
To: Miguel Ojeda <ojeda@kernel.org>,
	Danilo Krummrich <dakr@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J . Wysocki" <rafael@kernel.org>
Cc: Boqun Feng <boqun@kernel.org>, Gary Guo <gary@garyguo.net>,
	Bjorn Roy Baron <bjorn3_gh@protonmail.com>,
	Benno Lossin <lossin@kernel.org>,
	Andreas Hindborg <a.hindborg@kernel.org>,
	Alice Ryhl <aliceryhl@google.com>,
	Trevor Gross <tmgross@umich.edu>,
	Daniel Almeida <daniel.almeida@collabora.com>,
	Boris Brezillon <boris.brezillon@collabora.com>,
	rust-for-linux@vger.kernel.org, driver-core@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: [RFC PATCH 0/3] Rust: add runtime PM support
Date: Thu, 14 May 2026 17:09:02 +0200	[thread overview]
Message-ID: <20260514150957.3501924-1-beata.michalska@arm.com> (raw)

This series adds initial runtime PM support for Rust drivers.

The concept for Rust abstraction gets introduced in the first patch
in this series. It provides generated dev_pm_ops callbacks for runtime
suspend/resume, tracking runtime PM state, and allowing drivers to carry
custom state across transitions. It also introduces helper types for
common usage patterns and basic PM configuration.

Second one integrates dev_pm_ops into the Rust platform driver abstraction,
enabling drivers to register PM callbacks with the core.

The last in the series is provided for demonstrative purposes
(not intended to be an actual merge material).

This has been lightly tested with the Tyr driver.


Beata Michalska (3):
  rust: Add runtime PM support
  rust/platform: Add support for runtime PM
  drm/tyr: wire runtime PM hooks

 drivers/gpu/drm/tyr/driver.rs   | 123 ++++-
 drivers/gpu/drm/tyr/file.rs     |   3 +
 rust/bindings/bindings_helper.h |   1 +
 rust/helpers/helpers.c          |   1 +
 rust/helpers/pm_runtime.c       |  38 ++
 rust/kernel/lib.rs              |   1 +
 rust/kernel/platform.rs         |  18 +
 rust/kernel/pm.rs               | 924 ++++++++++++++++++++++++++++++++
 8 files changed, 1086 insertions(+), 23 deletions(-)
 create mode 100644 rust/helpers/pm_runtime.c
 create mode 100644 rust/kernel/pm.rs

-- 
2.43.0


             reply	other threads:[~2026-05-14 15:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-14 15:09 Beata Michalska [this message]
2026-05-14 15:09 ` [RFC PATCH 1/3] rust: Add runtime PM support Beata Michalska
2026-05-14 15:09 ` [RFC PATCH 2/3] rust/platform: Add support for runtime PM Beata Michalska
2026-05-14 15:09 ` [RFC PATCH 3/3] [DO NOT MERGE] drm/tyr: wire runtime PM hooks Beata Michalska

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=20260514150957.3501924-1-beata.michalska@arm.com \
    --to=beata.michalska@arm.com \
    --cc=a.hindborg@kernel.org \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun@kernel.org \
    --cc=boris.brezillon@collabora.com \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=driver-core@lists.linux.dev \
    --cc=gary@garyguo.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=ojeda@kernel.org \
    --cc=rafael@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tmgross@umich.edu \
    /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