public inbox for linux-next@vger.kernel.org
 help / color / mirror / Atom feed
* linux-next: manual merge of the drm tree with the rust tree
@ 2026-04-03 13:34 Mark Brown
  2026-04-03 13:48 ` Miguel Ojeda
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2026-04-03 13:34 UTC (permalink / raw)
  To: Dave Airlie, DRI
  Cc: Alice Ryhl, Boris Brezillon, Deborah Brouwer,
	Linux Kernel Mailing List, Linux Next Mailing List, Miguel Ojeda

[-- Attachment #1: Type: text/plain, Size: 6265 bytes --]

Hi all,

Today's linux-next merge of the drm tree got a conflict in:

  drivers/gpu/drm/tyr/driver.rs

between commit:

  ef90b103e8f76 ("tyr: remove impl Send/Sync for TyrData")

from the rust tree and commit:

  15da5bc9f3ada ("drm/tyr: Clarify driver/device type names")

from the drm tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

diff --combined drivers/gpu/drm/tyr/driver.rs
index e833e9f537b02,6114346415805..0000000000000
--- a/drivers/gpu/drm/tyr/driver.rs
+++ b/drivers/gpu/drm/tyr/driver.rs
@@@ -1,44 -1,56 +1,56 @@@
  // SPDX-License-Identifier: GPL-2.0 or MIT
  
- use kernel::clk::Clk;
- use kernel::clk::OptionalClk;
- use kernel::device::Bound;
- use kernel::device::Core;
- use kernel::device::Device;
- use kernel::devres::Devres;
- use kernel::drm;
- use kernel::drm::ioctl;
- use kernel::io::poll;
- use kernel::new_mutex;
- use kernel::of;
- use kernel::platform;
- use kernel::prelude::*;
- use kernel::regulator;
- use kernel::regulator::Regulator;
- use kernel::sizes::SZ_2M;
- use kernel::sync::aref::ARef;
- use kernel::sync::Arc;
- use kernel::sync::Mutex;
- use kernel::time;
+ use kernel::{
+     clk::{
+         Clk,
+         OptionalClk, //
+     },
+     device::{
+         Bound,
+         Core,
+         Device, //
+     },
+     devres::Devres,
+     drm,
+     drm::ioctl,
+     io::poll,
+     new_mutex,
+     of,
+     platform,
+     prelude::*,
+     regulator,
+     regulator::Regulator,
+     sizes::SZ_2M,
+     sync::{
+         aref::ARef,
+         Arc,
+         Mutex, //
+     },
+     time, //
+ };
  
- use crate::file::File;
- use crate::gem::TyrObject;
- use crate::gpu;
- use crate::gpu::GpuInfo;
- use crate::regs;
+ use crate::{
+     file::TyrDrmFileData,
+     gem::TyrObject,
+     gpu,
+     gpu::GpuInfo,
+     regs, //
+ };
  
  pub(crate) type IoMem = kernel::io::mem::IoMem<SZ_2M>;
  
+ pub(crate) struct TyrDrmDriver;
+ 
  /// Convenience type alias for the DRM device type for this driver.
- pub(crate) type TyrDevice = drm::Device<TyrDriver>;
+ pub(crate) type TyrDrmDevice = drm::Device<TyrDrmDriver>;
  
  #[pin_data(PinnedDrop)]
- pub(crate) struct TyrDriver {
-     _device: ARef<TyrDevice>,
+ pub(crate) struct TyrPlatformDriverData {
+     _device: ARef<TyrDrmDevice>,
  }
  
  #[pin_data(PinnedDrop)]
- pub(crate) struct TyrData {
+ pub(crate) struct TyrDrmDeviceData {
      pub(crate) pdev: ARef<platform::Device>,
  
      #[pin]
@@@ -53,6 -65,18 +65,6 @@@
      pub(crate) gpu_info: GpuInfo,
  }
  
 -// Both `Clk` and `Regulator` do not implement `Send` or `Sync`, but they
 -// should. There are patches on the mailing list to address this, but they have
 -// not landed yet.
 -//
 -// For now, add this workaround so that this patch compiles with the promise
 -// that it will be removed in a future patch.
 -//
 -// SAFETY: This will be removed in a future patch.
 -unsafe impl Send for TyrDrmDeviceData {}
 -// SAFETY: This will be removed in a future patch.
 -unsafe impl Sync for TyrDrmDeviceData {}
 -
  fn issue_soft_reset(dev: &Device<Bound>, iomem: &Devres<IoMem>) -> Result {
      regs::GPU_CMD.write(dev, iomem, regs::GPU_CMD_SOFT_RESET)?;
  
@@@ -70,14 -94,14 +82,14 @@@
  kernel::of_device_table!(
      OF_TABLE,
      MODULE_OF_TABLE,
-     <TyrDriver as platform::Driver>::IdInfo,
+     <TyrPlatformDriverData as platform::Driver>::IdInfo,
      [
          (of::DeviceId::new(c"rockchip,rk3588-mali"), ()),
          (of::DeviceId::new(c"arm,mali-valhall-csf"), ())
      ]
  );
  
- impl platform::Driver for TyrDriver {
+ impl platform::Driver for TyrPlatformDriverData {
      type IdInfo = ();
      const OF_ID_TABLE: Option<of::IdTable<Self::IdInfo>> = Some(&OF_TABLE);
  
@@@ -107,7 -131,7 +119,7 @@@
  
          let platform: ARef<platform::Device> = pdev.into();
  
-         let data = try_pin_init!(TyrData {
+         let data = try_pin_init!(TyrDrmDeviceData {
                  pdev: platform.clone(),
                  clks <- new_mutex!(Clocks {
                      core: core_clk,
@@@ -121,10 -145,10 +133,10 @@@
                  gpu_info,
          });
  
-         let tdev: ARef<TyrDevice> = drm::Device::new(pdev.as_ref(), data)?;
-         drm::driver::Registration::new_foreign_owned(&tdev, pdev.as_ref(), 0)?;
+         let ddev: ARef<TyrDrmDevice> = drm::Device::new(pdev.as_ref(), data)?;
+         drm::driver::Registration::new_foreign_owned(&ddev, pdev.as_ref(), 0)?;
  
-         let driver = TyrDriver { _device: tdev };
+         let driver = TyrPlatformDriverData { _device: ddev };
  
          // We need this to be dev_info!() because dev_dbg!() does not work at
          // all in Rust for now, and we need to see whether probe succeeded.
@@@ -134,12 -158,12 +146,12 @@@
  }
  
  #[pinned_drop]
- impl PinnedDrop for TyrDriver {
+ impl PinnedDrop for TyrPlatformDriverData {
      fn drop(self: Pin<&mut Self>) {}
  }
  
  #[pinned_drop]
- impl PinnedDrop for TyrData {
+ impl PinnedDrop for TyrDrmDeviceData {
      fn drop(self: Pin<&mut Self>) {
          // TODO: the type-state pattern for Clks will fix this.
          let clks = self.clks.lock();
@@@ -160,15 -184,15 +172,15 @@@ const INFO: drm::DriverInfo = drm::Driv
  };
  
  #[vtable]
- impl drm::Driver for TyrDriver {
-     type Data = TyrData;
-     type File = File;
+ impl drm::Driver for TyrDrmDriver {
+     type Data = TyrDrmDeviceData;
+     type File = TyrDrmFileData;
      type Object = drm::gem::Object<TyrObject>;
  
      const INFO: drm::DriverInfo = INFO;
  
      kernel::declare_drm_ioctls! {
-         (PANTHOR_DEV_QUERY, drm_panthor_dev_query, ioctl::RENDER_ALLOW, File::dev_query),
+         (PANTHOR_DEV_QUERY, drm_panthor_dev_query, ioctl::RENDER_ALLOW, TyrDrmFileData::dev_query),
      }
  }
  

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: manual merge of the drm tree with the rust tree
  2026-04-03 13:34 Mark Brown
@ 2026-04-03 13:48 ` Miguel Ojeda
  0 siblings, 0 replies; 6+ messages in thread
From: Miguel Ojeda @ 2026-04-03 13:48 UTC (permalink / raw)
  To: Mark Brown, Daniel Almeida
  Cc: Dave Airlie, DRI, Alice Ryhl, Boris Brezillon, Deborah Brouwer,
	Linux Kernel Mailing List, Linux Next Mailing List, Miguel Ojeda

On Fri, Apr 3, 2026 at 3:34 PM Mark Brown <broonie@kernel.org> wrote:
>
> I fixed it up (see below) and can carry the fix as necessary. This

Looks good, and I will build the tag later, but Cc'ing Daniel as well
so that he is aware.

Thanks!

Cheers,
Miguel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* linux-next: manual merge of the drm tree with the rust tree
@ 2026-04-06 13:39 Mark Brown
  2026-04-06 14:34 ` Miguel Ojeda
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2026-04-06 13:39 UTC (permalink / raw)
  To: Dave Airlie, DRI
  Cc: Alexandre Courbot, Asahi Lina, Danilo Krummrich, Joel Fernandes,
	Linux Kernel Mailing List, Linux Next Mailing List, Miguel Ojeda

[-- Attachment #1: Type: text/plain, Size: 3512 bytes --]

Hi all,

Today's linux-next merge of the drm tree got conflicts in:

  rust/kernel/lib.rs
  scripts/Makefile.build

between commit:

  7fa2b092b1ff8 ("rust: kbuild: remove `feature(...)`s that are now stable")

from the rust tree and commits:

  80df573af9ef3 ("rust: drm: gem: shmem: Add DRM shmem helper abstraction")
  3cc319d5f433a ("rust: enable the `generic_arg_infer` feature")
  f9f0b4a1f35d3 ("rust: interop: Add list module for C linked list interface")

from the drm tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

diff --cc rust/kernel/lib.rs
index 9c2468ed94d8d,40de00ce4f971..0000000000000
--- a/rust/kernel/lib.rs
+++ b/rust/kernel/lib.rs
@@@ -16,8 -16,35 +16,9 @@@
  // Please see https://github.com/Rust-for-Linux/linux/issues/2 for details on
  // the unstable features in use.
  //
 -// Stable since Rust 1.79.0.
 -#![feature(generic_nonzero)]
 -#![feature(inline_const)]
 -#![feature(pointer_is_aligned)]
 -#![feature(slice_ptr_len)]
 -//
 -// Stable since Rust 1.80.0.
 -#![feature(slice_flatten)]
 -//
 -// Stable since Rust 1.81.0.
 -#![feature(lint_reasons)]
 -//
 -// Stable since Rust 1.82.0.
 -#![feature(offset_of_nested)]
 -#![feature(raw_ref_op)]
 -//
 -// Stable since Rust 1.83.0.
 -#![feature(const_maybe_uninit_as_mut_ptr)]
 -#![feature(const_mut_refs)]
 -#![feature(const_option)]
 -#![feature(const_ptr_write)]
 -#![feature(const_refs_to_cell)]
 -#![feature(const_refs_to_static)]
 -//
--// Stable since Rust 1.84.0.
--#![feature(strict_provenance)]
+ //
+ // Stable since Rust 1.89.0.
+ #![feature(generic_arg_infer)]
  //
  // Expected to become stable.
  #![feature(arbitrary_self_types)]
diff --cc scripts/Makefile.build
index 9a87a7edbc871,010d08472fb2b..0000000000000
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@@ -310,14 -310,19 +310,14 @@@ $(obj)/%.lst: $(obj)/%.c FORC
  
  # The features in this list are the ones allowed for non-`rust/` code.
  #
 -#   - Stable since Rust 1.79.0: `feature(slice_ptr_len)`.
 -#   - Stable since Rust 1.81.0: `feature(lint_reasons)`.
 -#   - Stable since Rust 1.82.0: `feature(asm_const)`,
 -#     `feature(offset_of_nested)`, `feature(raw_ref_op)`.
--#   - Stable since Rust 1.84.0: `feature(strict_provenance)`.
  #   - Stable since Rust 1.87.0: `feature(asm_goto)`.
+ #   - Stable since Rust 1.89.0: `feature(generic_arg_infer)`.
  #   - Expected to become stable: `feature(arbitrary_self_types)`.
  #   - To be determined: `feature(used_with_arg)`.
  #
  # Please see https://github.com/Rust-for-Linux/linux/issues/2 for details on
  # the unstable features in use.
- rust_allowed_features := arbitrary_self_types,asm_goto,slice_ptr_len,strict_provenance,used_with_arg
 -rust_allowed_features := asm_const,asm_goto,arbitrary_self_types,generic_arg_infer,lint_reasons,offset_of_nested,raw_ref_op,slice_ptr_len,strict_provenance,used_with_arg
++rust_allowed_features := arbitrary_self_types,asm_goto,generic_arg_infer,used_with_arg
  
  # `--out-dir` is required to avoid temporaries being created by `rustc` in the
  # current working directory, which may be not accessible in the out-of-tree

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: manual merge of the drm tree with the rust tree
  2026-04-06 13:39 linux-next: manual merge of the drm tree with the rust tree Mark Brown
@ 2026-04-06 14:34 ` Miguel Ojeda
  0 siblings, 0 replies; 6+ messages in thread
From: Miguel Ojeda @ 2026-04-06 14:34 UTC (permalink / raw)
  To: Mark Brown
  Cc: Dave Airlie, DRI, Alexandre Courbot, Asahi Lina, Danilo Krummrich,
	Joel Fernandes, Linux Kernel Mailing List,
	Linux Next Mailing List, Miguel Ojeda

On Mon, Apr 6, 2026 at 3:39 PM Mark Brown <broonie@kernel.org> wrote:
>
> I fixed it up (see below) and can carry the fix as necessary.

Looks good, thanks!

Cheers,
Miguel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* linux-next: manual merge of the drm tree with the rust tree
@ 2026-04-08 14:10 Mark Brown
  2026-04-08 14:20 ` Miguel Ojeda
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2026-04-08 14:10 UTC (permalink / raw)
  To: Dave Airlie, DRI
  Cc: Alexandre Courbot, Asahi Lina, Danilo Krummrich,
	Linux Kernel Mailing List, Linux Next Mailing List, Miguel Ojeda

Hi all,

Today's linux-next merge of the drm tree got conflicts in:

  rust/kernel/lib.rs
  scripts/Makefile.build

between commit:

  d1aa40daa777c ("rust: kbuild: remove `feature(...)`s that are now stable")

from the rust tree and commits:

  80df573af9ef3 ("rust: drm: gem: shmem: Add DRM shmem helper abstraction")
  3cc319d5f433a ("rust: enable the `generic_arg_infer` feature")

from the drm tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

diff --cc drivers/gpu/drm/tyr/driver.rs
index e833e9f537b02,6114346415805..0000000000000
--- a/drivers/gpu/drm/tyr/driver.rs
+++ b/drivers/gpu/drm/tyr/driver.rs
diff --cc rust/kernel/lib.rs
index 0fa9d820fe7c8,40de00ce4f971..0000000000000
--- a/rust/kernel/lib.rs
+++ b/rust/kernel/lib.rs
@@@ -16,9 -16,38 +16,12 @@@
  // Please see https://github.com/Rust-for-Linux/linux/issues/2 for details on
  // the unstable features in use.
  //
 -// Stable since Rust 1.79.0.
 -#![feature(generic_nonzero)]
 -#![feature(inline_const)]
 -#![feature(pointer_is_aligned)]
 -#![feature(slice_ptr_len)]
 -//
 -// Stable since Rust 1.80.0.
 -#![feature(slice_flatten)]
 -//
 -// Stable since Rust 1.81.0.
 -#![feature(lint_reasons)]
 -//
 -// Stable since Rust 1.82.0.
 -#![feature(offset_of_nested)]
 -#![feature(raw_ref_op)]
 -//
 -// Stable since Rust 1.83.0.
 -#![feature(const_maybe_uninit_as_mut_ptr)]
 -#![feature(const_mut_refs)]
 -#![feature(const_option)]
 -#![feature(const_ptr_write)]
 -#![feature(const_refs_to_cell)]
 -#![feature(const_refs_to_static)]
 -//
 -// Stable since Rust 1.84.0.
 -#![feature(strict_provenance)]
 -//
+ // Stable since Rust 1.89.0.
+ #![feature(generic_arg_infer)]
+ //
  // Expected to become stable.
  #![feature(arbitrary_self_types)]
 +#![feature(derive_coerce_pointee)]
  //
  // To be determined.
  #![feature(used_with_arg)]
diff --cc scripts/Makefile.build
index 57cff77c28973,010d08472fb2b..0000000000000
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@@ -310,13 -310,19 +310,14 @@@ $(obj)/%.lst: $(obj)/%.c FORC
  
  # The features in this list are the ones allowed for non-`rust/` code.
  #
 -#   - Stable since Rust 1.79.0: `feature(slice_ptr_len)`.
 -#   - Stable since Rust 1.81.0: `feature(lint_reasons)`.
 -#   - Stable since Rust 1.82.0: `feature(asm_const)`,
 -#     `feature(offset_of_nested)`, `feature(raw_ref_op)`.
 -#   - Stable since Rust 1.84.0: `feature(strict_provenance)`.
  #   - Stable since Rust 1.87.0: `feature(asm_goto)`.
+ #   - Stable since Rust 1.89.0: `feature(generic_arg_infer)`.
  #   - Expected to become stable: `feature(arbitrary_self_types)`.
  #   - To be determined: `feature(used_with_arg)`.
  #
  # Please see https://github.com/Rust-for-Linux/linux/issues/2 for details on
  # the unstable features in use.
- rust_allowed_features := arbitrary_self_types,asm_goto,used_with_arg
 -rust_allowed_features := asm_const,asm_goto,arbitrary_self_types,generic_arg_infer,lint_reasons,offset_of_nested,raw_ref_op,slice_ptr_len,strict_provenance,used_with_arg
++rust_allowed_features := arbitrary_self_types,asm_goto,generic_arg_infer,used_with_arg
  
  # `--out-dir` is required to avoid temporaries being created by `rustc` in the
  # current working directory, which may be not accessible in the out-of-tree

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: manual merge of the drm tree with the rust tree
  2026-04-08 14:10 Mark Brown
@ 2026-04-08 14:20 ` Miguel Ojeda
  0 siblings, 0 replies; 6+ messages in thread
From: Miguel Ojeda @ 2026-04-08 14:20 UTC (permalink / raw)
  To: Mark Brown
  Cc: Dave Airlie, DRI, Alexandre Courbot, Asahi Lina, Danilo Krummrich,
	Linux Kernel Mailing List, Linux Next Mailing List, Miguel Ojeda

On Wed, Apr 8, 2026 at 4:10 PM Mark Brown <broonie@kernel.org> wrote:
>
> I fixed it up (see below) and can carry the fix as necessary.

Looks good, thanks!

Cheers,
Miguel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-04-08 14:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-06 13:39 linux-next: manual merge of the drm tree with the rust tree Mark Brown
2026-04-06 14:34 ` Miguel Ojeda
  -- strict thread matches above, loose matches on Subject: below --
2026-04-08 14:10 Mark Brown
2026-04-08 14:20 ` Miguel Ojeda
2026-04-03 13:34 Mark Brown
2026-04-03 13:48 ` Miguel Ojeda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox