Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH] drm/xe/display: Remove hpd cancel work sync from runtime pm path
Date: Wed, 12 Feb 2025 22:33:18 +0200	[thread overview]
Message-ID: <Z60FjqU7JDotstyg@ideak-desk.fi.intel.com> (raw)
In-Reply-To: <20250212192447.402715-1-rodrigo.vivi@intel.com>

On Wed, Feb 12, 2025 at 02:24:47PM -0500, Rodrigo Vivi wrote:
> This function will synchronously cancel and wait for many display
> work queue items, which might try to take the runtime pm reference
> causing a bad deadlock. So, remove it from the runtime_pm suspend patch.
> 
> Reported-by: Imre Deak <imre.deak@intel.com>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

Makes sense, since instead of trying to cancel a pending a work from
here, the work should instead wake up the device if needed via RPM get:

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

See some notes below.

> ---
>  drivers/gpu/drm/xe/display/xe_display.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c
> index 651799c946ac..f0f427689a56 100644
> --- a/drivers/gpu/drm/xe/display/xe_display.c
> +++ b/drivers/gpu/drm/xe/display/xe_display.c
> @@ -311,7 +311,8 @@ static void __xe_display_pm_suspend(struct xe_device *xe, bool runtime)
>  
>  	xe_display_flush_cleanup_work(xe);
>  
> -	intel_hpd_cancel_work(xe);
> +	if (!runtime)
> +		intel_hpd_cancel_work(xe);

Could be moved to the block below.

AFAICS it's still in the wrong spot for system suspend, as in
xe_pm_suspend() the above function will be called before
xe_irq_suspend(), so a new interrupt/work could be scheduled
here right after intel_hpd_cancel_work(). But that's a separate issue.

>  
>  	if (!runtime && has_display(xe)) {
>  		intel_display_driver_suspend_access(display);
> -- 
> 2.48.1
> 

  reply	other threads:[~2025-02-12 20:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-12 19:24 [PATCH] drm/xe/display: Remove hpd cancel work sync from runtime pm path Rodrigo Vivi
2025-02-12 20:33 ` Imre Deak [this message]
2025-02-12 20:59   ` Rodrigo Vivi
2025-02-12 22:14 ` ✓ CI.Patch_applied: success for " Patchwork
2025-02-12 22:14 ` ✗ CI.checkpatch: warning " Patchwork
2025-02-12 22:15 ` ✓ CI.KUnit: success " Patchwork
2025-02-12 22:32 ` ✓ CI.Build: " Patchwork
2025-02-12 22:34 ` ✓ CI.Hooks: " Patchwork
2025-02-12 22:35 ` ✓ CI.checksparse: " Patchwork
2025-02-13  6:08 ` ✓ Xe.CI.BAT: " Patchwork
2025-02-13 13:04 ` [PATCH] " Upadhyay, Tejas
2025-02-14 18:58   ` Imre Deak
2025-02-17  8:07 ` ✗ Xe.CI.Full: failure for " 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=Z60FjqU7JDotstyg@ideak-desk.fi.intel.com \
    --to=imre.deak@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=rodrigo.vivi@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