All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Suraj Kandpal <suraj.kandpal@intel.com>
Cc: <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 2/2] drm/xe/display: Do not do intel_fbdev_set_suspend during runtime
Date: Fri, 13 Sep 2024 16:39:41 -0400	[thread overview]
Message-ID: <ZuSjDVbdjJHkggkJ@intel.com> (raw)
In-Reply-To: <20240912012545.702032-3-suraj.kandpal@intel.com>

On Thu, Sep 12, 2024 at 06:55:45AM +0530, Suraj Kandpal wrote:
> Do not do intel_fbdev_set_suspend during runtime_suspend/resume
> functions. This cause a big circular lock_dep splat.
> 
> kworker/0:4/198 is trying to acquire lock:
> <4> [77.185594] ffffffff83398500 (console_lock){+.+.}-{0:0}, at:
> intel_fbdev_set_suspend+0x169/0x1f0 [xe]
> <4> [77.185947]
> but task is already holding lock:
> <4> [77.185949] ffffffffa09e9460
> (xe_pm_runtime_lockdep_map){+.+.}-{0:0}, at:
> xe_pm_runtime_suspend+0x51/0x3f0 [xe]
> <4> [77.186262]
> which lock already depends on the new lock.
> <4> [77.186264]
> the existing dependency chain (in reverse order) is:
> <4> [77.186266]
> -> #2 (xe_pm_runtime_lockdep_map){+.+.}-{0:0}:
> <4> [77.186276]        pm_runtime_lockdep_prime+0x2f/0x50 [xe]
> <4> [77.186572]        xe_pm_runtime_resume_and_get+0x29/0x90 [xe]
> <4> [77.186867]        intelfb_create+0x150/0x390 [xe]
> <4> [77.187197]
> __drm_fb_helper_initial_config_and_unlock+0x31c/0x5e0 [drm_kms_helper]
> <4> [77.187243]        drm_fb_helper_initial_config+0x3d/0x50
> [drm_kms_helper]
> <4> [77.187274]        intel_fbdev_client_hotplug+0xb1/0x140 [xe]
> <4> [77.187603]        drm_client_register+0x87/0xd0 [drm]
> <4> [77.187704]        intel_fbdev_setup+0x51c/0x640 [xe]
> <4> [77.188033]        intel_display_driver_register+0xb7/0xf0 [xe]
> <4> [77.188438]        xe_display_register+0x21/0x40 [xe]
> <4> [77.188809]        xe_device_probe+0xa8d/0xbf0 [xe]
> <4> [77.189035]        xe_pci_probe+0x333/0x5b0 [xe]
> <4> [77.189330]        local_pci_probe+0x48/0xb0
> <4> [77.189341]        pci_device_probe+0xc8/0x280
> <4> [77.189351]        really_probe+0xf8/0x390
> <4> [77.189362]        __driver_probe_device+0x8a/0x170
> <4> [77.189373]        driver_probe_device+0x23/0xb0

same here, please let me see the full log

> 
> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
>  drivers/gpu/drm/xe/display/xe_display.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c
> index 39da79069b5a..a3131a67e5b1 100644
> --- a/drivers/gpu/drm/xe/display/xe_display.c
> +++ b/drivers/gpu/drm/xe/display/xe_display.c
> @@ -322,7 +322,9 @@ static void __xe_display_pm_suspend(struct xe_device *xe, bool runtime)
>  	 * properly.
>  	 */
>  	intel_power_domains_disable(xe);
> -	intel_fbdev_set_suspend(&xe->drm, FBINFO_STATE_SUSPENDED, true);
> +	if (!runtime)
> +		intel_fbdev_set_suspend(&xe->drm, FBINFO_STATE_SUSPENDED, true);
> +
>  	if (!runtime && has_display(xe)) {
>  		drm_kms_helper_poll_disable(&xe->drm);
>  		intel_display_driver_disable_user_access(xe);
> @@ -457,7 +459,8 @@ static void __xe_display_pm_resume(struct xe_device *xe, bool runtime)
>  
>  	intel_opregion_resume(display);
>  
> -	intel_fbdev_set_suspend(&xe->drm, FBINFO_STATE_RUNNING, false);
> +	if (!runtime)
> +		intel_fbdev_set_suspend(&xe->drm, FBINFO_STATE_RUNNING, false);
>  
>  	intel_power_domains_enable(xe);
>  }
> -- 
> 2.43.2
> 

  reply	other threads:[~2024-09-13 20:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-12  1:25 [PATCH 0/2] Move some functions out of runtime sus/resume Suraj Kandpal
2024-09-12  1:25 ` [PATCH 1/2] drm/xe/display: Do not suspend resume dp mst during runtime Suraj Kandpal
2024-09-13 20:38   ` Rodrigo Vivi
2024-09-16 13:44     ` Rodrigo Vivi
2024-09-12  1:25 ` [PATCH 2/2] drm/xe/display: Do not do intel_fbdev_set_suspend " Suraj Kandpal
2024-09-13 20:39   ` Rodrigo Vivi [this message]
2024-09-12  1:33 ` ✓ CI.Patch_applied: success for Move some functions out of runtime sus/resume (rev2) Patchwork
2024-09-12  1:34 ` ✓ CI.checkpatch: " Patchwork
2024-09-12  1:35 ` ✓ CI.KUnit: " Patchwork
2024-09-12  1:47 ` ✓ CI.Build: " Patchwork
2024-09-12  1:49 ` ✓ CI.Hooks: " Patchwork
2024-09-12  1:50 ` ✓ CI.checksparse: " Patchwork
2024-09-12  2:07 ` ✓ CI.BAT: " Patchwork
2024-09-12  5:58 ` ✓ CI.FULL: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2024-09-11 15:27 [PATCH 0/2] Move some functions out of runtime sus/resume Suraj Kandpal
2024-09-11 15:27 ` [PATCH 2/2] drm/xe/display: Do not do intel_fbdev_set_suspend during runtime Suraj Kandpal
2024-09-11 20:39   ` Rodrigo Vivi

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=ZuSjDVbdjJHkggkJ@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=suraj.kandpal@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.