From: Jani Nikula <jani.nikula@linux.intel.com>
To: Luca Coelho <luciano.coelho@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: use drm_modeset_lock_assert_held() in intel_connector_get_pipe()
Date: Tue, 20 May 2025 13:39:20 +0300 [thread overview]
Message-ID: <87plg3tvl3.fsf@intel.com> (raw)
In-Reply-To: <20250520095408.1310440-1-luciano.coelho@intel.com>
On Tue, 20 May 2025, Luca Coelho <luciano.coelho@intel.com> 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 <luciano.coelho@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> ---
> 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
next prev parent reply other threads:[~2025-05-20 10:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-20 9:53 [PATCH] drm/i915: use drm_modeset_lock_assert_held() in intel_connector_get_pipe() Luca Coelho
2025-05-20 10:39 ` Jani Nikula [this message]
2025-05-20 11:55 ` ✓ i915.CI.BAT: success for " Patchwork
2025-05-20 13:45 ` ✗ i915.CI.Full: failure " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87plg3tvl3.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=luciano.coelho@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.