Skip to content

Commit 7247efc

Browse files
lucacoelhomkahola
authored andcommitted
drm/i915: use drm_modeset_lock_assert_held() in intel_connector_get_pipe()
In the intel_connector_get_pipe() function, we check if connection_mutex is held and generate our own WARN_ON if that's the case. Instead of generating a non-standard warning for a mutex issue, we should use the standard lockdep framework. Change the function to use drm_modeset_lock_assert_held() instead. Signed-off-by: Luca Coelho <[email protected]> Reviewed-by: Jani Nikula <[email protected]> Signed-off-by: Mika Kahola <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent babe098 commit 7247efc

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/gpu/drm/i915/display/intel_connector.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,7 @@ enum pipe intel_connector_get_pipe(struct intel_connector *connector)
209209
{
210210
struct intel_display *display = to_intel_display(connector);
211211

212-
drm_WARN_ON(display->drm,
213-
!drm_modeset_is_locked(&display->drm->mode_config.connection_mutex));
212+
drm_modeset_lock_assert_held(&display->drm->mode_config.connection_mutex);
214213

215214
if (!connector->base.state->crtc)
216215
return INVALID_PIPE;

0 commit comments

Comments
 (0)