public inbox for linux-next@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Dave Airlie <airlied@redhat.com>, DRI <dri-devel@lists.freedesktop.org>
Cc: Alice Ryhl <aliceryhl@google.com>,
	Boris Brezillon <boris.brezillon@collabora.com>,
	Deborah Brouwer <deborah.brouwer@collabora.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	Miguel Ojeda <ojeda@kernel.org>
Subject: linux-next: manual merge of the drm tree with the rust tree
Date: Fri, 3 Apr 2026 14:34:03 +0100	[thread overview]
Message-ID: <ac_Byw5cYys_lJ1a@sirena.org.uk> (raw)

[-- 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 --]

             reply	other threads:[~2026-04-03 13:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-03 13:34 Mark Brown [this message]
2026-04-03 13:48 ` linux-next: manual merge of the drm tree with the rust tree Miguel Ojeda
  -- strict thread matches above, loose matches on Subject: below --
2026-04-06 13:39 Mark Brown
2026-04-06 14:34 ` Miguel Ojeda
2026-04-08 14:10 Mark Brown
2026-04-08 14:20 ` 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=ac_Byw5cYys_lJ1a@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=airlied@redhat.com \
    --cc=aliceryhl@google.com \
    --cc=boris.brezillon@collabora.com \
    --cc=deborah.brouwer@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=ojeda@kernel.org \
    /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