]> www.infradead.org Git - users/jedix/linux-maple.git/commit
rust: drm: add device abstraction
authorAsahi Lina <lina@asahilina.net>
Thu, 10 Apr 2025 23:55:23 +0000 (01:55 +0200)
committerDanilo Krummrich <dakr@kernel.org>
Thu, 24 Apr 2025 12:00:10 +0000 (14:00 +0200)
commit1e4b8896c0f3cb305a32870e1d8624f1155072d5
tree842570e25acc47731100c077243a4656e01b4818
parent07c9016085f95fe9ad90079753f156859c54f476
rust: drm: add device abstraction

Implement the abstraction for a `struct drm_device`.

A `drm::Device` creates a static const `struct drm_driver` filled with
the data from the `drm::Driver` trait implementation of the actual
driver creating the `drm::Device`.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Asahi Lina <lina@asahilina.net>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Link: https://lore.kernel.org/r/20250410235546.43736-5-dakr@kernel.org
[ Rewrite of drm::Device
    * full rewrite of the drm::Device abstraction using the subclassing
      pattern
    * original source archive: http://archive.today/5NxBo

  - Danilo ]
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
rust/bindings/bindings_helper.h
rust/kernel/drm/device.rs [new file with mode: 0644]
rust/kernel/drm/driver.rs
rust/kernel/drm/mod.rs