Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Nirmoy Das <nirmoy.das@linux.intel.com>
To: Andi Shyti <andi.shyti@linux.intel.com>,
	intel-gfx <intel-gfx@lists.freedesktop.org>,
	dri-devel <dri-devel@lists.freedesktop.org>
Cc: Nirmoy Das <nirmoy.das@intel.com>,
	Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>,
	Chris Wilson <chris.p.wilson@linux.intel.com>,
	Andi Shyti <andi.shyti@kernel.org>
Subject: Re: [PATCH] drm/i915/gt: debugfs: Evaluate forcewake usage within locks
Date: Mon, 10 Jun 2024 11:24:12 +0200	[thread overview]
Message-ID: <4cc62e14-2775-44f3-9857-eaf9598074a5@linux.intel.com> (raw)
In-Reply-To: <20240607145131.217251-1-andi.shyti@linux.intel.com>

Hi Andi,

On 6/7/2024 4:51 PM, Andi Shyti wrote:
> The forcewake count and domains listing is multi process critical
> and the uncore provides a spinlock for such cases.
>
> Lock the forcewake evaluation section in the fw_domains_show()
> debugfs interface.
>
> Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>

Needs a Fixes tag, below seems to be correct one.


Fixes: 9dd4b065446a ("drm/i915/gt: Move pm debug files into a gt aware 
debugfs")

Cc: <stable@vger.kernel.org> # v5.6+

Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>


Regards,

Nirmoy


> ---
>   drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c b/drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c
> index 4fcba42cfe34..0437fd8217e0 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c
> +++ b/drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c
> @@ -71,6 +71,8 @@ static int fw_domains_show(struct seq_file *m, void *data)
>   	struct intel_uncore_forcewake_domain *fw_domain;
>   	unsigned int tmp;
>   
> +	spin_lock_irq(&uncore->lock);
> +
>   	seq_printf(m, "user.bypass_count = %u\n",
>   		   uncore->user_forcewake_count);
>   
> @@ -79,6 +81,8 @@ static int fw_domains_show(struct seq_file *m, void *data)
>   			   intel_uncore_forcewake_domain_to_str(fw_domain->id),
>   			   READ_ONCE(fw_domain->wake_count));
>   
> +	spin_unlock_irq(&uncore->lock);
> +
>   	return 0;
>   }
>   DEFINE_INTEL_GT_DEBUGFS_ATTRIBUTE(fw_domains);

  parent reply	other threads:[~2024-06-10  9:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-07 14:51 [PATCH] drm/i915/gt: debugfs: Evaluate forcewake usage within locks Andi Shyti
2024-06-07 15:16 ` Rodrigo Vivi
2024-06-11 13:35   ` Andi Shyti
2024-06-07 17:17 ` ✓ Fi.CI.BAT: success for " Patchwork
2024-06-08  4:46 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-06-10  9:24 ` Nirmoy Das [this message]
2024-06-11 13:58   ` [PATCH] " Tvrtko Ursulin
2024-06-11 14:44     ` Nirmoy Das

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=4cc62e14-2775-44f3-9857-eaf9598074a5@linux.intel.com \
    --to=nirmoy.das@linux.intel.com \
    --cc=andi.shyti@kernel.org \
    --cc=andi.shyti@linux.intel.com \
    --cc=chris.p.wilson@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=janusz.krzysztofik@linux.intel.com \
    --cc=nirmoy.das@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