✗ CI.checkpatch: warning for drm/i915/display: Expand runtime_pm protection to atomic commit work
Patchwork
patchwork at emeril.freedesktop.org
Thu May 23 22:09:23 UTC 2024
== Series Details ==
Series: drm/i915/display: Expand runtime_pm protection to atomic commit work
URL : https://patchwork.freedesktop.org/series/133992/
State : warning
== Summary ==
+ KERNEL=/kernel
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt
Cloning into 'mt'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ git -C mt rev-list -n1 origin/master
51ce9f6cd981d42d7467409d7dbc559a450abc1e
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit 3f5f4fa8c77b012b9392955060a1305e23a9db71
Author: Rodrigo Vivi <rodrigo.vivi at intel.com>
Date: Thu May 23 18:03:18 2024 -0400
drm/i915/display: Expand runtime_pm protection to atomic commit work
Xe memory management relies on outer bound callers of runtime PM
protection and it will warn us when some is missing:
<4> [274.904535] xe 0000:00:02.0: Missing outer runtime PM protection
<4> [274.905051] ? xe_pm_runtime_get_noresume+0x48/0x60 [xe]
<4> [274.905118] xe_ggtt_remove_node+0x28/0x90 [xe]
<4> [274.905164] __xe_unpin_fb_vma+0x91/0x120 [xe]
<4> [274.905234] intel_plane_unpin_fb+0x19/0x30 [xe]
<4> [274.905306] intel_cleanup_plane_fb+0x3d/0x50 [xe]
<4> [274.905391] drm_atomic_helper_cleanup_planes+0x49/0x70 [drm_kms_helper]
<4> [274.905407] intel_atomic_cleanup_work+0x69/0xd0 [xe]
The atomic commit helpers in i915 display are already protected.
However, they return the wakeref right before scheduling the thread
work items, what can lead to unprotected memory accesses.
Hence, expand the protections to the work items.
An alternative way would be to keep the state->wakeref, returning
them only at the workers. But this could lead in unbalanced scenarios
if workers gets canceled. So, the preference was to keep it simple
and get a new reference inside the thread.
Cc: Matthew Auld <matthew.auld at intel.com>
Cc: Francois Dugast <francois.dugast at intel.com>
Cc: Imre Deak <imre.deak at intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
+ /mt/dim checkpatch 1385623a20ad940dab90bfaa4bc01fe599506e09 drm-intel
3f5f4fa8c77b drm/i915/display: Expand runtime_pm protection to atomic commit work
-:16: WARNING:COMMIT_LOG_LONG_LINE: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
#16:
<4> [274.905391] drm_atomic_helper_cleanup_planes+0x49/0x70 [drm_kms_helper]
total: 0 errors, 1 warnings, 0 checks, 31 lines checked
More information about the Intel-xe
mailing list