linux/include/drm
Matthew Brost 8af39ec5cf drm/sched: Increment job count before swapping tail spsc queue
A small race exists between spsc_queue_push and the run-job worker, in
which spsc_queue_push may return not-first while the run-job worker has
already idled due to the job count being zero. If this race occurs, job
scheduling stops, leading to hangs while waiting on the job’s DMA
fences.

Seal this race by incrementing the job count before appending to the
SPSC queue.

This race was observed on a drm-tip 6.16-rc1 build with the Xe driver in
an SVM test case.

Fixes: 1b1f42d8fd ("drm: move amd_gpu_scheduler into common location")
Fixes: 27105db6c6 ("drm/amdgpu: Add SPSC queue to scheduler.")
Cc: stable@vger.kernel.org
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Link: https://lore.kernel.org/r/20250613212013.719312-1-matthew.brost@intel.com
2025-07-01 16:14:47 -07:00
..
bridge drm/bridge: analogix_dp: Add support for RK3588 2025-04-21 01:27:10 +03:00
clients
display drm/dp: add option to disable zero sized address only transactions. 2025-05-19 07:14:45 +10:00
intel drm for 6.16-rc1 2025-05-28 09:46:39 -07:00
ttm drm for 6.16-rc1 2025-05-28 09:46:39 -07:00
Makefile scripts/kernel-doc.py: don't create *.pyc files 2025-04-24 10:12:46 -06:00
amd_asic_type.h
drm_accel.h
drm_atomic.h drm/atomic: Introduce helper to lookup connector by encoder 2025-03-20 14:45:46 +01:00
drm_atomic_helper.h drm/atomic-helper: Introduce drm_atomic_helper_reset_crtc() 2025-02-13 16:17:46 +01:00
drm_atomic_state_helper.h
drm_atomic_uapi.h
drm_audio_component.h
drm_auth.h
drm_blend.h
drm_bridge.h drm/bridge: add function interface for DisplayPort audio implementation 2025-04-07 15:49:17 +03:00
drm_bridge_connector.h
drm_bridge_helper.h drm/bridge: Add helper to reset bridge pipeline 2025-03-20 14:45:48 +01:00
drm_buddy.h
drm_cache.h
drm_client.h drm/client: Send pending hotplug events after resume 2025-03-05 21:48:49 +01:00
drm_client_event.h drm/client: include types.h to make drm_client_event.h self-contained 2025-02-12 10:44:43 +02:00
drm_color_mgmt.h
drm_connector.h
drm_crtc.h
drm_crtc_helper.h
drm_damage_helper.h drm/damage-helper: add const qualifier in drm_atomic_helper_damage_merged() 2025-03-03 14:45:40 +02:00
drm_debugfs.h
drm_debugfs_crc.h
drm_device.h drm/prime: Support dedicated DMA device for dma-buf imports 2025-03-12 09:03:46 +01:00
drm_drv.h drm: drv: implement __drm_dev_alloc() 2025-04-24 13:50:03 +02:00
drm_edid.h drm/edid: Use unsigned int in drm_add_modes_noedid() 2025-04-02 17:19:54 -04:00
drm_eld.h
drm_encoder.h
drm_exec.h
drm_fb_dma_helper.h
drm_fb_helper.h drm/fb-helper: Remove struct drm_fb_helper.fb_probe 2025-03-05 21:48:50 +01:00
drm_fbdev_dma.h
drm_fbdev_shmem.h
drm_fbdev_ttm.h
drm_file.h drm: add drm_file_err function to add process info 2025-05-05 13:29:09 -04:00
drm_fixed.h
drm_flip_work.h
drm_format_helper.h drm/format-helper: Add conversion from XRGB8888 to BGR888 2025-03-03 16:13:33 +01:00
drm_fourcc.h
drm_framebuffer.h
drm_gem.h Linux 6.15-rc5 2025-05-06 16:39:25 +10:00
drm_gem_atomic_helper.h
drm_gem_dma_helper.h
drm_gem_framebuffer_helper.h
drm_gem_shmem_helper.h drm/shmem-helper: Use refcount_t for vmap_use_count 2025-03-26 23:00:22 +03:00
drm_gem_ttm_helper.h
drm_gem_vram_helper.h
drm_gpusvm.h drm/gpusvm: Add timeslicing support to GPU SVM 2025-05-14 09:03:29 -07:00
drm_gpuvm.h drm/gpuvm: Add DRM_GPUVA_OP_DRIVER 2025-03-06 11:35:42 -08:00
drm_ioctl.h
drm_kunit_helpers.h Merge tag 'drm-misc-next-2025-04-09' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next 2025-04-14 15:29:49 +10:00
drm_lease.h
drm_managed.h drm/managed: Add DRM-managed alloc_ordered_workqueue 2025-01-21 10:32:31 +01:00
drm_mipi_dbi.h
drm_mipi_dsi.h drm/mipi-dsi: Add dev_is_mipi_dsi function 2025-06-27 11:22:39 +02:00
drm_mm.h
drm_mode_config.h drm/plane: Add new plane property IN_FORMATS_ASYNC 2025-05-09 15:29:40 +05:30
drm_mode_object.h drm/drm_mode_object: fix typo in kerneldoc 2025-02-04 14:11:14 +01:00
drm_modes.h
drm_modeset_helper.h
drm_modeset_helper_vtables.h drm/atomic: Let drivers decide which planes to async flip 2025-02-14 00:54:29 +02:00
drm_modeset_lock.h
drm_module.h
drm_of.h
drm_pagemap.h drm/pagemap: Add DRM pagemap 2025-03-06 11:35:25 -08:00
drm_panel.h drm/panel: make prepare/enable and disable/unprepare calls return void 2025-04-22 16:49:11 +03:00
drm_panic.h drm/panic: Add support to scanout buffer as array of pages 2025-04-10 10:50:58 +02:00
drm_pciids.h
drm_plane.h drm/plane: Add new plane property IN_FORMATS_ASYNC 2025-05-09 15:29:40 +05:30
drm_plane_helper.h
drm_prime.h
drm_print.h drm/print: Add drm_coredump_printer_is_full 2025-04-24 15:51:41 -07:00
drm_privacy_screen_consumer.h
drm_privacy_screen_driver.h
drm_privacy_screen_machine.h
drm_probe_helper.h drm/probe-helper: Do not fail from drmm_kms_helper_poll_init() 2025-03-24 09:31:03 +01:00
drm_property.h
drm_rect.h
drm_self_refresh_helper.h
drm_simple_kms_helper.h
drm_suballoc.h
drm_syncobj.h
drm_sysfs.h
drm_util.h drm: Move for_each_if() to util_macros.h for wider use 2025-02-17 14:27:35 +01:00
drm_utils.h
drm_vblank.h
drm_vblank_work.h
drm_vma_manager.h
drm_writeback.h drm: writeback: Create drmm variants for drm_writeback_connector initialization 2025-01-21 10:32:33 +01:00
gpu_scheduler.h drm/sched: Update timedout_job()'s documentation 2025-03-06 16:36:32 +01:00
gud.h
spsc_queue.h drm/sched: Increment job count before swapping tail spsc queue 2025-07-01 16:14:47 -07:00
task_barrier.h