Skip to contentSkip to conversation

drm/tyr: Use DRM device type alias across driver

PATCH Applied Deborah Brouwer 3 participants 4 messages Mar 2 – Mar 9

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/tyr: Use DRM device type alias across driver

Currently Tyr defines a convenience type alias for its DRM device type, TyrDrmDevice but it does not use the alias outside of tyr/driver.rs.

Replace drm::Device<TyrDrmDriver> with the alias TyrDrmDevice across the driver.

This change will ease future upstream Tyr development by reducing the diffs when multiple series are touching these files.

No functional changes are intended.

---
 drivers/gpu/drm/tyr/file.rs | 7 +++++--
 drivers/gpu/drm/tyr/gem.rs  | 7 +++++--
 2 files changed, 10 insertions(+), 4 deletions(-)
drivers/gpu/drm/tyr/file.rs +5 -2
index 450be5ab9aaf..31411da203c5 100644
@@ -7,7 +7,10 @@
     uapi, //
 };
 
-use crate::driver::TyrDrmDriver;
+use crate::driver::{
+    TyrDrmDevice,
+    TyrDrmDriver, //
+};
 
 #[pin_data]
 pub(crate) struct TyrDrmFileData {}
@@ -25,7 +28,7 @@ fn open(_dev: &drm::Device<Self::Driver>) -> Result<Pin<KBox<Self>>> {
 
 impl TyrDrmFileData {
     pub(crate) fn dev_query(
-        ddev: &drm::Device<TyrDrmDriver>,
+        ddev: &TyrDrmDevice,
         devquery: &mut uapi::drm_panthor_dev_query,
         _file: &TyrDrmFile,
     ) -> Result<u32> {
drivers/gpu/drm/tyr/gem.rs +5 -2
index 514524ae07ef..5cd0cd9585e8 100644
@@ -5,7 +5,10 @@
     prelude::*, //
 };
 
-use crate::driver::TyrDrmDriver;
+use crate::driver::{
+    TyrDrmDevice,
+    TyrDrmDriver, //
+};
 
 /// GEM Object inner driver data
 #[pin_data]
@@ -14,7 +17,7 @@ pub(crate) struct TyrObject {}
 impl gem::DriverObject for TyrObject {
     type Driver = TyrDrmDriver;
 
-    fn new(_dev: &kernel::drm::Device<TyrDrmDriver>, _size: usize) -> impl PinInit<Self, Error> {
+    fn new(_dev: &TyrDrmDevice, _size: usize) -> impl PinInit<Self, Error> {
         try_pin_init!(TyrObject {})
     }
 }

base-commit: 15da5bc9f3adab7242867db0251fe451ac3ddb72

Signature · 1 line
2.52.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Deborah Brouwer

Currently Tyr defines a convenience type alias for its DRM device type, TyrDrmDevice but it does not use the alias outside of tyr/driver.rs.

Replace drm::Device<TyrDrmDriver> with the alias TyrDrmDevice across the driver.

Quoted 6 lines

This change will ease future upstream Tyr development by reducing the diffs when multiple series are touching these files.

No functional changes are intended.

Reviewed-by on v1 1/1
#2 lore raw
In reply to Deborah Brouwer
Quoted 6 lines · On Mon, 2 Mar 2026 12:23:31 -0800 Deborah Brouwer…

Currently Tyr defines a convenience type alias for its DRM device type, TyrDrmDevice but it does not use the alias outside of tyr/driver.rs.

Replace drm::Device<TyrDrmDriver> with the alias TyrDrmDevice across the driver.

Quoted 6 lines

This change will ease future upstream Tyr development by reducing the diffs when multiple series are touching these files.

No functional changes are intended.

Quoted 57 lines
---
 drivers/gpu/drm/tyr/file.rs | 7 +++++--
 drivers/gpu/drm/tyr/gem.rs  | 7 +++++--
 2 files changed, 10 insertions(+), 4 deletions(-)
drivers/gpu/drm/tyr/file.rs +5 -2
index 450be5ab9aaf..31411da203c5 100644
@@ -7,7 +7,10 @@
     uapi, //
 };
 
-use crate::driver::TyrDrmDriver;
+use crate::driver::{
+    TyrDrmDevice,
+    TyrDrmDriver, //
+};
 
 #[pin_data]
 pub(crate) struct TyrDrmFileData {}
@@ -25,7 +28,7 @@ fn open(_dev: &drm::Device<Self::Driver>) -> Result<Pin<KBox<Self>>> {
 
 impl TyrDrmFileData {
     pub(crate) fn dev_query(
-        ddev: &drm::Device<TyrDrmDriver>,
+        ddev: &TyrDrmDevice,
         devquery: &mut uapi::drm_panthor_dev_query,
         _file: &TyrDrmFile,
     ) -> Result<u32> {
drivers/gpu/drm/tyr/gem.rs +5 -2
index 514524ae07ef..5cd0cd9585e8 100644
@@ -5,7 +5,10 @@
     prelude::*, //
 };
 
-use crate::driver::TyrDrmDriver;
+use crate::driver::{
+    TyrDrmDevice,
+    TyrDrmDriver, //
+};
 
 /// GEM Object inner driver data
 #[pin_data]
@@ -14,7 +17,7 @@ pub(crate) struct TyrObject {}
 impl gem::DriverObject for TyrObject {
     type Driver = TyrDrmDriver;
 
-    fn new(_dev: &kernel::drm::Device<TyrDrmDriver>, _size: usize) -> impl PinInit<Self, Error> {
+    fn new(_dev: &TyrDrmDevice, _size: usize) -> impl PinInit<Self, Error> {
         try_pin_init!(TyrObject {})
     }
 }

base-commit: 15da5bc9f3adab7242867db0251fe451ac3ddb72

maintainer Applied
#3 lore raw
In reply to Deborah Brouwer
Quoted 6 lines · Deborah Brouwer

Currently Tyr defines a convenience type alias for its DRM device type, TyrDrmDevice but it does not use the alias outside of tyr/driver.rs.

Replace drm::Device<TyrDrmDriver> with the alias TyrDrmDevice across the driver.

Quoted 6 lines

This change will ease future upstream Tyr development by reducing the diffs when multiple series are touching these files.

No functional changes are intended.

Merged into drm-rust-next. Thanks!