From: Thomas Zimmermann <tzimmermann@suse.de>
To: pengfuyuan <pengfuyuan@kylinos.cn>,
Danilo Krummrich <dakr@kernel.org>,
Alice Ryhl <aliceryhl@google.com>,
Daniel Almeida <daniel.almeida@collabora.com>,
Miguel Ojeda <ojeda@kernel.org>
Cc: "Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Trevor Gross" <tmgross@umich.edu>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Rafael J . Wysocki" <rafael@kernel.org>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>, "Helge Deller" <deller@gmx.de>,
"Hans de Goede" <hansg@kernel.org>, "Lee Jones" <lee@kernel.org>,
"Sam Ravnborg" <sam@ravnborg.org>,
"Zsolt Kajtar" <soci@c64.rulez.org>,
"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org
Subject: Re: [PATCH v1 v1 0/4] [RUST] Framebuffer driver support
Date: Mon, 26 Jan 2026 11:01:40 +0100 [thread overview]
Message-ID: <ed48e82a-cb94-477f-83c4-b2d87ae3cde6@suse.de> (raw)
In-Reply-To: <20260126081744.781392-1-pengfuyuan@kylinos.cn>
Hi
Am 26.01.26 um 09:17 schrieb pengfuyuan:
> This patch series adds Rust bindings and safe abstractions for the Linux
> framebuffer subsystem, enabling framebuffer drivers to be implemented in Rust.
The framebuffer subsystem is obsolete and has been deprecated for a
decade. No new drivers accepted. Anything that really wants fbdev
already has a driver. Can we please let it die?
Best regards
Thomas
>
> The series consists of 4 patches:
>
> 1. rust: io: mem: add ioremap_wc support
> Adds write-combining memory mapping support to the Rust iomem abstraction,
> which is essential for framebuffer memory regions that benefit from
> write-combining semantics.
>
> 2. rust: device: add platdata accessors
> Implements generic accessors for platform data, enabling drivers to access
> platform-provided configuration. This is needed for framebuffer drivers
> that use platform data for configuration.
>
> 3. rust: fb: add framebuffer driver support
> Adds the core framebuffer framework abstraction, including:
> - Device abstraction (`fb::Device`) with reference counting via `AlwaysRefCounted`
> - Driver and Operations traits (`fb::Driver`, `fb::Operations`)
> - Screen information wrappers (`fb::FixScreenInfo`, `fb::VarScreenInfo`)
> - I/O operation helpers (`fb_io_read`, `fb_io_write`, `fb_io_mmap`)
> - Blit operation helpers (`cfb_fillrect`, `cfb_copyarea`, `cfb_imageblit`)
>
> 4. rust: fb: add simplefb test driver
> Adds a test driver that validates the framebuffer framework by porting
> the C simplefb driver to Rust. This driver serves as both a validation
> tool and a reference implementation for future Rust framebuffer drivers.
>
> The implementation follows the same patterns established in the DRM subsystem
> and maintains full compatibility with the existing C framebuffer subsystem.
> All C callbacks are properly bridged to Rust trait methods via the `Operations`
> trait, memory safety is ensured through proper use of `Opaque<fb_info>`, `ARef`,
> and `AlwaysRefCounted` for reference counting, type invariants are documented
> and enforced through the type system, and resource cleanup is handled via RAII
> with proper cleanup order.
>
> Testing:
> --------
> This series has been tested on:
> - ARM64 platforms with various display configurations
> - AMD RX550 graphics card
> - Moore Threads S30 graphics card
> - Multiple other graphics cards
>
> All tested configurations show normal display functionality with proper
> framebuffer initialization, rendering operations (including I/O, color register
> management, and blitting), memory mapping, and resource cleanup. The simplefb
> test driver successfully demonstrates the usage of all framebuffer framework
> APIs and validates the abstraction's correctness.
>
> The simplefb test driver serves as both a validation tool and a reference
> implementation for future Rust framebuffer drivers.
>
>
> pengfuyuan (4):
> rust: io: mem: add ioremap_wc support
> rust: device: add platdata accessors
> rust: fb: add framebuffer driver support
> rust: fb: add simplefb test driver
>
> drivers/video/fbdev/Kconfig | 21 +
> drivers/video/fbdev/Makefile | 1 +
> drivers/video/fbdev/simplefb_rust.rs | 653 +++++++++++++++++++++++++++
> rust/bindings/bindings_helper.h | 2 +
> rust/helpers/device.c | 5 +
> rust/helpers/io.c | 5 +
> rust/kernel/device.rs | 31 ++
> rust/kernel/fb/blit.rs | 106 +++++
> rust/kernel/fb/device.rs | 463 +++++++++++++++++++
> rust/kernel/fb/driver.rs | 169 +++++++
> rust/kernel/fb/io.rs | 76 ++++
> rust/kernel/fb/mod.rs | 23 +
> rust/kernel/fb/screeninfo.rs | 318 +++++++++++++
> rust/kernel/io/mem.rs | 71 +++
> rust/kernel/lib.rs | 2 +
> 15 files changed, 1946 insertions(+)
> create mode 100644 drivers/video/fbdev/simplefb_rust.rs
> create mode 100644 rust/kernel/fb/blit.rs
> create mode 100644 rust/kernel/fb/device.rs
> create mode 100644 rust/kernel/fb/driver.rs
> create mode 100644 rust/kernel/fb/io.rs
> create mode 100644 rust/kernel/fb/mod.rs
> create mode 100644 rust/kernel/fb/screeninfo.rs
>
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)
next prev parent reply other threads:[~2026-01-26 10:01 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-26 8:17 [PATCH v1 v1 0/4] [RUST] Framebuffer driver support pengfuyuan
2026-01-26 8:17 ` [PATCH v1 v1 1/4] rust: io: mem: add ioremap_wc support pengfuyuan
2026-01-26 8:17 ` [PATCH v1 v1 2/4] rust: device: add platdata accessors pengfuyuan
2026-01-26 8:17 ` [PATCH v1 v1 3/4] rust: fb: add framebuffer driver support pengfuyuan
2026-01-26 22:29 ` kernel test robot
2026-01-26 8:17 ` [PATCH v1 v1 4/4] rust: fb: add simplefb test driver pengfuyuan
2026-01-26 10:01 ` Thomas Zimmermann [this message]
2026-01-26 10:28 ` [PATCH v1 v1 0/4] [RUST] Framebuffer driver support Alexandre Courbot
2026-01-26 11:46 ` Miguel Ojeda
2026-01-27 8:30 ` pengfuyuan
2026-01-27 8:04 ` pengfuyuan
2026-01-27 8:16 ` Helge Deller
2026-01-27 8:58 ` pengfuyuan
2026-01-27 9:35 ` Greg Kroah-Hartman
2026-01-27 9:38 ` Helge Deller
2026-01-28 14:55 ` Alexandre Courbot
2026-01-26 12:27 ` Helge Deller
2026-01-26 10:32 ` Greg Kroah-Hartman
2026-01-26 12:15 ` Miguel Ojeda
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=ed48e82a-cb94-477f-83c4-b2d87ae3cde6@suse.de \
--to=tzimmermann@suse.de \
--cc=a.hindborg@kernel.org \
--cc=airlied@gmail.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=gary@garyguo.net \
--cc=gregkh@linuxfoundation.org \
--cc=hansg@kernel.org \
--cc=lee@kernel.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=pengfuyuan@kylinos.cn \
--cc=rafael@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=sam@ravnborg.org \
--cc=simona@ffwll.ch \
--cc=soci@c64.rulez.org \
--cc=tmgross@umich.edu \
--cc=ville.syrjala@linux.intel.com \
/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