All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: <intel-gfx@lists.freedesktop.org>, <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 2/7] drm/i915/vblank: fix context imbalance warnings
Date: Thu, 22 Aug 2024 17:38:43 -0400	[thread overview]
Message-ID: <Zsev4yl6Jwk1UgkA@intel.com> (raw)
In-Reply-To: <111de5bee15f408de65b19ece4b68a7ac66b30cf.1724342644.git.jani.nikula@intel.com>

On Thu, Aug 22, 2024 at 07:04:50PM +0300, Jani Nikula wrote:
> When building for xe, we get the context imbalance warning as the actual
> locking/unlocking is not compiled:
> 
> ../drivers/gpu/drm/i915/display/intel_vblank.c:306:13: warning: context imbalance in 'intel_vblank_section_enter' - wrong count at exit
> ../drivers/gpu/drm/i915/display/intel_vblank.c:314:13: warning: context imbalance in 'intel_vblank_section_exit' - wrong count at exit
> 
> Fix by adding separata stubs for xe without __acquires/__releases
> annotation.
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_vblank.c | 14 ++++++++++----
>  1 file changed, 10 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_vblank.c b/drivers/gpu/drm/i915/display/intel_vblank.c
> index 551e9ca9bb99..2073e8075af4 100644
> --- a/drivers/gpu/drm/i915/display/intel_vblank.c
> +++ b/drivers/gpu/drm/i915/display/intel_vblank.c
> @@ -303,21 +303,27 @@ int intel_crtc_scanline_to_hw(struct intel_crtc *crtc, int scanline)
>   * all register accesses to the same cacheline to be serialized,
>   * otherwise they may hang.
>   */
> +#ifdef I915
>  static void intel_vblank_section_enter(struct drm_i915_private *i915)
>  	__acquires(i915->uncore.lock)
>  {
> -#ifdef I915
>  	spin_lock(&i915->uncore.lock);
> -#endif
>  }
>  
>  static void intel_vblank_section_exit(struct drm_i915_private *i915)
>  	__releases(i915->uncore.lock)
>  {
> -#ifdef I915
>  	spin_unlock(&i915->uncore.lock);
> -#endif
>  }
> +#else
> +static void intel_vblank_section_enter(struct drm_i915_private *i915)
> +{
> +}
> +
> +static void intel_vblank_section_exit(struct drm_i915_private *i915)
> +{
> +}
> +#endif
>  
>  static bool i915_get_crtc_scanoutpos(struct drm_crtc *_crtc,
>  				     bool in_vblank_irq,
> -- 
> 2.39.2
> 

  reply	other threads:[~2024-08-22 21:38 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-22 16:04 [PATCH 0/7] drm/i915/display: conversion to struct intel_display Jani Nikula
2024-08-22 16:04 ` [PATCH 1/7] drm/i915/vblank: use drm_crtc_vblank_crtc() instead of open-coding Jani Nikula
2024-08-22 21:37   ` Rodrigo Vivi
2024-08-22 16:04 ` [PATCH 2/7] drm/i915/vblank: fix context imbalance warnings Jani Nikula
2024-08-22 21:38   ` Rodrigo Vivi [this message]
2024-08-22 16:04 ` [PATCH 3/7] drm/i915/vblank: convert to struct intel_display Jani Nikula
2024-08-22 21:42   ` Rodrigo Vivi
2024-08-23 10:07     ` Jani Nikula
2024-08-22 16:04 ` [PATCH 4/7] drm/i915/vrr: " Jani Nikula
2024-08-22 21:44   ` Rodrigo Vivi
2024-08-22 16:04 ` [PATCH 5/7] drm/i915/tv: " Jani Nikula
2024-08-22 21:45   ` Rodrigo Vivi
2024-08-22 16:04 ` [PATCH 6/7] drm/i915/sprite: " Jani Nikula
2024-08-22 21:47   ` Rodrigo Vivi
2024-08-22 16:04 ` [PATCH 7/7] drm/i915/display: convert params " Jani Nikula
2024-08-22 21:48   ` Rodrigo Vivi
2024-08-23 10:08     ` Jani Nikula
2024-08-22 16:10 ` ✓ CI.Patch_applied: success for drm/i915/display: conversion " Patchwork
2024-08-22 16:11 ` ✗ CI.checkpatch: warning " Patchwork
2024-08-22 16:12 ` ✓ CI.KUnit: success " Patchwork
2024-08-22 16:24 ` ✓ CI.Build: " Patchwork
2024-08-22 16:26 ` ✓ CI.Hooks: " Patchwork
2024-08-22 16:28 ` ✗ CI.checksparse: warning " Patchwork
2024-08-22 16:48 ` ✓ CI.BAT: success " Patchwork
2024-08-22 16:57 ` ✗ Fi.CI.CHECKPATCH: warning " Patchwork
2024-08-22 16:57 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-08-22 17:14 ` ✓ Fi.CI.BAT: success " Patchwork
2024-08-22 23:33 ` ✗ CI.FULL: failure " Patchwork
2024-08-23  8:41 ` ✓ Fi.CI.IGT: success " 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=Zsev4yl6Jwk1UgkA@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@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.