mirror-linux/include/drm
Maíra Canal 0b1217bfdf
drm/sched: Allow drivers to skip the reset and keep on running
When the DRM scheduler times out, it's possible that the GPU isn't hung;
instead, a job just took unusually long (longer than the timeout) but is
still running, and there is, thus, no reason to reset the hardware. This
can occur in two scenarios:

  1. The job is taking longer than the timeout, but the driver determined
     through a GPU-specific mechanism that the hardware is still making
     progress. Hence, the driver would like the scheduler to skip the
     timeout and treat the job as still pending from then onward. This
     happens in v3d, Etnaviv, and Xe.
  2. Timeout has fired before the free-job worker. Consequently, the
     scheduler calls `sched->ops->timedout_job()` for a job that isn't
     timed out.

These two scenarios are problematic because the job was removed from the
`sched->pending_list` before calling `sched->ops->timedout_job()`, which
means that when the job finishes, it won't be freed by the scheduler
though `sched->ops->free_job()` - leading to a memory leak.

To solve these problems, create a new `drm_gpu_sched_stat`, called
DRM_GPU_SCHED_STAT_NO_HANG, which allows a driver to skip the reset. The
new status will indicate that the job must be reinserted into
`sched->pending_list`, and the hardware / driver will still complete that
job.

Reviewed-by: Philipp Stanner <phasta@kernel.org>
Link: https://lore.kernel.org/r/20250714-sched-skip-reset-v6-2-5c5ba4f55039@igalia.com
Signed-off-by: Maíra Canal <mcanal@igalia.com>
2025-07-15 08:27:07 -03:00
..
bridge drm/bridge: analogix_dp: Add support for RK3588 2025-04-21 01:27:10 +03:00
clients drm/client: Move public client header to clients/ subdirectory 2024-11-15 09:42:13 +01:00
display drm-misc-next for 6.17: 2025-07-04 11:54:31 +10:00
intel drm/xe/xe2_hpg: Add PCI IDs for xe2_hpg 2025-06-11 07:29:47 -07:00
ttm drm/ttm: add new api ttm_device_prepare_hibernation() 2025-07-10 10:49:44 -05: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: move drm based debugfs funcs to drm_debugfs.c 2025-07-04 15:58:22 +02:00
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: Pass down connector to drm bridge detect hook 2025-07-14 18:23:18 +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: Add helpers for programming hardware gamma LUTs 2025-05-26 09:18:12 +02:00
drm_connector.h drm-misc-next for 6.17: 2025-06-27 09:58:05 +10:00
drm_crtc.h drm: add clone mode check for CRTC 2025-01-08 01:39:58 +02:00
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: add debugfs support on per client-id basis 2025-07-04 15:59:06 +02:00
drm_debugfs_crc.h
drm_device.h drm: Add missing struct drm_wedge_task_info kernel doc 2025-07-10 18:07:47 -03:00
drm_drv.h drm: move drm based debugfs funcs to drm_debugfs.c 2025-07-04 15:58:22 +02:00
drm_edid.h drm/dp: Add an EDID quirk for the DPCD register access probe 2025-06-12 20:44:01 +03: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-dma: Remove obsolete setup function 2024-09-26 09:31:27 +02:00
drm_fbdev_shmem.h drm/fbdev-shmem: Remove obsolete setup function 2024-09-26 09:31:28 +02:00
drm_fbdev_ttm.h drm/fbdev-ttm: Remove obsolete setup function 2024-09-26 09:31:29 +02:00
drm_file.h drm: add debugfs support on per client-id basis 2025-07-04 15:59:06 +02:00
drm_fixed.h drm: fixed: Don't use "proxy" headers 2024-08-13 12:13:45 +03:00
drm_flip_work.h
drm_format_helper.h drm/format-helper: Split off byte swapping from drm_fb_xrgb8888_to_rgb565() 2025-06-27 15:59:23 +02:00
drm_fourcc.h drm/fbdev-helper: Move color-mode lookup into 4CC format helper 2024-09-26 08:27:49 +02:00
drm_framebuffer.h
drm_gem.h drm/gem: Add ww_acquire_ctx support to drm_gem_lru_scan() 2025-07-04 11:09:43 -07:00
drm_gem_atomic_helper.h
drm_gem_dma_helper.h fs: move FMODE_UNSIGNED_OFFSET to fop_flags 2024-08-30 08:22:36 +02:00
drm_gem_framebuffer_helper.h
drm_gem_shmem_helper.h drm/gem-shmem: Do not map s/g table by default 2025-07-07 15:23:41 +02:00
drm_gem_ttm_helper.h
drm_gem_vram_helper.h drm/gem-vram: Un-export pin helpers 2025-05-30 09:47:28 +02:00
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 locking helpers 2025-07-04 11:09:43 -07: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: Simplify drmm_alloc_ordered_workqueue return 2025-07-03 10:14:56 -07:00
drm_mipi_dbi.h
drm_mipi_dsi.h drm/mipi-dsi: Drop MIPI_DSI_MODE_VSYNC_FLUSH flag 2025-07-01 10:46:07 +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: of: Add drm_of_lvds_get_dual_link_pixel_order_sink() 2024-11-05 13:26:42 +02:00
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 a private field to struct drm_scanout_buffer 2025-06-27 11:48:22 +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/shmem-helper: Import dmabuf without mapping its sg_table 2025-06-03 09:21:01 +02:00
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/rect: Add drm_rect_overlap() 2024-08-23 16:47:56 +02:00
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: Add panel backlight quirks 2024-11-21 09:28:11 -06:00
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: Allow drivers to skip the reset and keep on running 2025-07-15 08:27:07 -03:00
gud.h
spsc_queue.h
task_barrier.h