All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Roper <matthew.d.roper@intel.com>
To: "José Roberto de Souza" <jose.souza@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Call i915_gem_suspend() only after display is turned off
Date: Fri, 17 Jun 2022 12:28:52 -0700	[thread overview]
Message-ID: <YqzV9N4qGegV7Y3h@mdroper-desk1.amr.corp.intel.com> (raw)
In-Reply-To: <20220617190629.355356-1-jose.souza@intel.com>

On Fri, Jun 17, 2022 at 12:06:29PM -0700, José Roberto de Souza wrote:
> Gem buffers could still be in use by display after i915_gem_suspend()
> is executed so there is chances that i915_gem_flush_free_objects()
> will be being executed at the same time that
> intel_runtime_pm_driver_release() is executed printing warnings about
> wakerefs will being held.

By the same logic do we need to adjust i915_driver_remove() too?


Matt

> 
> So here only calling i915_gem_suspend() and by consequence
> i915_gem_drain_freed_objects() only after display is down making
> sure all buffers are freed.
> 
> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_driver.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
> index d26dcca7e654a..4227675dd1cfe 100644
> --- a/drivers/gpu/drm/i915/i915_driver.c
> +++ b/drivers/gpu/drm/i915/i915_driver.c
> @@ -1067,8 +1067,6 @@ void i915_driver_shutdown(struct drm_i915_private *i915)
>  	intel_runtime_pm_disable(&i915->runtime_pm);
>  	intel_power_domains_disable(i915);
>  
> -	i915_gem_suspend(i915);
> -
>  	if (HAS_DISPLAY(i915)) {
>  		drm_kms_helper_poll_disable(&i915->drm);
>  
> @@ -1085,6 +1083,8 @@ void i915_driver_shutdown(struct drm_i915_private *i915)
>  
>  	intel_dmc_ucode_suspend(i915);
>  
> +	i915_gem_suspend(i915);
> +
>  	/*
>  	 * The only requirement is to reboot with display DC states disabled,
>  	 * for now leaving all display power wells in the INIT power domain
> -- 
> 2.36.1
> 

-- 
Matt Roper
Graphics Software Engineer
VTT-OSGC Platform Enablement
Intel Corporation

  reply	other threads:[~2022-06-17 19:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-17 19:06 [Intel-gfx] [PATCH] drm/i915: Call i915_gem_suspend() only after display is turned off José Roberto de Souza
2022-06-17 19:28 ` Matt Roper [this message]
2022-06-21 17:03   ` Souza, Jose
2022-06-22 22:19     ` Matt Roper
2022-06-23 14:48       ` Souza, Jose
2022-06-23 18:06         ` Matt Roper
2022-06-17 21:11 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2022-06-18 12:05 ` [Intel-gfx] ✗ Fi.CI.IGT: 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=YqzV9N4qGegV7Y3h@mdroper-desk1.amr.corp.intel.com \
    --to=matthew.d.roper@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jose.souza@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.