public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915/display: Fix warning callstack for imbalance wakeref
Date: Wed, 31 Aug 2022 14:54:37 +0300	[thread overview]
Message-ID: <Yw9L/dnCMKuDkpzJ@ideak-desk.fi.intel.com> (raw)
In-Reply-To: <20220830085158.577157-1-mitulkumar.ajitkumar.golani@intel.com>

On Tue, Aug 30, 2022 at 02:21:58PM +0530, Mitul Golani wrote:
> While executing i915_selftest, wakeref imbalance warning is seen
> with i915_selftest failure.
> 
> Currently when Driver is suspended, while doing unregister
> it is taking wakeref without resuming the device.
> This patch is resuming the device, if driver is already suspended
> and doing unregister process.
> 
> Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>

Reviewed-by: Imre Deak <imre.deak@intel.com>

> ---
>  drivers/gpu/drm/i915/i915_driver.c | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
> index 1332c70370a6..be0d51c04cc5 100644
> --- a/drivers/gpu/drm/i915/i915_driver.c
> +++ b/drivers/gpu/drm/i915/i915_driver.c
> @@ -953,7 +953,9 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>  
>  void i915_driver_remove(struct drm_i915_private *i915)
>  {
> -	disable_rpm_wakeref_asserts(&i915->runtime_pm);
> +	intel_wakeref_t wakeref;
> +
> +	wakeref = intel_runtime_pm_get(&i915->runtime_pm);
>  
>  	i915_driver_unregister(i915);
>  
> @@ -977,18 +979,19 @@ void i915_driver_remove(struct drm_i915_private *i915)
>  
>  	i915_driver_hw_remove(i915);
>  
> -	enable_rpm_wakeref_asserts(&i915->runtime_pm);
> +	intel_runtime_pm_put(&i915->runtime_pm, wakeref);
>  }
>  
>  static void i915_driver_release(struct drm_device *dev)
>  {
>  	struct drm_i915_private *dev_priv = to_i915(dev);
>  	struct intel_runtime_pm *rpm = &dev_priv->runtime_pm;
> +	intel_wakeref_t wakeref;
>  
>  	if (!dev_priv->do_release)
>  		return;
>  
> -	disable_rpm_wakeref_asserts(rpm);
> +	wakeref = intel_runtime_pm_get(rpm);
>  
>  	i915_gem_driver_release(dev_priv);
>  
> @@ -999,7 +1002,8 @@ static void i915_driver_release(struct drm_device *dev)
>  
>  	i915_driver_mmio_release(dev_priv);
>  
> -	enable_rpm_wakeref_asserts(rpm);
> +	intel_runtime_pm_put(rpm, wakeref);
> +
>  	intel_runtime_pm_driver_release(rpm);
>  
>  	i915_driver_late_release(dev_priv);
> -- 
> 2.25.1
> 

  parent reply	other threads:[~2022-08-31 11:55 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-30  8:51 [Intel-gfx] [PATCH] drm/i915/display: Fix warning callstack for imbalance wakeref Mitul Golani
2022-08-30 16:42 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/display: Fix warning callstack for imbalance wakeref (rev7) Patchwork
2022-08-31 11:54 ` Imre Deak [this message]
2022-08-31 15:02 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2022-09-01 11:14   ` Imre Deak
2022-08-31 15:28 ` [Intel-gfx] [PATCH] drm/i915/display: Fix warning callstack for imbalance wakeref Andrzej Hajda
  -- strict thread matches above, loose matches on Subject: below --
2022-08-29  8:31 Mitul Golani
2022-08-23  5:20 Mitul Golani
2022-08-23 14:31 ` Jani Nikula
2022-08-23  2:35 Mitul Golani
2022-08-23 11:00 ` Jani Nikula
2022-08-12  4:47 Mitul Golani
2022-08-17 12:49 ` Imre Deak
2022-08-23 12:39   ` Golani, Mitulkumar Ajitkumar
2022-08-23 12:56     ` Golani, Mitulkumar Ajitkumar
2022-08-25 10:51       ` Imre Deak
2022-08-29  6:45         ` Golani, Mitulkumar Ajitkumar
2022-08-29 14:46           ` Imre Deak
2022-08-29 16:59             ` Golani, Mitulkumar Ajitkumar

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=Yw9L/dnCMKuDkpzJ@ideak-desk.fi.intel.com \
    --to=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=mitulkumar.ajitkumar.golani@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox