linux/drivers/gpu/drm
Linus Torvalds bf9aa14fc5 A rather large update for timekeeping and timers:
- The final step to get rid of auto-rearming posix-timers
 
     posix-timers are currently auto-rearmed by the kernel when the signal
     of the timer is ignored so that the timer signal can be delivered once
     the corresponding signal is unignored.
 
     This requires to throttle the timer to prevent a DoS by small intervals
     and keeps the system pointlessly out of low power states for no value.
     This is a long standing non-trivial problem due to the lock order of
     posix-timer lock and the sighand lock along with life time issues as
     the timer and the sigqueue have different life time rules.
 
     Cure this by:
 
      * Embedding the sigqueue into the timer struct to have the same life
        time rules. Aside of that this also avoids the lookup of the timer
        in the signal delivery and rearm path as it's just a always valid
        container_of() now.
 
      * Queuing ignored timer signals onto a seperate ignored list.
 
      * Moving queued timer signals onto the ignored list when the signal is
        switched to SIG_IGN before it could be delivered.
 
      * Walking the ignored list when SIG_IGN is lifted and requeue the
        signals to the actual signal lists. This allows the signal delivery
        code to rearm the timer.
 
     This also required to consolidate the signal delivery rules so they are
     consistent across all situations. With that all self test scenarios
     finally succeed.
 
   - Core infrastructure for VFS multigrain timestamping
 
     This is required to allow the kernel to use coarse grained time stamps
     by default and switch to fine grained time stamps when inode attributes
     are actively observed via getattr().
 
     These changes have been provided to the VFS tree as well, so that the
     VFS specific infrastructure could be built on top.
 
   - Cleanup and consolidation of the sleep() infrastructure
 
     * Move all sleep and timeout functions into one file
 
     * Rework udelay() and ndelay() into proper documented inline functions
       and replace the hardcoded magic numbers by proper defines.
 
     * Rework the fsleep() implementation to take the reality of the timer
       wheel granularity on different HZ values into account. Right now the
       boundaries are hard coded time ranges which fail to provide the
       requested accuracy on different HZ settings.
 
     * Update documentation for all sleep/timeout related functions and fix
       up stale documentation links all over the place
 
     * Fixup a few usage sites
 
   - Rework of timekeeping and adjtimex(2) to prepare for multiple PTP clocks
 
     A system can have multiple PTP clocks which are participating in
     seperate and independent PTP clock domains. So far the kernel only
     considers the PTP clock which is based on CLOCK TAI relevant as that's
     the clock which drives the timekeeping adjustments via the various user
     space daemons through adjtimex(2).
 
     The non TAI based clock domains are accessible via the file descriptor
     based posix clocks, but their usability is very limited. They can't be
     accessed fast as they always go all the way out to the hardware and
     they cannot be utilized in the kernel itself.
 
     As Time Sensitive Networking (TSN) gains traction it is required to
     provide fast user and kernel space access to these clocks.
 
     The approach taken is to utilize the timekeeping and adjtimex(2)
     infrastructure to provide this access in a similar way how the kernel
     provides access to clock MONOTONIC, REALTIME etc.
 
     Instead of creating a duplicated infrastructure this rework converts
     timekeeping and adjtimex(2) into generic functionality which operates
     on pointers to data structures instead of using static variables.
 
     This allows to provide time accessors and adjtimex(2) functionality for
     the independent PTP clocks in a subsequent step.
 
   - Consolidate hrtimer initialization
 
     hrtimers are set up by initializing the data structure and then
     seperately setting the callback function for historical reasons.
 
     That's an extra unnecessary step and makes Rust support less straight
     forward than it should be.
 
     Provide a new set of hrtimer_setup*() functions and convert the core
     code and a few usage sites of the less frequently used interfaces over.
 
     The bulk of the htimer_init() to hrtimer_setup() conversion is already
     prepared and scheduled for the next merge window.
 
   - Drivers:
 
     * Ensure that the global timekeeping clocksource is utilizing the
       cluster 0 timer on MIPS multi-cluster systems.
 
       Otherwise CPUs on different clusters use their cluster specific
       clocksource which is not guaranteed to be synchronized with other
       clusters.
 
     * Mostly boring cleanups, fixes, improvements and code movement
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCgAxFiEEQp8+kY+LLUocC4bMphj1TA10mKEFAmc7kPITHHRnbHhAbGlu
 dXRyb25peC5kZQAKCRCmGPVMDXSYoZKkD/9OUL6fOJrDUmOYBa4QVeMyfTef4EaL
 tvwIMM/29XQFeiq3xxCIn+EMnHjXn2lvIhYGQ7GKsbKYwvJ7ZBDpQb+UMhZ2nKI9
 6D6BP6WomZohKeH2fZbJQAdqOi3KRYdvQdIsVZUexkqiaVPphRvOH9wOr45gHtZM
 EyMRSotPlQTDqcrbUejDMEO94GyjDCYXRsyATLxjmTzL/N4xD4NRIiotjM2vL/a9
 8MuCgIhrKUEyYlFoOxxeokBsF3kk3/ez2jlG9b/N8VLH3SYIc2zgL58FBgWxlmgG
 bY71nVG3nUgEjxBd2dcXAVVqvb+5widk8p6O7xxOAQKTLMcJ4H0tQDkMnzBtUzvB
 DGAJDHAmAr0g+ja9O35Pkhunkh4HYFIbq0Il4d1HMKObhJV0JumcKuQVxrXycdm3
 UZfq3seqHsZJQbPgCAhlFU0/2WWScocbee9bNebGT33KVwSp5FoVv89C/6Vjb+vV
 Gusc3thqrQuMAZW5zV8g4UcBAA/xH4PB0I+vHib+9XPZ4UQ7/6xKl2jE0kd5hX7n
 AAUeZvFNFqIsY+B6vz+Jx/yzyM7u5cuXq87pof5EHVFzv56lyTp4ToGcOGYRgKH5
 JXeYV1OxGziSDrd5vbf9CzdWMzqMvTefXrHbWrjkjhNOe8E1A8O88RZ5uRKZhmSw
 hZZ4hdM9+3T7cg==
 =2VC6
 -----END PGP SIGNATURE-----

Merge tag 'timers-core-2024-11-18' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer updates from Thomas Gleixner:
 "A rather large update for timekeeping and timers:

   - The final step to get rid of auto-rearming posix-timers

     posix-timers are currently auto-rearmed by the kernel when the
     signal of the timer is ignored so that the timer signal can be
     delivered once the corresponding signal is unignored.

     This requires to throttle the timer to prevent a DoS by small
     intervals and keeps the system pointlessly out of low power states
     for no value. This is a long standing non-trivial problem due to
     the lock order of posix-timer lock and the sighand lock along with
     life time issues as the timer and the sigqueue have different life
     time rules.

     Cure this by:

       - Embedding the sigqueue into the timer struct to have the same
         life time rules. Aside of that this also avoids the lookup of
         the timer in the signal delivery and rearm path as it's just a
         always valid container_of() now.

       - Queuing ignored timer signals onto a seperate ignored list.

       - Moving queued timer signals onto the ignored list when the
         signal is switched to SIG_IGN before it could be delivered.

       - Walking the ignored list when SIG_IGN is lifted and requeue the
         signals to the actual signal lists. This allows the signal
         delivery code to rearm the timer.

     This also required to consolidate the signal delivery rules so they
     are consistent across all situations. With that all self test
     scenarios finally succeed.

   - Core infrastructure for VFS multigrain timestamping

     This is required to allow the kernel to use coarse grained time
     stamps by default and switch to fine grained time stamps when inode
     attributes are actively observed via getattr().

     These changes have been provided to the VFS tree as well, so that
     the VFS specific infrastructure could be built on top.

   - Cleanup and consolidation of the sleep() infrastructure

       - Move all sleep and timeout functions into one file

       - Rework udelay() and ndelay() into proper documented inline
         functions and replace the hardcoded magic numbers by proper
         defines.

       - Rework the fsleep() implementation to take the reality of the
         timer wheel granularity on different HZ values into account.
         Right now the boundaries are hard coded time ranges which fail
         to provide the requested accuracy on different HZ settings.

       - Update documentation for all sleep/timeout related functions
         and fix up stale documentation links all over the place

       - Fixup a few usage sites

   - Rework of timekeeping and adjtimex(2) to prepare for multiple PTP
     clocks

     A system can have multiple PTP clocks which are participating in
     seperate and independent PTP clock domains. So far the kernel only
     considers the PTP clock which is based on CLOCK TAI relevant as
     that's the clock which drives the timekeeping adjustments via the
     various user space daemons through adjtimex(2).

     The non TAI based clock domains are accessible via the file
     descriptor based posix clocks, but their usability is very limited.
     They can't be accessed fast as they always go all the way out to
     the hardware and they cannot be utilized in the kernel itself.

     As Time Sensitive Networking (TSN) gains traction it is required to
     provide fast user and kernel space access to these clocks.

     The approach taken is to utilize the timekeeping and adjtimex(2)
     infrastructure to provide this access in a similar way how the
     kernel provides access to clock MONOTONIC, REALTIME etc.

     Instead of creating a duplicated infrastructure this rework
     converts timekeeping and adjtimex(2) into generic functionality
     which operates on pointers to data structures instead of using
     static variables.

     This allows to provide time accessors and adjtimex(2) functionality
     for the independent PTP clocks in a subsequent step.

   - Consolidate hrtimer initialization

     hrtimers are set up by initializing the data structure and then
     seperately setting the callback function for historical reasons.

     That's an extra unnecessary step and makes Rust support less
     straight forward than it should be.

     Provide a new set of hrtimer_setup*() functions and convert the
     core code and a few usage sites of the less frequently used
     interfaces over.

     The bulk of the htimer_init() to hrtimer_setup() conversion is
     already prepared and scheduled for the next merge window.

   - Drivers:

       - Ensure that the global timekeeping clocksource is utilizing the
         cluster 0 timer on MIPS multi-cluster systems.

         Otherwise CPUs on different clusters use their cluster specific
         clocksource which is not guaranteed to be synchronized with
         other clusters.

       - Mostly boring cleanups, fixes, improvements and code movement"

* tag 'timers-core-2024-11-18' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (140 commits)
  posix-timers: Fix spurious warning on double enqueue versus do_exit()
  clocksource/drivers/arm_arch_timer: Use of_property_present() for non-boolean properties
  clocksource/drivers/gpx: Remove redundant casts
  clocksource/drivers/timer-ti-dm: Fix child node refcount handling
  dt-bindings: timer: actions,owl-timer: convert to YAML
  clocksource/drivers/ralink: Add Ralink System Tick Counter driver
  clocksource/drivers/mips-gic-timer: Always use cluster 0 counter as clocksource
  clocksource/drivers/timer-ti-dm: Don't fail probe if int not found
  clocksource/drivers:sp804: Make user selectable
  clocksource/drivers/dw_apb: Remove unused dw_apb_clockevent functions
  hrtimers: Delete hrtimer_init_on_stack()
  alarmtimer: Switch to use hrtimer_setup() and hrtimer_setup_on_stack()
  io_uring: Switch to use hrtimer_setup_on_stack()
  sched/idle: Switch to use hrtimer_setup_on_stack()
  hrtimers: Delete hrtimer_init_sleeper_on_stack()
  wait: Switch to use hrtimer_setup_sleeper_on_stack()
  timers: Switch to use hrtimer_setup_sleeper_on_stack()
  net: pktgen: Switch to use hrtimer_setup_sleeper_on_stack()
  futex: Switch to use hrtimer_setup_sleeper_on_stack()
  fs/aio: Switch to use hrtimer_setup_sleeper_on_stack()
  ...
2024-11-19 16:35:06 -08:00
..
amd the bulk of struct fd memory safety stuff 2024-11-18 12:24:06 -08:00
arm drm: komeda: Fix an issue related to normalized zpos 2024-08-30 13:44:12 +01:00
armada
aspeed
ast drm/ast: vga: Clear EDID if no display is connected 2024-10-17 08:50:14 +02:00
atmel-hlcdc
bridge drm/bridge: tc358768: Fix DSI command tx 2024-11-14 11:29:42 +01:00
ci drm/ci: increase timeout for all jobs 2024-08-28 12:21:49 -03:00
display Short summary of fixes pull: 2024-10-01 08:15:55 +10:00
etnaviv Merge drm/drm-next into drm-misc-next 2024-07-29 09:35:54 +02:00
exynos drm next for 6.12-rc1 2024-09-19 10:18:15 +02:00
fsl-dcu
gma500 drm next for 6.12-rc1 2024-09-19 10:18:15 +02:00
gud
hisilicon drm/hisilicon: Remove unused delarations 2024-08-13 16:22:43 +02:00
hyperv
i2c
i915 A rather large update for timekeeping and timers: 2024-11-19 16:35:06 -08:00
imagination drm/imagination: Break an object reference loop 2024-11-04 09:41:38 +00:00
imx Linux 6.11-rc7 2024-09-11 09:18:15 +02:00
ingenic drm/bridge-connector: move to DRM_DISPLAY_HELPER module 2024-09-03 10:18:31 +02:00
kmb drm/bridge-connector: move to DRM_DISPLAY_HELPER module 2024-09-03 10:18:31 +02:00
lib drm/lib: Include <linux/prandom.h> instead of <linux/random.h> 2024-10-03 18:19:38 +02:00
lima Merge drm/drm-next into drm-misc-next 2024-07-29 09:35:54 +02:00
logicvc
loongson drm/loongson: use GEM references instead of TTMs 2024-08-01 10:03:44 +02:00
mcde
mediatek drm/mediatek: Fix potential NULL dereference in mtk_crtc_destroy() 2024-10-23 14:09:13 +00:00
meson drm/bridge-connector: move to DRM_DISPLAY_HELPER module 2024-09-03 10:18:31 +02:00
mgag200 Revert "drm/mgag200: Add vblank support" 2024-10-17 08:49:45 +02:00
msm Merge tag 'drm-msm-fixes-2024-10-16' of https://gitlab.freedesktop.org/drm/msm into drm-fixes 2024-10-17 17:40:55 +10:00
mxsfb drm: lcdif: Use adjusted_mode .clock instead of .crtc_clock 2024-07-16 20:15:31 +02:00
nouveau nouveau/dp: handle retries for AUX CH transfers with GSP. 2024-11-14 11:50:01 +10:00
omapdrm Linux 6.11-rc7 2024-09-11 09:18:15 +02:00
panel drm/panel: himax-hx83102: Adjust power and gamma to optimize brightness 2024-10-14 10:00:45 -07:00
panfrost Merge drm/drm-next into drm-misc-next 2024-07-29 09:35:54 +02:00
panthor drm/panthor: Fix handling of partial GPU mapping of BOs 2024-11-13 00:30:37 +00:00
pl111
qxl drm/qxl: Pin buffer objects for internal mappings 2024-07-10 09:12:42 +02:00
radeon drm/radeon: Fix encoder->possible_clones 2024-10-15 11:53:07 -04:00
renesas Linux 6.11-rc7 2024-09-11 09:18:15 +02:00
rockchip drm/rockchip: vop: Fix a dereferenced before check warning 2024-11-09 23:57:32 +01:00
scheduler drm/sched: Mark scheduler work queues with WQ_MEM_RECLAIM 2024-10-28 14:12:56 -04:00
solomon
sprd
sti drm/sti/sti_hdmi: convert to struct drm_edid 2024-08-29 14:30:14 +03:00
stm drm/stm: add COMMON_CLK dependency 2024-09-10 13:55:49 +02:00
sun4i
tegra drm/tegra: Fix NULL vs IS_ERR() check in probe() 2024-10-24 18:50:04 +02:00
tests drm/tests: hdmi: Fix memory leaks in drm_display_mode_from_cea_vic() 2024-10-31 10:31:35 +01:00
tidss drm/bridge-connector: move to DRM_DISPLAY_HELPER module 2024-09-03 10:18:31 +02:00
tilcdc drm/tilcdc: Use backlight power constants 2024-08-16 09:28:01 +02:00
tiny drm/tiny/gm12u320: convert to struct drm_edid 2024-08-29 14:30:15 +03:00
ttm Revert "drm/ttm: Add a flag to allow drivers to skip clear-on-free" 2024-08-28 06:45:53 -07:00
tve200
udl move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
v3d drm/v3d: Stop the active perfmon before being destroyed 2024-10-07 09:03:57 -03:00
vboxvideo Short summary of fixes pull: 2024-10-01 08:15:55 +10:00
vc4 drm/vc4: Stop the active perfmon before being destroyed 2024-10-07 09:06:46 -03:00
vgem
virtio Merge drm/drm-fixes into drm-misc-fixes 2024-07-30 09:09:23 +02:00
vkms drm/vkms: Formatting and typo fix 2024-08-15 11:01:48 -03:00
vmwgfx vfs-6.13.file 2024-11-18 10:30:29 -08:00
xe drm/xe/oa: Fix "Missing outer runtime PM protection" warning 2024-11-13 11:37:22 -08:00
xen
xlnx drm/bridge-connector: move to DRM_DISPLAY_HELPER module 2024-09-03 10:18:31 +02:00
Kconfig drm/panic: Add a QR code panic screen 2024-08-23 16:55:35 +02:00
Makefile Linux 6.11-rc7 2024-09-11 09:18:15 +02:00
drm_aperture.c
drm_atomic.c drm: Fix kerneldoc for "Returns" section 2024-08-26 16:40:09 +02:00
drm_atomic_helper.c drm: Fix kerneldoc for "Returns" section 2024-08-26 16:40:09 +02:00
drm_atomic_state_helper.c
drm_atomic_uapi.c drm: Consistently use struct drm_mode_rect for FB_DAMAGE_CLIPS 2024-09-25 12:35:05 +02:00
drm_auth.c
drm_blend.c
drm_bridge.c drm/bridge: Silence error messages upon probe deferral 2024-07-18 13:20:16 +02:00
drm_buddy.c drm/buddy: Add start address support to trim function 2024-08-07 18:19:00 -04:00
drm_cache.c
drm_client.c drm/client: Fix error code in drm_client_buffer_vmap_local() 2024-07-29 08:50:23 +02:00
drm_client_modeset.c drm/client: fix null pointer dereference in drm_client_modeset_probe 2024-08-02 09:23:54 +02:00
drm_color_mgmt.c minmax: add a few more MIN_T/MAX_T users 2024-07-28 13:41:14 -07:00
drm_connector.c drm/connector: kerneldoc: Fix two missing newlines in drm_connector.c 2024-08-12 09:07:31 -04:00
drm_crtc.c
drm_crtc_helper.c
drm_crtc_helper_internal.h
drm_crtc_internal.h drm/panic: Add a QR code panic screen 2024-08-23 16:55:35 +02:00
drm_damage_helper.c
drm_debugfs.c drm/connector: hdmi: Fix writing Dynamic Range Mastering infoframes 2024-09-24 16:10:12 +02:00
drm_debugfs_crc.c
drm_displayid.c drm/edid: reduce DisplayID log spamming 2024-08-14 10:19:09 +03:00
drm_displayid_internal.h
drm_drv.c drm: Expand max DRM device number to full MINORBITS 2024-08-26 17:06:22 +02:00
drm_dumb_buffers.c
drm_edid.c drm: use mem_is_zero() instead of !memchr_inv(s, 0, n) 2024-08-16 12:07:46 +03:00
drm_edid_load.c
drm_eld.c
drm_encoder.c
drm_encoder_slave.c
drm_exec.c mm: kvmalloc: align kvrealloc() with krealloc() 2024-09-01 20:25:44 -07:00
drm_fb_dma_helper.c
drm_fb_helper.c drm/fbdev-helper: Remove drm_fb_helper_output_poll_changed() 2024-08-13 16:21:11 +02:00
drm_fbdev_dma.c drm/fbdev-dma: Only cleanup deferred I/O if necessary 2024-10-10 09:49:25 +02:00
drm_fbdev_shmem.c
drm_fbdev_ttm.c drm next for 6.11-rc1: 2024-07-18 09:34:02 -07:00
drm_file.c [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
drm_flip_work.c
drm_format_helper.c
drm_fourcc.c
drm_framebuffer.c
drm_gem.c drm: Fix kerneldoc for "Returns" section 2024-08-26 16:40:09 +02:00
drm_gem_atomic_helper.c
drm_gem_dma_helper.c
drm_gem_framebuffer_helper.c
drm_gem_shmem_helper.c
drm_gem_ttm_helper.c
drm_gem_vram_helper.c
drm_gpuvm.c
drm_internal.h accel: Use XArray instead of IDR for minors 2024-08-26 17:06:22 +02:00
drm_ioc32.c
drm_ioctl.c
drm_kms_helper_common.c
drm_lease.c
drm_managed.c drm/managed: Simplify if condition 2024-07-03 10:11:03 +02:00
drm_mipi_dbi.c
drm_mipi_dsi.c drm/mipi-dsi: Add mipi_dsi_dcs_set_tear_scanline_multi 2024-08-20 14:17:54 -07:00
drm_mm.c
drm_mode_config.c drm: Add might_fault to drm_modeset_lock priming 2024-07-18 15:39:54 +02:00
drm_mode_object.c
drm_modes.c drm: Fix kerneldoc for "Returns" section 2024-08-26 16:40:09 +02:00
drm_modeset_helper.c
drm_modeset_lock.c
drm_of.c
drm_panel.c drm/panel: Avoid warnings w/ panel-simple/panel-edp at shutdown 2024-07-22 09:00:58 -07:00
drm_panel_orientation_quirks.c drm: panel-orientation-quirks: Make Lenovo Yoga Tab 3 X90F DMI match less strict 2024-11-07 16:16:42 +01:00
drm_panic.c drm/panic: Add a QR code panic screen 2024-08-23 16:55:35 +02:00
drm_panic_qr.rs drm/panic: Add a QR code panic screen 2024-08-23 16:55:35 +02:00
drm_pci.c
drm_plane.c
drm_plane_helper.c
drm_prime.c drm: new helper: drm_gem_prime_handle_to_dmabuf() 2024-09-10 13:44:30 -04:00
drm_print.c drm/printer: Allow NULL data in devcoredump printer 2024-08-01 11:00:12 -07:00
drm_privacy_screen.c
drm_privacy_screen_x86.c
drm_probe_helper.c drm: Remove struct drm_mode_config_funcs.output_poll_changed 2024-08-13 16:21:13 +02:00
drm_property.c
drm_rect.c drm: Fix kerneldoc for "Returns" section 2024-08-26 16:40:09 +02:00
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: Fix kerneldoc for "Returns" section 2024-08-26 16:40:09 +02:00
drm_vblank_work.c
drm_vma_manager.c
drm_writeback.c