On Tue, 20 May 2025, Luca Coelho <[email protected]> wrote: > 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]> > --- > drivers/gpu/drm/i915/display/intel_connector.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_connector.c > b/drivers/gpu/drm/i915/display/intel_connector.c > index 6c81c9f2fd09..9a61c972dce9 100644 > --- a/drivers/gpu/drm/i915/display/intel_connector.c > +++ b/drivers/gpu/drm/i915/display/intel_connector.c > @@ -209,8 +209,7 @@ enum pipe intel_connector_get_pipe(struct intel_connector > *connector) > { > struct intel_display *display = to_intel_display(connector); > > - drm_WARN_ON(display->drm, > - > !drm_modeset_is_locked(&display->drm->mode_config.connection_mutex)); > + > drm_modeset_lock_assert_held(&display->drm->mode_config.connection_mutex); > > if (!connector->base.state->crtc) > return INVALID_PIPE; -- Jani Nikula, Intel
