summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorMaíra Canal <mcanal@igalia.com>2026-09-15 16:42:17 -0300
committerMaíra Canal <mcanal@igalia.com>2026-09-30 19:38:46 -0300
commit421cf7ccfc61cb990f38d671ddfe3a901519e21d (patch)
tree84ff7c6c25e0cbaa27c10ec90b7256ebaa1ec9c1 /tools/perf/scripts/python
parentae72b9c39d280e02b1c9e6c91f1f7dd23b550a85 (diff)
downloadlinux-421cf7ccfc61cb990f38d671ddfe3a901519e21d.tar.gz
linux-421cf7ccfc61cb990f38d671ddfe3a901519e21d.zip
drm: Add drm_timeout_rel_to_jiffies()
drm_timeout_abs_to_jiffies() covers the drivers whose wait UAPI takes an absolute deadline, but there is no equivalent for the drivers that express a wait as a duration. Drivers such as i915 and v3d convert the value themselves. Converting a nanosecond duration to jiffies needs some care. nsecs_to_jiffies() returns unsigned long, so on 32-bit a large userspace-supplied timeout overflows its range and is silently truncated. i915 already handles both cases in a local helper, which v3d has a copy of. Add the same conversion to the core, so that it is available to any driver and both copies can be dropped. Differently from drm_timeout_abs_to_jiffies(), the new function enforces that a timeout in jiffies is a positive value and therefore, returns an unsigned value. Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Christian König <christian.koenig@amd.com> Link: https://patch.msgid.link/20260915-drm-timeout-helpers-v3-2-f2ae987d861f@igalia.com Signed-off-by: Maíra Canal <mcanal@igalia.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions