linux/drivers/gpu/drm/v3d
Tvrtko Ursulin 9d824c7fce
drm/v3d: Disable preemption while updating GPU stats
We forgot to disable preemption around the write_seqcount_begin/end() pair
while updating GPU stats:

  [ ] WARNING: CPU: 2 PID: 12 at include/linux/seqlock.h:221 __seqprop_assert.isra.0+0x128/0x150 [v3d]
  [ ] Workqueue: v3d_bin drm_sched_run_job_work [gpu_sched]
 <...snip...>
  [ ] Call trace:
  [ ]  __seqprop_assert.isra.0+0x128/0x150 [v3d]
  [ ]  v3d_job_start_stats.isra.0+0x90/0x218 [v3d]
  [ ]  v3d_bin_job_run+0x23c/0x388 [v3d]
  [ ]  drm_sched_run_job_work+0x520/0x6d0 [gpu_sched]
  [ ]  process_one_work+0x62c/0xb48
  [ ]  worker_thread+0x468/0x5b0
  [ ]  kthread+0x1c4/0x1e0
  [ ]  ret_from_fork+0x10/0x20

Fix it.

Cc: Maíra Canal <mcanal@igalia.com>
Cc: stable@vger.kernel.org # v6.10+
Fixes: 6abe93b621 ("drm/v3d: Fix race-condition between sysfs/fdinfo and interrupt handler")
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Acked-by: Maíra Canal <mcanal@igalia.com>
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240813102505.80512-1-tursulin@igalia.com
2024-08-28 11:36:53 -03:00
..
Kconfig drm/v3d: Add support for bcm2711 2022-06-12 22:10:50 -01:00
Makefile drm/v3d: Detach job submissions IOCTLs to a new specific file 2023-12-01 09:34:01 -03:00
v3d_bo.c fix missing vmalloc.h includes 2024-04-25 20:55:49 -07:00
v3d_debugfs.c drm/v3d: Enable V3D to use different PAGE_SIZE 2024-02-23 16:37:20 -03:00
v3d_drv.c drm/v3d: Add V3D tech revision to the device information 2024-07-15 12:45:59 -03:00
v3d_drv.h Merge drm/drm-fixes into drm-misc-fixes 2024-07-30 09:09:23 +02:00
v3d_fence.c
v3d_gem.c drm/v3d: Fix race-condition between sysfs/fdinfo and interrupt handler 2024-04-23 19:32:49 -03:00
v3d_irq.c drm/v3d: Create two functions to update all GPU stats variables 2024-04-23 19:32:45 -03:00
v3d_mmu.c drm/v3d: Enable V3D to use different PAGE_SIZE 2024-02-23 16:37:20 -03:00
v3d_perfmon.c drm/v3d: Fix perfmon build error/warning 2024-06-05 10:44:51 +02:00
v3d_performance_counters.h drm/v3d: Fix perfmon build error/warning 2024-06-05 10:44:51 +02:00
v3d_regs.h drm/v3d: fix up register addresses for V3D 7.x 2023-11-02 08:54:39 -03:00
v3d_sched.c drm/v3d: Disable preemption while updating GPU stats 2024-08-28 11:36:53 -03:00
v3d_submit.c drm/v3d: Validate passed in drm syncobj handles in the performance extension 2024-07-18 15:50:08 +02:00
v3d_sysfs.c drm/v3d: Decouple stats calculation from printing 2024-04-23 19:32:48 -03:00
v3d_trace.h drm/v3d: Create tracepoints to track the CPU job 2023-12-01 09:37:48 -03:00
v3d_trace_points.c