Skip to content

Commit bcae3af

Browse files
sfrothwelljnikula
authored andcommitted
drm/locking: fix __stack_depot_* name conflict
Commit cd06ab2 ("drm/locking: add backtrace for locking contended locks without backoff") added functions named __stack_depot_* in drm which conflict with stack depot. Rename to __drm_stack_depot_*. v2 by Jani: - Also rename __stack_depot_print References: https://lore.kernel.org/r/[email protected] Fixes: cd06ab2 ("drm/locking: add backtrace for locking contended locks without backoff") Cc: Daniel Vetter <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Signed-off-by: Stephen Rothwell <[email protected]> Signed-off-by: Jani Nikula <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit c4f08d7)
1 parent d89c0c8 commit bcae3af

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

drivers/gpu/drm/drm_modeset_lock.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
static DEFINE_WW_CLASS(crtc_ww_class);
8080

8181
#if IS_ENABLED(CONFIG_DRM_DEBUG_MODESET_LOCK)
82-
static noinline depot_stack_handle_t __stack_depot_save(void)
82+
static noinline depot_stack_handle_t __drm_stack_depot_save(void)
8383
{
8484
unsigned long entries[8];
8585
unsigned int n;
@@ -89,7 +89,7 @@ static noinline depot_stack_handle_t __stack_depot_save(void)
8989
return stack_depot_save(entries, n, GFP_NOWAIT | __GFP_NOWARN);
9090
}
9191

92-
static void __stack_depot_print(depot_stack_handle_t stack_depot)
92+
static void __drm_stack_depot_print(depot_stack_handle_t stack_depot)
9393
{
9494
struct drm_printer p = drm_debug_printer("drm_modeset_lock");
9595
unsigned long *entries;
@@ -108,11 +108,11 @@ static void __stack_depot_print(depot_stack_handle_t stack_depot)
108108
kfree(buf);
109109
}
110110
#else /* CONFIG_DRM_DEBUG_MODESET_LOCK */
111-
static depot_stack_handle_t __stack_depot_save(void)
111+
static depot_stack_handle_t __drm_stack_depot_save(void)
112112
{
113113
return 0;
114114
}
115-
static void __stack_depot_print(depot_stack_handle_t stack_depot)
115+
static void __drm_stack_depot_print(depot_stack_handle_t stack_depot)
116116
{
117117
}
118118
#endif /* CONFIG_DRM_DEBUG_MODESET_LOCK */
@@ -266,7 +266,7 @@ EXPORT_SYMBOL(drm_modeset_acquire_fini);
266266
void drm_modeset_drop_locks(struct drm_modeset_acquire_ctx *ctx)
267267
{
268268
if (WARN_ON(ctx->contended))
269-
__stack_depot_print(ctx->stack_depot);
269+
__drm_stack_depot_print(ctx->stack_depot);
270270

271271
while (!list_empty(&ctx->locked)) {
272272
struct drm_modeset_lock *lock;
@@ -286,7 +286,7 @@ static inline int modeset_lock(struct drm_modeset_lock *lock,
286286
int ret;
287287

288288
if (WARN_ON(ctx->contended))
289-
__stack_depot_print(ctx->stack_depot);
289+
__drm_stack_depot_print(ctx->stack_depot);
290290

291291
if (ctx->trylock_only) {
292292
lockdep_assert_held(&ctx->ww_ctx);
@@ -317,7 +317,7 @@ static inline int modeset_lock(struct drm_modeset_lock *lock,
317317
ret = 0;
318318
} else if (ret == -EDEADLK) {
319319
ctx->contended = lock;
320-
ctx->stack_depot = __stack_depot_save();
320+
ctx->stack_depot = __drm_stack_depot_save();
321321
}
322322

323323
return ret;

0 commit comments

Comments
 (0)