Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Gustavo Sousa <gustavo.sousa@intel.com>
Cc: <intel-xe@lists.freedesktop.org>,
	<intel-gfx@lists.freedesktop.org>,
	"Luca Coelho" <luciano.coelho@intel.com>
Subject: Re: [PATCH v2 3/3] drm/xe/display: Flush DMC wakelock release work on runtime suspend
Date: Fri, 29 Nov 2024 13:26:37 -0500	[thread overview]
Message-ID: <Z0oHXUzvOSh2eaiI@intel.com> (raw)
In-Reply-To: <20241129164010.29887-4-gustavo.sousa@intel.com>

On Fri, Nov 29, 2024 at 01:37:56PM -0300, Gustavo Sousa wrote:
> We currently are not calling display runtime suspend functions when
> D3cold is not allowed. Because of that, we end up not disabling dynamic
> DC states (and do not go to DC9). With dynamic DC states enabled, we
> will also have DMC wakelock enabled. Since we use a delayed work to
> release the DMC wakelock, the work might get executed a little too late
> (after the PCI device has been put to D3hot) and we get a timeout
> warning ("DMC wakelock release timed out") because the MMIO for
> releasing the wakelock will be invalid after that point.
> 
> To fix that, make sure we flush the release work at the end of
> xe_display_pm_runtime_suspend_late(). We can do that unconditionally
> because, if there is no pending work, that turns into a no-op.
> 
> Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>

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

(answering patch by patch to make your life easier now when applying
with dim b4-shazam ;) )

> ---
>  drivers/gpu/drm/xe/display/xe_display.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c
> index 739db5b7b01f..eec91ab1b311 100644
> --- a/drivers/gpu/drm/xe/display/xe_display.c
> +++ b/drivers/gpu/drm/xe/display/xe_display.c
> @@ -22,6 +22,7 @@
>  #include "intel_display_irq.h"
>  #include "intel_display_types.h"
>  #include "intel_dmc.h"
> +#include "intel_dmc_wl.h"
>  #include "intel_dp.h"
>  #include "intel_encoder.h"
>  #include "intel_fbdev.h"
> @@ -409,11 +410,20 @@ void xe_display_pm_suspend_late(struct xe_device *xe)
>  
>  void xe_display_pm_runtime_suspend_late(struct xe_device *xe)
>  {
> +	struct intel_display *display = &xe->display;
> +
>  	if (!xe->info.probe_display)
>  		return;
>  
>  	if (xe->d3cold.allowed)
>  		xe_display_pm_suspend_late(xe);
> +
> +	/*
> +	 * If xe_display_pm_suspend_late() is not called, it is likely
> +	 * that we will be on dynamic DC states with DMC wakelock enabled. We
> +	 * need to flush the release work in that case.
> +	 */
> +	intel_dmc_wl_flush_release_work(display);
>  }
>  
>  void xe_display_pm_shutdown_late(struct xe_device *xe)
> -- 
> 2.47.0
> 

  reply	other threads:[~2024-11-29 18:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-29 16:37 [PATCH v2 0/3] Flush DMC wakelock release work at the end of runtime suspend Gustavo Sousa
2024-11-29 16:37 ` [PATCH v2 1/3] drm/i915/dmc_wl: Extract intel_dmc_wl_flush_release_work() Gustavo Sousa
2024-11-29 18:25   ` Rodrigo Vivi
2024-11-30 17:09     ` Rodrigo Vivi
2024-11-29 16:37 ` [PATCH v2 2/3] drm/xe/display: Extract xe_display_pm_runtime_suspend_late() Gustavo Sousa
2024-11-29 18:25   ` Rodrigo Vivi
2024-11-29 16:37 ` [PATCH v2 3/3] drm/xe/display: Flush DMC wakelock release work on runtime suspend Gustavo Sousa
2024-11-29 18:26   ` Rodrigo Vivi [this message]
2024-11-29 16:45 ` ✓ CI.Patch_applied: success for Flush DMC wakelock release work at the end of runtime suspend (rev2) Patchwork
2024-11-29 16:45 ` ✓ CI.checkpatch: " Patchwork
2024-11-29 16:46 ` ✓ CI.KUnit: " Patchwork
2024-11-29 17:04 ` ✓ CI.Build: " Patchwork
2024-11-29 17:07 ` ✓ CI.Hooks: " Patchwork
2024-11-29 17:08 ` ✗ CI.checksparse: warning " Patchwork
2024-11-29 17:27 ` ✓ Xe.CI.BAT: success " Patchwork
2024-11-30  3:01 ` ✗ Xe.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=Z0oHXUzvOSh2eaiI@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=gustavo.sousa@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox