mirror-linux/drivers/gpu/drm
Linus Torvalds e3610441d1 Rust changes for v6.14
Toolchain and infrastructure:
 
  - Finish the move to custom FFI integer types started in the previous
    cycle and finally map 'long' to 'isize' and 'char' to 'u8'. Do a few
    cleanups on top thanks to that.
 
  - Start to use 'derive(CoercePointee)' on Rust >= 1.84.0.
 
    This is a major milestone on the path to build the kernel using only
    stable Rust features. In particular, previously we were using the
    unstable features 'coerce_unsized', 'dispatch_from_dyn' and 'unsize',
    and now we will use the new 'derive_coerce_pointee' one, which is on
    track to stabilization. This new feature is a macro that essentially
    expands into code that internally uses the unstable features that we
    were using before, without having to expose those.
 
    With it, stable Rust users, including the kernel, will be able to
    build custom smart pointers that work with trait objects, e.g.:
 
        fn f(p: &Arc<dyn Display>) {
            pr_info!("{p}\n");
        }
 
        let a: Arc<dyn Display> = Arc::new(42i32, GFP_KERNEL)?;
        let b: Arc<dyn Display> = Arc::new("hello there", GFP_KERNEL)?;
 
        f(&a); // Prints "42".
        f(&b); // Prints "hello there".
 
    Together with the 'arbitrary_self_types' feature that we started
    using in the previous cycle, using our custom smart pointers like
    'Arc' will eventually only rely in stable Rust.
 
  - Introduce 'PROCMACROLDFLAGS' environment variable to allow to link
    Rust proc macros using different flags than those used for linking
    Rust host programs (e.g. when 'rustc' uses a different C library
    than the host programs' one), which Android needs.
 
  - Help kernel builds under macOS with Rust enabled by accomodating
    other naming conventions for dynamic libraries (i.e. '.so' vs.
    '.dylib') which are used for Rust procedural macros. The actual
    support for macOS (i.e. the rest of the pieces needed) is provided
    out-of-tree by others, following the policy used for other parts of
    the kernel by Kbuild.
 
  - Run Clippy for 'rusttest' code too and clean the bits it spotted.
 
  - Provide Clippy with the minimum supported Rust version to improve
    the suggestions it gives.
 
  - Document 'bindgen' 0.71.0 regression.
 
 'kernel' crate:
 
  - 'build_error!': move users of the hidden function to the documented
    macro, prevent such uses in the future by moving the function
    elsewhere and add the macro to the prelude.
 
  - 'types' module: add improved version of 'ForeignOwnable::borrow_mut'
    (which was removed in the past since it was problematic); change
    'ForeignOwnable' pointer type to '*mut'.
 
  - 'alloc' module: implement 'Display' for 'Box' and align the 'Debug'
    implementation to it; add example (doctest) for 'ArrayLayout::new()'.
 
  - 'sync' module: document 'PhantomData' in 'Arc'; use
    'NonNull::new_unchecked' in 'ForeignOwnable for Arc' impl.
 
  - 'uaccess' module: accept 'Vec's with different allocators in
    'UserSliceReader::read_all'.
 
  - 'workqueue' module: enable run-testing a couple more doctests.
 
  - 'error' module: simplify 'from_errno()'.
 
  - 'block' module: fix formatting in code documentation (a lint to catch
    these is being implemented).
 
  - Avoid 'unwrap()'s in doctests, which also improves the examples by
    showing how kernel code is supposed to be written.
 
  - Avoid 'as' casts with 'cast{,_mut}' calls which are a bit safer.
 
 And a few other cleanups.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEPjU5OPd5QIZ9jqqOGXyLc2htIW0FAmeNeRsACgkQGXyLc2ht
 IW0exRAAx3ag/JaiR3n5aDBJqUX/Vi6/u+3fTiHOGp9oMFK4ZYR9rlWIr0ArU8a0
 4PApTR5ozrD+lgD1gCjHikhvpacLoTcz0WD0sP8qWlSqQFiMcTXmmWQfeJc7hheE
 4zyKlxswvbHjnOs/k24i5FS4E/CRpC7TJT5RkybaWVunsIps/im4xTnXfUzMhjVG
 SWcRaJtQA8xze9iiRlqw9EFQL6iT5gIKAe0I2i2J+zYzsY6m23fQ/8IxvglaiSDT
 /GIIqDscMH6drfQFRsvTtkcw0Mq64e6hlyWS9s4b9Q0IhgS0sju0qbQrfLLet75t
 1r+JlBZYhQy+4LXZTgBmQ8mVR8NEurnsOullm2AoTy6EYCPvXExSv4JCXYVvgPh+
 d4j/0pCeKUg9aDUtuEAUPHGQk1j7mORGf4J8jPQXla/7/YfqJvluycpMe54gLZpA
 FU24aqtb5/q3/Gqm8omKe/7FdYsu44E1haiP77bhNeYM3pWJrlIovBCafBtc1mQM
 lMtK6EjiQqrz1kEWutx+RQeeiir1G++GlVNGO2LSdNi/6qfjfBQM9dEqsCc8i3XL
 rsLL368SEKQENhSNJFceg6RX37WPwcyIkHAeZ91ijSz6W4I5HtUZpD3UPcgJoiaS
 xuOi44bR6Lt0zXF7eaXZTUh2gf8o++tsgfc4OZPaZ3azn6Y3pXw=
 =VLNX
 -----END PGP SIGNATURE-----

Merge tag 'rust-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux

Pull rust updates from Miguel Ojeda:
 "Toolchain and infrastructure:

   - Finish the move to custom FFI integer types started in the previous
     cycle and finally map 'long' to 'isize' and 'char' to 'u8'. Do a
     few cleanups on top thanks to that.

   - Start to use 'derive(CoercePointee)' on Rust >= 1.84.0.

     This is a major milestone on the path to build the kernel using
     only stable Rust features. In particular, previously we were using
     the unstable features 'coerce_unsized', 'dispatch_from_dyn' and
     'unsize', and now we will use the new 'derive_coerce_pointee' one,
     which is on track to stabilization. This new feature is a macro
     that essentially expands into code that internally uses the
     unstable features that we were using before, without having to
     expose those.

     With it, stable Rust users, including the kernel, will be able to
     build custom smart pointers that work with trait objects, e.g.:

         fn f(p: &Arc<dyn Display>) {
             pr_info!("{p}\n");
         }

         let a: Arc<dyn Display> = Arc::new(42i32, GFP_KERNEL)?;
         let b: Arc<dyn Display> = Arc::new("hello there", GFP_KERNEL)?;

         f(&a); // Prints "42".
         f(&b); // Prints "hello there".

     Together with the 'arbitrary_self_types' feature that we started
     using in the previous cycle, using our custom smart pointers like
     'Arc' will eventually only rely in stable Rust.

   - Introduce 'PROCMACROLDFLAGS' environment variable to allow to link
     Rust proc macros using different flags than those used for linking
     Rust host programs (e.g. when 'rustc' uses a different C library
     than the host programs' one), which Android needs.

   - Help kernel builds under macOS with Rust enabled by accomodating
     other naming conventions for dynamic libraries (i.e. '.so' vs.
     '.dylib') which are used for Rust procedural macros. The actual
     support for macOS (i.e. the rest of the pieces needed) is provided
     out-of-tree by others, following the policy used for other parts of
     the kernel by Kbuild.

   - Run Clippy for 'rusttest' code too and clean the bits it spotted.

   - Provide Clippy with the minimum supported Rust version to improve
     the suggestions it gives.

   - Document 'bindgen' 0.71.0 regression.

  'kernel' crate:

   - 'build_error!': move users of the hidden function to the documented
     macro, prevent such uses in the future by moving the function
     elsewhere and add the macro to the prelude.

   - 'types' module: add improved version of 'ForeignOwnable::borrow_mut'
     (which was removed in the past since it was problematic); change
     'ForeignOwnable' pointer type to '*mut'.

   - 'alloc' module: implement 'Display' for 'Box' and align the 'Debug'
     implementation to it; add example (doctest) for 'ArrayLayout::new()'

   - 'sync' module: document 'PhantomData' in 'Arc'; use
     'NonNull::new_unchecked' in 'ForeignOwnable for Arc' impl.

   - 'uaccess' module: accept 'Vec's with different allocators in
     'UserSliceReader::read_all'.

   - 'workqueue' module: enable run-testing a couple more doctests.

   - 'error' module: simplify 'from_errno()'.

   - 'block' module: fix formatting in code documentation (a lint to catch
     these is being implemented).

   - Avoid 'unwrap()'s in doctests, which also improves the examples by
     showing how kernel code is supposed to be written.

   - Avoid 'as' casts with 'cast{,_mut}' calls which are a bit safer.

  And a few other cleanups"

* tag 'rust-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux: (32 commits)
  kbuild: rust: add PROCMACROLDFLAGS
  rust: uaccess: generalize userSliceReader to support any Vec
  rust: kernel: add improved version of `ForeignOwnable::borrow_mut`
  rust: kernel: reorder `ForeignOwnable` items
  rust: kernel: change `ForeignOwnable` pointer to mut
  rust: arc: split unsafe block, add missing comment
  rust: types: avoid `as` casts
  rust: arc: use `NonNull::new_unchecked`
  rust: use derive(CoercePointee) on rustc >= 1.84.0
  rust: alloc: add doctest for `ArrayLayout::new()`
  rust: init: update `stack_try_pin_init` examples
  rust: error: import `kernel`'s `LayoutError` instead of `core`'s
  rust: str: replace unwraps with question mark operators
  rust: page: remove unnecessary helper function from doctest
  rust: rbtree: remove unwrap in asserts
  rust: init: replace unwraps with question mark operators
  rust: use host dylib naming convention to support macOS
  rust: add `build_error!` to the prelude
  rust: kernel: move `build_error` hidden function to prevent mistakes
  rust: use the `build_error!` macro, not the hidden function
  ...
2025-01-21 17:48:03 -08:00
..
amd drm next for 6.14-rc1 2025-01-21 16:09:47 -08:00
arm drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
armada drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
aspeed drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
ast drm: remove driver date from struct drm_driver and all drivers 2024-12-05 12:35:42 +02:00
atmel-hlcdc drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
bridge drm next for 6.14-rc1 2025-01-21 16:09:47 -08:00
ci drm/ci: remove update-xfails.py 2024-11-05 10:50:55 -03:00
clients drm/log: select CONFIG_FONT_SUPPORT 2024-12-12 18:26:32 +01:00
display drm next for 6.14-rc1 2025-01-21 16:09:47 -08:00
etnaviv - cleanups 2025-01-10 10:55:06 +10:00
exynos ASoC: hdmi-codec: move no_capture_mute to struct hdmi_codec_pdata 2025-01-04 08:47:10 +02:00
fsl-dcu drm/fsl-dcu: Include <linux/of.h> 2024-12-13 15:20:40 +01:00
gma500 drm: remove driver date from struct drm_driver and all drivers 2024-12-05 12:35:42 +02:00
gud drm: remove driver date from struct drm_driver and all drivers 2024-12-05 12:35:42 +02:00
hisilicon drm/hisilicon/hibmc: add dp module in hibmc 2025-01-03 12:42:10 +02:00
hyperv drm: remove driver date from struct drm_driver and all drivers 2024-12-05 12:35:42 +02:00
i2c ASoC: hdmi-codec: move no_capture_mute to struct hdmi_codec_pdata 2025-01-04 08:47:10 +02:00
i915 Kthreads affinity follow either of 4 existing different patterns: 2025-01-21 17:10:05 -08:00
imagination drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
imx drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
ingenic drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
kmb drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
lib
lima drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
logicvc drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
loongson drm: remove driver date from struct drm_driver and all drivers 2024-12-05 12:35:42 +02:00
mcde drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
mediatek drm next for 6.14-rc1 2025-01-21 16:09:47 -08:00
meson drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
mgag200 drm: remove driver date from struct drm_driver and all drivers 2024-12-05 12:35:42 +02:00
msm Kthreads affinity follow either of 4 existing different patterns: 2025-01-21 17:10:05 -08:00
mxsfb drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
nouveau drm next for 6.14-rc1 2025-01-21 16:09:47 -08:00
omapdrm drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
panel Linux 6.13-rc6 2025-01-10 14:24:17 +10:00
panfrost drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
panthor drm/panthor: Report innocent group kill 2024-12-17 10:56:12 +01:00
pl111 drm: remove driver date from struct drm_driver and all drivers 2024-12-05 12:35:42 +02:00
qxl drm: remove driver date from struct drm_driver and all drivers 2024-12-05 12:35:42 +02:00
radeon drm/radeon: use eld_mutex to protect access to connector->eld 2024-12-16 18:02:08 +02:00
renesas drm/rcar-du: Add support for r8a779h0 2024-12-17 15:13:04 +02:00
rockchip drm/rockchip: vop2: Support 32x8 superblock afbc 2025-01-05 17:00:06 +01:00
scheduler drm/sched: Fix drm_sched_fini() docu generation 2024-12-19 16:03:56 +01:00
solomon drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
sprd drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
sti ASoC: hdmi-codec: move no_capture_mute to struct hdmi_codec_pdata 2025-01-04 08:47:10 +02:00
stm drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
sun4i drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
tegra drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
tests drm next for 6.14-rc1 2025-01-21 16:09:47 -08:00
tidss drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
tilcdc drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
tiny drm/tiny: panel-mipi-dbi: Include <linux/of.h> 2024-12-13 15:21:02 +01:00
ttm DMEM cgroup pull request 2025-01-11 07:20:29 +10:00
tve200 drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
udl drm: remove driver date from struct drm_driver and all drivers 2024-12-05 12:35:42 +02:00
v3d drm next for 6.14-rc1 2025-01-21 16:09:47 -08:00
vboxvideo drm: remove driver date from struct drm_driver and all drivers 2024-12-05 12:35:42 +02:00
vc4 drm/vc4: hdmi: use drm_atomic_helper_connector_hdmi_hotplug() 2025-01-04 08:47:11 +02:00
vgem drm: remove driver date from struct drm_driver and all drivers 2024-12-05 12:35:42 +02:00
virtio drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
vkms drm: remove driver date from struct drm_driver and all drivers 2024-12-05 12:35:42 +02:00
vmwgfx drm next for 6.14-rc1 2025-01-21 16:09:47 -08:00
xe drm next for 6.14-rc1 2025-01-21 16:09:47 -08:00
xen drm: remove driver date from struct drm_driver and all drivers 2024-12-05 12:35:42 +02:00
xlnx drm: xlnx: zynqmp_dpsub: Add DP audio support 2024-12-19 08:54:00 +02:00
Kconfig Linux 6.13-rc6 2025-01-10 14:24:17 +10:00
Makefile drm/panic: Move drawing functions to drm_draw 2024-12-10 14:36:41 +01:00
drm_atomic.c drm/atomic: add interlaced and ycbcr_420 flags to connector's state dump 2024-10-24 22:42:25 +03:00
drm_atomic_helper.c
drm_atomic_state_helper.c
drm_atomic_uapi.c
drm_auth.c
drm_blend.c
drm_bridge.c drm/bridge: Prioritize supported_formats over ycbcr_420_allowed 2025-01-13 11:18:20 +02:00
drm_buddy.c
drm_cache.c
drm_client.c drm/client: Move client event handlers to drm_client_event.c 2024-10-18 09:23:03 +02:00
drm_client_event.c drm/client: Make client support optional 2024-10-18 09:23:03 +02:00
drm_client_modeset.c
drm_color_mgmt.c
drm_connector.c drm next for 6.14-rc1 2025-01-21 16:09:47 -08:00
drm_crtc.c
drm_crtc_helper.c
drm_crtc_helper_internal.h
drm_crtc_internal.h
drm_damage_helper.c
drm_debugfs.c drm/client: Make client support optional 2024-10-18 09:23:03 +02:00
drm_debugfs_crc.c
drm_displayid.c
drm_displayid_internal.h
drm_draw.c drm/panic: Move drawing functions to drm_draw 2024-12-10 14:36:41 +01:00
drm_draw_internal.h drm/panic: Move drawing functions to drm_draw 2024-12-10 14:36:41 +01:00
drm_drv.c drm/drv: Add drmm managed registration helper for dmem cgroups. 2025-01-06 17:25:35 +01:00
drm_dumb_buffers.c
drm_edid.c drm/connector: add mutex to protect ELD from concurrent access 2024-12-16 18:02:07 +02:00
drm_edid_load.c
drm_eld.c
drm_encoder.c
drm_encoder_slave.c
drm_exec.c
drm_fb_dma_helper.c
drm_fb_helper.c drm/fbdev: fix drm_fb_helper_deferred_io() build failure 2024-10-22 10:46:28 +02:00
drm_fbdev_dma.c Backmerge v6.12-rc6 of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into drm-next 2024-11-04 14:25:33 +10:00
drm_fbdev_shmem.c
drm_fbdev_ttm.c
drm_file.c drm: make drm-active- stats optional 2024-12-19 16:56:17 +01:00
drm_flip_work.c
drm_format_helper.c
drm_fourcc.c
drm_framebuffer.c - The series "resource: A couple of cleanups" from Andy Shevchenko 2024-11-25 16:09:48 -08:00
drm_gem.c
drm_gem_atomic_helper.c
drm_gem_dma_helper.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
drm_gem_framebuffer_helper.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
drm_gem_shmem_helper.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
drm_gem_ttm_helper.c
drm_gem_vram_helper.c
drm_gpuvm.c
drm_internal.h drm/client: Make client support optional 2024-10-18 09:23:03 +02:00
drm_ioc32.c
drm_ioctl.c drm: add DRM_SET_CLIENT_NAME ioctl 2024-10-08 10:00:30 +02:00
drm_kms_helper_common.c
drm_lease.c
drm_managed.c
drm_mipi_dbi.c
drm_mipi_dsi.c drm/mipi-dsi: fix kernel doc on mipi_dsi_compression_mode_multi 2024-10-10 14:22:43 +02:00
drm_mm.c
drm_mode_config.c drm/connector: Add FIXME for GETRESOURCES ioctl wrt. uninited connectors 2024-12-17 15:43:04 +02:00
drm_mode_object.c
drm_modes.c Linux 6.13-rc6 2025-01-10 14:24:17 +10:00
drm_modeset_helper.c drm/client: Move suspend/resume into DRM client callbacks 2024-10-18 09:23:03 +02:00
drm_modeset_lock.c
drm_of.c gpu: drm: replace of_graph_get_next_endpoint() 2024-11-12 13:05:35 +01:00
drm_panel.c drm: Use of_property_present() for non-boolean properties 2025-01-03 11:17:09 -06:00
drm_panel_backlight_quirks.c drm: panel-backlight-quirks: Add Framework 13 glossy and 2.8k panels 2024-11-21 09:28:15 -06:00
drm_panel_orientation_quirks.c drm for 6.13-rc1 2024-11-21 14:56:17 -08:00
drm_panic.c drm/panic: Move drawing functions to drm_draw 2024-12-10 14:36:41 +01:00
drm_panic_qr.rs rust: finish using custom FFI integer types 2024-12-16 21:48:45 +01:00
drm_pci.c
drm_plane.c
drm_plane_helper.c
drm_prime.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
drm_print.c drm/print: add drm_print_hex_dump() 2024-12-10 14:08:40 +02:00
drm_privacy_screen.c
drm_privacy_screen_x86.c
drm_probe_helper.c drm/client: Move client event handlers to drm_client_event.c 2024-10-18 09:23:03 +02:00
drm_property.c
drm_rect.c
drm_self_refresh_helper.c
drm_simple_kms_helper.c
drm_suballoc.c
drm_syncobj.c fdget(), trivial conversions 2024-11-03 01:28:06 -05:00
drm_sysfs.c
drm_trace.h
drm_trace_points.c
drm_vblank.c
drm_vblank_work.c treewide: Introduce kthread_run_worker[_on_cpu]() 2025-01-08 18:15:03 +01:00
drm_vma_manager.c
drm_writeback.c drm/writeback: remove pointless enable_signaling implementation 2024-10-09 14:23:37 +02:00