]> www.infradead.org Git - users/hch/misc.git/commit
drm/tests: hdmi: Fix recursive locking
authorMaxime Ripard <mripard@kernel.org>
Wed, 29 Jan 2025 14:21:56 +0000 (15:21 +0100)
committerMaxime Ripard <mripard@kernel.org>
Thu, 6 Feb 2025 13:07:56 +0000 (14:07 +0100)
commit5d14c08a47460e8eedf0185a28b116420ea7f29d
treee156e874ba7365308cf041d14845a3d7d1baa7ee
parent6b6bfd63e1626ceedc738b2a06505aa5b46c1481
drm/tests: hdmi: Fix recursive locking

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>
drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c