]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/tests: hdmi: Fix recursive locking
authorMaxime Ripard <mripard@kernel.org>
Wed, 29 Jan 2025 14:21:56 +0000 (15:21 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 Mar 2025 19:54:18 +0000 (12:54 -0700)
commit02a12760d7c98c44541c46cd7b011d323b0d15d6
tree282625751c8cac85da5cc498440b3cfb34fcc50a
parentb0f9bb67869dcab549bfbd433aa0eede034d99d1
drm/tests: hdmi: Fix recursive locking

[ Upstream commit 5d14c08a47460e8eedf0185a28b116420ea7f29d ]

The find_preferred_mode() functions takes the mode_config mutex, but due
to the order most tests have, is called with the crtc_ww_class_mutex
taken. This raises a warning for a circular dependency when running the
tests with lockdep.

Reorder the tests to call find_preferred_mode before the acquire context
has been created to avoid the issue.

Reviewed-by: Simona Vetter <simona.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20250129-test-kunit-v2-4-fe59c43805d5@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c